C# Class SIPSorcery.SIP.SIPTransport

Record number of each type of request received.
Afficher le fichier Open project: sipsorcery/sipsorcery Class Usage Examples

Méthodes publiques

Свойство Type Description
BlackholeAddress System.Net.IPAddress
ContactIPAddress System.Net.IPAddress
PerformanceMonitorPrefix string

Méthodes publiques

Méthode Description
AddSIPChannel ( List sipChannels ) : void

Adds additional SIP Channels to the transport layer.

AddSIPChannel ( SIPChannel sipChannel ) : void

Adds an additional SIP Channel to the transport layer.

CreateCancelTransaction ( SIPRequest sipRequest, SIPEndPoint dstEndPoint, SIPEndPoint localSIPEndPoint, UASInviteTransaction inviteTransaction ) : SIPCancelTransaction
CreateNonInviteTransaction ( SIPRequest sipRequest, SIPEndPoint dstEndPoint, SIPEndPoint localSIPEndPoint, SIPEndPoint outboundProxy ) : SIPNonInviteTransaction
CreateUACTransaction ( SIPRequest sipRequest, SIPEndPoint dstEndPoint, SIPEndPoint localSIPEndPoint, SIPEndPoint outboundProxy, bool sendOkAckManually = false ) : UACInviteTransaction
CreateUASTransaction ( SIPRequest sipRequest, SIPEndPoint dstEndPoint, SIPEndPoint localSIPEndPoint, SIPEndPoint outboundProxy, bool noCDR = false ) : UASInviteTransaction
DoesTransactionExist ( SIPRequest sipRequest ) : bool
FindSIPChannel ( SIPEndPoint localSIPEndPoint ) : SIPChannel

Attempts to match a SIPChannel for this process that has the specified local end point and protocol.

GetDefaultSIPEndPoint ( ) : SIPEndPoint
GetDefaultSIPEndPoint ( SIPEndPoint destinationEP ) : SIPEndPoint
GetDefaultSIPEndPoint ( SIPProtocolsEnum protocol ) : SIPEndPoint
GetDefaultTransportContact ( SIPProtocolsEnum protocol ) : SIPEndPoint
GetHostEndPoint ( string host, bool async ) : SIPDNSLookupResult
GetListeningSIPEndPoints ( ) : List
GetRequest ( SIPMethodsEnum method, SIPURI uri ) : SIPRequest
GetRequest ( SIPMethodsEnum method, SIPURI uri, SIPToHeader to, SIPEndPoint localSIPEndPoint ) : SIPRequest
GetRequestEndPoint ( SIPRequest sipRequest, SIPEndPoint outboundProxy, bool async ) : SIPDNSLookupResult

Based on the information in the SIP request attempts to determine the end point the request should be sent to.

GetResponse ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPResponseStatusCodesEnum responseCode, string reasonPhrase ) : SIPResponse

Used to create a SIP response when it was not possible to parse the incoming SIP request.

GetResponse ( SIPRequest sipRequest, SIPResponseStatusCodesEnum responseCode, string reasonPhrase ) : SIPResponse
GetTransaction ( SIPRequest sipRequest ) : SIPTransaction
GetTransaction ( string transactionId ) : SIPTransaction
GetURIEndPoint ( SIPURI uri, bool async ) : SIPDNSLookupResult
IsLocalSIPEndPoint ( SIPEndPoint sipEndPoint ) : bool
PreProcessRouteInfo ( SIPRequest sipRequest ) : void

This function performs processing on a request to handle any actions that need to be taken based on the Route header.

The main sections in the RFC3261 dealing with Route header processing are sections 12.2.1.1 for request processing and 16.4 for proxy processing. The steps to process requests for Route headers are: 1. If route set is empty no further action is required, forward to destination resolved from request URI, 2. If the request URI is identified as a value that was previously set as a Route by this SIP agent it means the previous hop was a strict router. Replace the reqest URI with the last Route header and go to next step, 3. If the top most route header was set by this SIP agent then remove it and go to next step, 4. If the top most route set does contain the lr parameter then forward to the destination resolved by it, 5. If the top most route header does NOT contain the lr parameter is must be popped and inserted as the request URI and the original request URI must be added to the end of the route set, forward to destination resolved from request URI,

