C# Class SIPLib.SIP.SIPStack

This is the main SIP stack class. It is used to process all SIP messages.
Datei anzeigen Open project: richardspiers/C-Sharp-Sip-Lib Class Usage Examples

Public Properties

Property Type Description
Closing bool
ServerMethods string[]
TransactionLock object

Private Properties

Property Type Description
CreateTimer Timer
FindDialog Dialog
Init void
ReceivedRequest void
ReceivedResponse void
TransportReceivedDataEvent void

Public Methods

Method Description
Authenticate ( SIPLib.SIP.UserAgent ua, SIPLib.SIP.Header header ) : string[]

Authenticates through the associated SIP application.

Cancelled ( SIPLib.SIP.UserAgent ua, Message request ) : void

Passes the notification of a cancellation to the associated SIP application.

CreateServer ( Message request, SIPURI uri ) : SIPLib.SIP.UserAgent

Creates the SIP server.

CreateTimer ( SIPLib.SIP.UserAgent obj ) : Timer

Creates a timer on the associated SIP application.

CreateVia ( ) : SIPLib.SIP.Header

Helper function to create a VIA header for this stack.

DialogCreated ( Dialog dialog, SIPLib.SIP.UserAgent ua ) : void

Notifies the associated SIP application that a dialog has been created.

FindOtherTransactions ( Message r, Transaction orig ) : Transaction

Finds any other transactions.

FindTransaction ( string id ) : Transaction

Finds a transaction given an ID

NewCallId ( ) : string

Generates a new call ID.

Received ( string data, string src ) : void

Processing of raw received data

ReceivedRequest ( SIPLib.SIP.UserAgent ua, Message request ) : void

Passes a received request to the associated SIP application.

ReceivedResponse ( SIPLib.SIP.UserAgent ua, Message response ) : void

Passes a received response to the associated SIP application.

SIPStack ( SIPApp app, string userAgentName = "SIPLIB" ) : System

Initializes a new instance of the T:SIPLib.SIP.SIPStack class.

Send ( object data, object dest = null, SIPLib.SIP.TransportInfo transport = null ) : void

Method to send SIP messages. Handles appending of necessary information and routing rules.

Sending ( SIPLib.SIP.UserAgent ua, Message message ) : void

Sends a particular message through the associated SIP application.

Private Methods

Method Description
CreateTimer ( Transaction transaction ) : Timer

Creates the timer.

FindDialog ( object m ) : Dialog

Finds the corresponding dialog by message or string

Init ( ) : void

Initialises the stack. Sets random Tag and creates private dictionaries.

ReceivedRequest ( Message m, SIPURI uri ) : void

Handle received request

ReceivedResponse ( Message r, SIPURI uri ) : void

Handles the received response and passes it to the appropriate transaction or dialog for further handling.

TransportReceivedDataEvent ( object sender, SIPLib.SIP.RawEventArgs e ) : void

Triggered on receipt of data

Method Details

Authenticate() public method

Authenticates through the associated SIP application.
public Authenticate ( SIPLib.SIP.UserAgent ua, SIPLib.SIP.Header header ) : string[]
ua SIPLib.SIP.UserAgent The ua.
header SIPLib.SIP.Header The header.
return string[]

Cancelled() public method

Passes the notification of a cancellation to the associated SIP application.
public Cancelled ( SIPLib.SIP.UserAgent ua, Message request ) : void
ua SIPLib.SIP.UserAgent The ua.
request Message The request.
return void

CreateServer() public method

Creates the SIP server.
public CreateServer ( Message request, SIPURI uri ) : SIPLib.SIP.UserAgent
request Message The request.
uri SIPURI The URI.
return SIPLib.SIP.UserAgent

CreateTimer() public method

Creates a timer on the associated SIP application.
public CreateTimer ( SIPLib.SIP.UserAgent obj ) : Timer
obj SIPLib.SIP.UserAgent The obj.
return Timer

CreateVia() public method

Helper function to create a VIA header for this stack.
public CreateVia ( ) : SIPLib.SIP.Header
return SIPLib.SIP.Header

DialogCreated() public method

Notifies the associated SIP application that a dialog has been created.
public DialogCreated ( Dialog dialog, SIPLib.SIP.UserAgent ua ) : void
dialog Dialog The dialog.
ua SIPLib.SIP.UserAgent The ua.
return void

FindOtherTransactions() public method

Finds any other transactions.
public FindOtherTransactions ( Message r, Transaction orig ) : Transaction
r Message The SIP message.
orig Transaction The original transaction.
return Transaction

FindTransaction() public method

Finds a transaction given an ID
public FindTransaction ( string id ) : Transaction
id string The id of the transaction to find..
return Transaction

NewCallId() public method

Generates a new call ID.
public NewCallId ( ) : string
return string

Received() public method

Processing of raw received data
public Received ( string data, string src ) : void
data string The received data.
src string The data source.
return void

ReceivedRequest() public method

Passes a received request to the associated SIP application.
public ReceivedRequest ( SIPLib.SIP.UserAgent ua, Message request ) : void
ua SIPLib.SIP.UserAgent The ua.
request Message The request.
return void

ReceivedResponse() public method

Passes a received response to the associated SIP application.
public ReceivedResponse ( SIPLib.SIP.UserAgent ua, Message response ) : void
ua SIPLib.SIP.UserAgent The ua.
response Message The response.
return void

SIPStack() public method

Initializes a new instance of the T:SIPLib.SIP.SIPStack class.
public SIPStack ( SIPApp app, string userAgentName = "SIPLIB" ) : System
app SIPApp The SIPApp that messages should be passed to.
userAgentName string Name of the user agent / stack identifier.
return System

Send() public method

Method to send SIP messages. Handles appending of necessary information and routing rules.
public Send ( object data, object dest = null, SIPLib.SIP.TransportInfo transport = null ) : void
data object The data to send (can be a SIPMessage or string representing a SIP message).
dest object The destination (can be a SIPURI or a string).
transport SIPLib.SIP.TransportInfo Optional TransportInfo object.
return void

Sending() public method

Sends a particular message through the associated SIP application.
public Sending ( SIPLib.SIP.UserAgent ua, Message message ) : void
ua SIPLib.SIP.UserAgent The ua.
message Message The message.
return void

Property Details

Closing public_oe property

Variable indicating whether the stack is closing down.
public bool Closing
return bool

ServerMethods public_oe property

The SIP methods that this stack can handle
public string[] ServerMethods
return string[]

TransactionLock public_oe property

public object TransactionLock
return object