C# Class SIPSorcery.SIP.UACInviteTransaction

SIP transaction that initiates a call to a SIP User Agent Server. This transaction processes outgoing calls SENT by the application.
Inheritance: SIPTransaction
Show file Open project: TilmannBach/sipsorcery-fork Class Usage Examples

Public Methods

Method Description
CancelCall ( string cancelReason = null ) : void
SendInviteRequest ( SIPEndPoint dstEndPoint, SIPRequest inviteRequest ) : void

Private Methods

Method Description
GetInTransactionACKRequest ( SIPResponse sipResponse, SIPURI ackURI, SIPEndPoint localSIPEndPoint ) : SIPRequest

In transaction ACK requests are for non-2xx responses, i.e. INVITE rejected and no dialogue being created.

GetNewTransactionACKRequest ( SIPResponse sipResponse, SIPURI ackURI, SIPEndPoint localSIPEndPoint ) : SIPRequest

New transaction ACK requests are for 2xx responses, i.e. INVITE accepted and dialogue being created.

From RFC 3261 Chapter 17.1.1.3 - ACK for non-2xx final responses IMPORTANT: an ACK for a non-2xx response will also have the same branch ID as the INVITE whose response it acknowledges. The ACK request constructed by the client transaction MUST contain values for the Call-ID, From, and Request-URI that are equal to the values of those header fields in the request passed to the transport by the client transaction (call this the "original request"). The To header field in the ACK MUST equal the To header field in the response being acknowledged, and therefore will usually differ from the To header field in the original request by the addition of the tag parameter. The ACK MUST contain a single Via header field, and this MUST be equal to the top Via header field of the original request. The CSeq header field in the ACK MUST contain the same value for the sequence number as was present in the original request, but the method parameter MUST be equal to "ACK". If the INVITE request whose response is being acknowledged had Route header fields, those header fields MUST appear in the ACK. This is to ensure that the ACK can be routed properly through any downstream stateless proxies. From RFC 3261 Chapter 13.2.2.4 - ACK for 2xx final responses IMPORTANT: an ACK for a 2xx final response is a new transaction and has a new branch ID. The UAC core MUST generate an ACK request for each 2xx received from the transaction layer. The header fields of the ACK are constructed in the same way as for any request sent within a dialog (see Section 12) with the exception of the CSeq and the header fields related to authentication. The sequence number of the CSeq header field MUST be the same as the INVITE being acknowledged, but the CSeq method MUST be ACK. The ACK MUST contain the same credentials as the INVITE. If the 2xx contains an offer (based on the rules above), the ACK MUST carry an answer in its body. If the offer in the 2xx response is not acceptable, the UAC core MUST generate a valid answer in the ACK and then send a BYE immediately.

UACInviteTransaction ( SIPTransport sipTransport, SIPRequest sipRequest, SIPEndPoint dstEndPoint, SIPEndPoint localSIPEndPoint, SIPEndPoint outboundProxy ) : System
UACInviteTransaction_TransactionFinalResponseReceived ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPTransaction sipTransaction, SIPResponse sipResponse ) : void
UACInviteTransaction_TransactionInformationResponseReceived ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPTransaction sipTransaction, SIPResponse sipResponse ) : void
UACInviteTransaction_TransactionRemoved ( SIPTransaction transaction ) : void
UACInviteTransaction_TransactionRequestReceived ( SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPTransaction sipTransaction, SIPRequest sipRequest ) : void
UACInviteTransaction_TransactionTimedOut ( SIPTransaction sipTransaction ) : void

Method Details

CancelCall() public method

public CancelCall ( string cancelReason = null ) : void
cancelReason string
return void

SendInviteRequest() public method

public SendInviteRequest ( SIPEndPoint dstEndPoint, SIPRequest inviteRequest ) : void
dstEndPoint SIPEndPoint
inviteRequest SIPRequest
return void