ReceiveMessage ( SIPChannel sipChannel, SIPEndPoint remoteEndPoint, byte buffer ) : void
RemoveSIPChannel ( SIPChannel sipChannel ) : void
SIPTransport ( ResolveSIPEndPointDelegate sipResolver, SIPTransactionEngine transactionEngine ) : NUnit.Framework
SIPTransport ( ResolveSIPEndPointDelegate sipResolver, SIPTransactionEngine transactionEngine, SIPChannel sipChannel, bool queueIncoming ) : NUnit.Framework
SIPTransport ( ResolveSIPEndPointDelegate sipResolver, SIPTransactionEngine transactionEngine, bool queueIncoming ) : NUnit.Framework
SendRaw ( SIPEndPoint localSIPEndPoint, SIPEndPoint destinationEndPoint, byte buffer ) : void

Allows raw bytes to be sent from one of the SIPTransport sockets. This should not be used for SIP payloads and instead is provided to allow other types of payloads to be multi-plexed on the SIP socket. Examples are sending NAT keep alives and STUN responses where it's useful to use the same socket as the SIP packets.

SendRequest ( SIPEndPoint dstEndPoint, SIPRequest sipRequest ) : void
SendRequest ( SIPRequest sipRequest ) : void
SendResponse ( SIPEndPoint dstEndPoint, SIPResponse sipResponse ) : void
SendResponse ( SIPResponse sipResponse ) : void
SendSIPReliable ( SIPTransaction sipTransaction ) : void

Sends a SIP request/response and keeps track of whether a response/acknowledgement has been received. If no response is received then periodic retransmits are made for up to T1 x 64 seconds.

Shutdown ( ) : void

Private Methods

Méthode Description
CheckTransactionEngineExists ( ) : void
FireSIPBadRequestInTraceEvent ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, string message, SIPValidationFieldsEnum sipErrorField, string rawMessage ) : void
FireSIPBadResponseInTraceEvent ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, string message, SIPValidationFieldsEnum sipErrorField, string rawMessage ) : void
FireSIPRequestInTraceEvent ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest ) : void
FireSIPRequestOutTraceEvent ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest ) : void
FireSIPResponseInTraceEvent ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPResponse sipResponse ) : void
FireSIPResponseOutTraceEvent ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPResponse sipResponse ) : void
GetDefaultChannel ( SIPProtocolsEnum protocol ) : SIPChannel

Returns the first SIPChannel found for the requested protocol.

ProcessInMessage ( ) : void
ProcessPendingReliableTransactions ( ) : void
SIPMessageReceived ( SIPChannel sipChannel, SIPEndPoint remoteEndPoint, byte buffer ) : void
SendRequest ( SIPChannel sipChannel, SIPEndPoint dstEndPoint, SIPRequest sipRequest ) : void
SendResponse ( SIPChannel sipChannel, SIPEndPoint dstEndPoint, SIPResponse sipResponse ) : void
SendResponse ( SIPChannel sipChannel, SIPResponse sipResponse ) : void
StartReliableTransmissionsThread ( ) : void
StartTransportThread ( ) : void

Method Details

AddSIPChannel() public méthode

Adds additional SIP Channels to the transport layer.
public AddSIPChannel ( List sipChannels ) : void
sipChannels List
Résultat void

AddSIPChannel() public méthode

Adds an additional SIP Channel to the transport layer.
public AddSIPChannel ( SIPChannel sipChannel ) : void
sipChannel SIPChannel
Résultat void

CreateCancelTransaction() public méthode

public CreateCancelTransaction ( SIPRequest sipRequest, SIPEndPoint dstEndPoint, SIPEndPoint localSIPEndPoint, UASInviteTransaction inviteTransaction ) : SIPCancelTransaction
sipRequest SIPRequest
dstEndPoint SIPEndPoint
localSIPEndPoint SIPEndPoint
inviteTransaction UASInviteTransaction
Résultat SIPCancelTransaction

CreateNonInviteTransaction() public méthode

public CreateNonInviteTransaction ( SIPRequest sipRequest, SIPEndPoint dstEndPoint, SIPEndPoint localSIPEndPoint, SIPEndPoint outboundProxy ) : SIPNonInviteTransaction
sipRequest SIPRequest
dstEndPoint SIPEndPoint
localSIPEndPoint SIPEndPoint
outboundProxy SIPEndPoint
Résultat SIPNonInviteTransaction

CreateUACTransaction() public méthode

public CreateUACTransaction ( SIPRequest sipRequest, SIPEndPoint dstEndPoint, SIPEndPoint localSIPEndPoint, SIPEndPoint outboundProxy, bool sendOkAckManually = false ) : UACInviteTransaction
sipRequest SIPRequest
dstEndPoint SIPEndPoint
localSIPEndPoint SIPEndPoint
outboundProxy SIPEndPoint
sendOkAckManually bool
Résultat UACInviteTransaction

