Class SIPTransaction
A state machine for SIP transactions.
Inheritance
System.Object
SIPTransaction
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: SIPSorcery.dll
Syntax
public class SIPTransaction
Constructors
|
Improve this Doc
View Source
SIPTransaction(SIPTransport, SIPRequest, SIPEndPoint)
Creates a new SIP transaction and adds it to the list of in progress transactions.
Declaration
protected SIPTransaction(SIPTransport sipTransport, SIPRequest transactionRequest, SIPEndPoint outboundProxy)
Parameters
Type |
Name |
Description |
SIPTransport |
sipTransport |
The SIP Transport layer that is to be used with the transaction.
|
SIPRequest |
transactionRequest |
The SIP Request on which the transaction is based.
|
SIPEndPoint |
outboundProxy |
|
Fields
|
Improve this Doc
View Source
AckRetransmits
Declaration
public int AckRetransmits
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
CDR
Declaration
Field Value
|
Improve this Doc
View Source
CompletedAt
For INVITEs this is the time they received the final response and is used to
calculate the time they expire as T6 after this.
Declaration
public DateTime CompletedAt
Field Value
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
Created
Declaration
Field Value
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
DeliveryFailed
If the transport layer does not receive a response to the request in the
allotted time the request will be marked as failed.
Declaration
public bool DeliveryFailed
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
DeliveryPending
Declaration
public bool DeliveryPending
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
InitialTransmit
Declaration
public DateTime InitialTransmit
Field Value
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
LastTransmit
Declaration
public DateTime LastTransmit
Field Value
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
logger
Declaration
protected static ILogger logger
Field Value
Type |
Description |
Microsoft.Extensions.Logging.ILogger |
|
|
Improve this Doc
View Source
m_branchId
Declaration
protected string m_branchId
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
m_callId
Declaration
protected string m_callId
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
m_localTag
Declaration
protected string m_localTag
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
m_maxRingTime
Maximum time an INVITE will be left ringing for (typically 10 minutes).
Declaration
protected static readonly int m_maxRingTime
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
m_remoteTag
Declaration
protected string m_remoteTag
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
m_sipTransport
Declaration
protected SIPTransport m_sipTransport
Field Value
|
Improve this Doc
View Source
m_transactionFinalResponse
Declaration
protected SIPResponse m_transactionFinalResponse
Field Value
|
Improve this Doc
View Source
m_transactionRequest
Declaration
protected SIPRequest m_transactionRequest
Field Value
|
Improve this Doc
View Source
OutboundProxy
If not null this value is where ALL transaction requests should be sent to.
Declaration
public SIPEndPoint OutboundProxy
Field Value
|
Improve this Doc
View Source
PrackRetransmits
Declaration
public int PrackRetransmits
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
PrackSupported
If am INVITE transaction client indicates RFC3262 support in the Require or Supported header we'll deliver reliable
provisional responses.
Declaration
protected bool PrackSupported
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Retransmits
Declaration
Field Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
TimedOutAt
If the transaction times out this holds the value it timed out at.
Declaration
public DateTime TimedOutAt
Field Value
Type |
Description |
System.DateTime |
|
|
Improve this Doc
View Source
TransactionType
Declaration
public SIPTransactionTypesEnum TransactionType
Field Value
Properties
|
Improve this Doc
View Source
AckRequest
Declaration
public SIPRequest AckRequest { get; protected set; }
Property Value
|
Improve this Doc
View Source
BranchId
Declaration
public string BranchId { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
HasTimedOut
Declaration
public bool HasTimedOut { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
PRackRequest
Declaration
public SIPRequest PRackRequest { get; protected set; }
Property Value
|
Improve this Doc
View Source
ReliableProvisionalResponse
The most recent provisional response that was requested to be sent. If reliable provisional responses
are being used then this response needs to be sent reliably in the same manner as the final response.
Declaration
public SIPResponse ReliableProvisionalResponse { get; }
Property Value
|
Improve this Doc
View Source
RSeq
Declaration
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
TransactionFinalResponse
This is the final response being sent by a UAS transaction or the one received by a UAC one.
Declaration
public SIPResponse TransactionFinalResponse { get; }
Property Value
|
Improve this Doc
View Source
TransactionId
Declaration
public string TransactionId { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
TransactionRequest
Declaration
public SIPRequest TransactionRequest { get; }
Property Value
|
Improve this Doc
View Source
TransactionRequestFrom
Declaration
public SIPUserField TransactionRequestFrom { get; }
Property Value
|
Improve this Doc
View Source
TransactionRequestURI
Declaration
public SIPURI TransactionRequestURI { get; }
Property Value
|
Improve this Doc
View Source
TransactionState
Declaration
public SIPTransactionStatesEnum TransactionState { get; }
Property Value
|
Improve this Doc
View Source
UnreliableProvisionalResponse
The most recent non reliable provisional response that was requested to be sent.
Declaration
public SIPResponse UnreliableProvisionalResponse { get; }
Property Value
Methods
|
Improve this Doc
View Source
ACKReceived(SIPEndPoint, SIPEndPoint, SIPRequest)
Declaration
public void ACKReceived(SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest)
Parameters
|
Improve this Doc
View Source
GetInfoResponse(SIPRequest, SIPResponseStatusCodesEnum)
Declaration
protected SIPResponse GetInfoResponse(SIPRequest sipRequest, SIPResponseStatusCodesEnum sipResponseCode)
Parameters
Returns
|
Improve this Doc
View Source
GetRequestTransactionId(String, SIPMethodsEnum)
Declaration
public static string GetRequestTransactionId(string branchId, SIPMethodsEnum method)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
GotResponse(SIPEndPoint, SIPEndPoint, SIPResponse)
Declaration
public Task<SocketError> GotResponse(SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPResponse sipResponse)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Net.Sockets.SocketError> |
|
|
Improve this Doc
View Source
OnRetransmitFinalResponse()
Declaration
public void OnRetransmitFinalResponse()
|
Improve this Doc
View Source
OnRetransmitProvisionalResponse()
Declaration
public void OnRetransmitProvisionalResponse()
|
Improve this Doc
View Source
OnTimedOutProvisionalResponse()
Declaration
public void OnTimedOutProvisionalResponse()
|
Improve this Doc
View Source
PRACKReceived(SIPEndPoint, SIPEndPoint, SIPRequest)
PRACK request received to acknowledge the last provisional response that was sent.
Declaration
public void PRACKReceived(SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest)
Parameters
Type |
Name |
Description |
SIPEndPoint |
localSIPEndPoint |
The SIP socket the request was received on.
|
SIPEndPoint |
remoteEndPoint |
The remote SIP socket the request originated from.
|
SIPRequest |
sipRequest |
The PRACK request.
|
|
Improve this Doc
View Source
SendFinalResponse(SIPResponse)
Declaration
protected virtual void SendFinalResponse(SIPResponse finalResponse)
Parameters
|
Improve this Doc
View Source
SendProvisionalResponse(SIPResponse)
Declaration
protected virtual Task<SocketError> SendProvisionalResponse(SIPResponse sipResponse)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Net.Sockets.SocketError> |
|
|
Improve this Doc
View Source
SendReliableRequest()
Declaration
protected void SendReliableRequest()
|
Improve this Doc
View Source
SendRequestAsync(SIPRequest)
Sends a SIP request in a non-reliable fashion. The request will be sent once and no automatic retransmits occur.
This is suitable for requests like ACK which do not get a response.
Declaration
protected Task<SocketError> SendRequestAsync(SIPRequest sipRequest)
Parameters
Type |
Name |
Description |
SIPRequest |
sipRequest |
The SIP request to send.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Net.Sockets.SocketError> |
Success if no errors occurred sending the request or an error indication if there were.
|
|
Improve this Doc
View Source
UpdateTransactionState(SIPTransactionStatesEnum)
Declaration
protected void UpdateTransactionState(SIPTransactionStatesEnum transactionState)
Parameters
Events
|
Improve this Doc
View Source
OnAckRequestReceived
The UAS transaction needs the ACK request if the original INVITE did not have an SDP offer.
In that case the ACK request contains the SDP answer.
Declaration
protected event SIPTransactionRequestReceivedDelegate OnAckRequestReceived
Event Type
|
Improve this Doc
View Source
TransactionDuplicateResponse
Declaration
protected event SIPTransactionResponseReceivedDelegate TransactionDuplicateResponse
Event Type
|
Improve this Doc
View Source
TransactionFailed
Declaration
protected event SIPTransactionFailedDelegate TransactionFailed
Event Type
|
Improve this Doc
View Source
TransactionFinalResponseReceived
Declaration
protected event SIPTransactionResponseReceivedDelegate TransactionFinalResponseReceived
Event Type
|
Improve this Doc
View Source
Declaration
protected event SIPTransactionResponseReceivedDelegate TransactionInformationResponseReceived
Event Type
|
Improve this Doc
View Source
TransactionRequestRetransmit
Declaration
protected event SIPTransactionRequestRetransmitDelegate TransactionRequestRetransmit
Event Type
|
Improve this Doc
View Source
TransactionStateChanged
Declaration
public event SIPTransactionStateChangeDelegate TransactionStateChanged
Event Type
|
Improve this Doc
View Source
TransactionTraceMessage
Declaration
public event SIPTransactionTraceMessageDelegate TransactionTraceMessage
Event Type
Extension Methods