CreateUASTransaction() public méthode

public CreateUASTransaction ( SIPRequest sipRequest, SIPEndPoint dstEndPoint, SIPEndPoint localSIPEndPoint, SIPEndPoint outboundProxy, bool noCDR = false ) : UASInviteTransaction
sipRequest SIPRequest
dstEndPoint SIPEndPoint
localSIPEndPoint SIPEndPoint
outboundProxy SIPEndPoint
noCDR bool
Résultat UASInviteTransaction

DoesTransactionExist() public méthode

public DoesTransactionExist ( SIPRequest sipRequest ) : bool
sipRequest SIPRequest
Résultat bool

FindSIPChannel() public méthode

Attempts to match a SIPChannel for this process that has the specified local end point and protocol.
public FindSIPChannel ( SIPEndPoint localSIPEndPoint ) : SIPChannel
localSIPEndPoint SIPEndPoint
Résultat SIPChannel

GetDefaultSIPEndPoint() public méthode

public GetDefaultSIPEndPoint ( ) : SIPEndPoint
Résultat SIPEndPoint

GetDefaultSIPEndPoint() public méthode

public GetDefaultSIPEndPoint ( SIPEndPoint destinationEP ) : SIPEndPoint
destinationEP SIPEndPoint
Résultat SIPEndPoint

GetDefaultSIPEndPoint() public méthode

public GetDefaultSIPEndPoint ( SIPProtocolsEnum protocol ) : SIPEndPoint
protocol SIPProtocolsEnum
Résultat SIPEndPoint

GetDefaultTransportContact() public méthode

public GetDefaultTransportContact ( SIPProtocolsEnum protocol ) : SIPEndPoint
protocol SIPProtocolsEnum
Résultat SIPEndPoint

GetHostEndPoint() public méthode

public GetHostEndPoint ( string host, bool async ) : SIPDNSLookupResult
host string
async bool
Résultat SIPDNSLookupResult

GetListeningSIPEndPoints() public méthode

public GetListeningSIPEndPoints ( ) : List
Résultat List

GetRequest() public méthode

public GetRequest ( SIPMethodsEnum method, SIPURI uri ) : SIPRequest
method SIPMethodsEnum
uri SIPURI
Résultat SIPRequest

GetRequest() public méthode

public GetRequest ( SIPMethodsEnum method, SIPURI uri, SIPToHeader to, SIPEndPoint localSIPEndPoint ) : SIPRequest
method SIPMethodsEnum
uri SIPURI
to SIPToHeader
localSIPEndPoint SIPEndPoint
Résultat SIPRequest

GetRequestEndPoint() public méthode

Based on the information in the SIP request attempts to determine the end point the request should be sent to.
public GetRequestEndPoint ( SIPRequest sipRequest, SIPEndPoint outboundProxy, bool async ) : SIPDNSLookupResult
sipRequest SIPRequest
outboundProxy SIPEndPoint
async bool
Résultat SIPDNSLookupResult

GetResponse() public méthode

Used to create a SIP response when it was not possible to parse the incoming SIP request.
public GetResponse ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPResponseStatusCodesEnum responseCode, string reasonPhrase ) : SIPResponse
localSIPEndPoint SIPEndPoint
remoteEndPoint SIPEndPoint
responseCode SIPResponseStatusCodesEnum
reasonPhrase string
Résultat SIPResponse

GetResponse() public static méthode

public static GetResponse ( SIPRequest sipRequest, SIPResponseStatusCodesEnum responseCode, string reasonPhrase ) : SIPResponse
sipRequest SIPRequest
responseCode SIPResponseStatusCodesEnum
reasonPhrase string
Résultat SIPResponse

GetTransaction() public méthode

public GetTransaction ( SIPRequest sipRequest ) : SIPTransaction
sipRequest SIPRequest
Résultat SIPTransaction

GetTransaction() public méthode

public GetTransaction ( string transactionId ) : SIPTransaction
transactionId string
Résultat SIPTransaction

GetURIEndPoint() public méthode

public GetURIEndPoint ( SIPURI uri, bool async ) : SIPDNSLookupResult
uri SIPURI
async bool
Résultat SIPDNSLookupResult

IsLocalSIPEndPoint() public méthode

public IsLocalSIPEndPoint ( SIPEndPoint sipEndPoint ) : bool
sipEndPoint SIPEndPoint
Résultat bool

PreProcessRouteInfo() public méthode

This function performs processing on a request to handle any actions that need to be taken based on the Route header.
The main sections in the RFC3261 dealing with Route header processing are sections 12.2.1.1 for request processing and 16.4 for proxy processing. The steps to process requests for Route headers are: 1. If route set is empty no further action is required, forward to destination resolved from request URI, 2. If the request URI is identified as a value that was previously set as a Route by this SIP agent it means the previous hop was a strict router. Replace the reqest URI with the last Route header and go to next step, 3. If the top most route header was set by this SIP agent then remove it and go to next step, 4. If the top most route set does contain the lr parameter then forward to the destination resolved by it, 5. If the top most route header does NOT contain the lr parameter is must be popped and inserted as the request URI and the original request URI must be added to the end of the route set, forward to destination resolved from request URI,
public PreProcessRouteInfo ( SIPRequest sipRequest ) : void
sipRequest SIPRequest
Résultat void

ReceiveMessage() public méthode

public ReceiveMessage ( SIPChannel sipChannel, SIPEndPoint remoteEndPoint, byte buffer ) : void
sipChannel SIPChannel
remoteEndPoint SIPEndPoint
buffer byte
Résultat void

RemoveSIPChannel() public méthode

public RemoveSIPChannel ( SIPChannel sipChannel ) : void
sipChannel SIPChannel
Résultat void

SIPTransport() public méthode

public SIPTransport ( ResolveSIPEndPointDelegate sipResolver, SIPTransactionEngine transactionEngine ) : NUnit.Framework
sipResolver ResolveSIPEndPointDelegate
transactionEngine SIPTransactionEngine
Résultat NUnit.Framework

SIPTransport() public méthode

public SIPTransport ( ResolveSIPEndPointDelegate sipResolver, SIPTransactionEngine transactionEngine, SIPChannel sipChannel, bool queueIncoming ) : NUnit.Framework
sipResolver ResolveSIPEndPointDelegate
transactionEngine SIPTransactionEngine
sipChannel SIPChannel
queueIncoming bool
Résultat NUnit.Framework

SIPTransport() public méthode

public SIPTransport ( ResolveSIPEndPointDelegate sipResolver, SIPTransactionEngine transactionEngine, bool queueIncoming ) : NUnit.Framework
sipResolver ResolveSIPEndPointDelegate
transactionEngine SIPTransactionEngine
queueIncoming bool
Résultat NUnit.Framework

SendRaw() public méthode

Allows raw bytes to be sent from one of the SIPTransport sockets. This should not be used for SIP payloads and instead is provided to allow other types of payloads to be multi-plexed on the SIP socket. Examples are sending NAT keep alives and STUN responses where it's useful to use the same socket as the SIP packets.
public SendRaw ( SIPEndPoint localSIPEndPoint, SIPEndPoint destinationEndPoint, byte buffer ) : void
localSIPEndPoint SIPEndPoint
destinationEndPoint SIPEndPoint
buffer byte
Résultat void

SendRequest() public méthode

public SendRequest ( SIPEndPoint dstEndPoint, SIPRequest sipRequest ) : void
dstEndPoint SIPEndPoint
sipRequest SIPRequest
Résultat void

SendRequest() public méthode

public SendRequest ( SIPRequest sipRequest ) : void
sipRequest SIPRequest
Résultat void

SendResponse() public méthode

public SendResponse ( SIPEndPoint dstEndPoint, SIPResponse sipResponse ) : void
dstEndPoint SIPEndPoint
sipResponse SIPResponse
Résultat void

SendResponse() public méthode

public SendResponse ( SIPResponse sipResponse ) : void
sipResponse SIPResponse
Résultat void

SendSIPReliable() public méthode

Sends a SIP request/response and keeps track of whether a response/acknowledgement has been received. If no response is received then periodic retransmits are made for up to T1 x 64 seconds.
public SendSIPReliable ( SIPTransaction sipTransaction ) : void
sipTransaction SIPTransaction
Résultat void

Shutdown() public méthode

public Shutdown ( ) : void
Résultat void

Property Details

BlackholeAddress public_oe static_oe property

public static IPAddress,System.Net BlackholeAddress
Résultat System.Net.IPAddress

ContactIPAddress public_oe property

public IPAddress,System.Net ContactIPAddress
Résultat System.Net.IPAddress

PerformanceMonitorPrefix public_oe property

public string PerformanceMonitorPrefix
Résultat string