SignalingSession Class

Definition

This class represents an Invite based two party session. The session is normally used for offer answer negotiation and signaling call control.

public ref class SignalingSession
public class SignalingSession
type SignalingSession = class
Public Class SignalingSession
Inheritance
SignalingSession

Constructors

SignalingSession(RealTimeEndpoint, RealTimeAddress)

Initializes a signaling session with endpoint and session target.

SignalingSession(RealTimeEndpoint, RealTimeAddress, String)

Creates a signaling session with a specified session ID.

SignalingSession(RealTimeEndpoint, SignalingSessionSettings)

Creates a new instances of SignalingSession with endpoint and the supplied settings.

Properties

CallId

Gets the session ID.

Connection

Gets the connection used by this signaling session. For incoming sessions, this property can be used to determine the address of the inviter. For outgoing sessions, this property can be used to retrieve information about the connection used. This property can return null if the connection does not exist at the moment.

DesiredSessionTimerInterval

Gets or sets the application's desired session timer interval (in seconds). This is used only for the initial invite or response.

Endpoint

Gets the endpoint associated with the session.

FromTag

Gets the tag used in the "From" header. This property may return null if not available. For outgoing sessions, this property may not be available until the state is Alerted or Connected. For incoming sessions, the property may be available right away. This property can be null after the session is terminated. The application is responsible for caching the tag if it requires it after the session is disconnected.

IsIncoming

Gets whether the session was initially received in the RealTimeEndpoint SessionReceived event.

IsSessionTimerSupported

Gets or sets the value indicating if the session supports a session timer. The default value of this property is inherited from the endpoint. An application can override this property per session. If the session is already using a session timer, this flag will only affect the behavior when the next session refresh occurs. If the flag is turned on after the session is connected, the application needs to call ReNegotiateMediaDescription to enable the session timer.

LocalParticipant

Gets the local participant of the session. This is helpful to get the URI of the local participant which can differ from the URI of the endpoint, particularly for incoming sessions.

MinimumSessionExpiresInterval

Gets the minimum session expires interval value (in seconds) currently used by this session.

OfferAnswerNegotiation

Gets or sets the offer answer negotiation callback interface implemented by the caller.

ReliableProvisionalResponsePolicy

Gets or sets the default policy for supporting 100rel extension feature. If an application supports this then the remote can ask for this when sending provisional responses which will result in a PRACK message getting sent to acknowledge the response. An application should set this before sending Invite or else it may not have any effect.

RemoteParticipant

Gets the remote participant of the session.

RouteSetStatus

Gets the status of the dialog's route set.

SessionTarget

Gets the target of this session.

SessionTimerInterval

Gets the session timer interval (in seconds) currently used.

State

Gets the state of this session.

ToTag

Gets the tag used in the "To" header. This property might return null if not available. For both outgoing and incoming sessions, this property may not available until the session is connected. This property can be null after the session is terminated. The application is responsible for caching the tag if it requires it after the session is disconnected.

Methods

BeginAccept(AsyncCallback, Object)

Accept the session.

BeginAccept(SignalingSessionAcceptOptions, AsyncCallback, Object)

Accept the session with options specified.

BeginEstablish(AsyncCallback, Object)

Establish the session.

BeginEstablish(SignalingSessionEstablishOptions, AsyncCallback, Object)

Establish the session with options specified.

BeginParticipate(AsyncCallback, Object)

Participates in a session. This method needs to be called (for both outgoing and incoming messages) to establish the session.

BeginParticipate(IEnumerable<SignalingHeader>, AsyncCallback, Object)

Participates in a session. This method needs to be called (for both outgoing and incoming messages) to establish the session.

BeginRefer(RealTimeAddress, ReferStatus, AsyncCallback, Object)

Refers a URI to the remote participant.

BeginRefer(RealTimeAddress, ReferStatus, IEnumerable<SignalingHeader>, AsyncCallback, Object)

Refers a URI to the remote participant.

BeginRefer(RealTimeAddress, ReferStatus, IEnumerable<SignalingHeader>, ContentType, Byte[], AsyncCallback, Object)

Refers a URI to the remote participant.

BeginRenegotiateDescription(AsyncCallback, Object)

Renegotiates the media description. Only one negotiation can be outstanding at any time. The session should be in the Connected state for this method to work.

BeginRenegotiateDescription(IEnumerable<SignalingHeader>, AsyncCallback, Object)

Renegotiates the media description with the specified participant. Only one negotiation can be outstanding with any participant at any time. The participant should be part of the session for this method to succeed. The participant cannot be a local participant. A given topology may not allow the exchange of descriptions with certain participants.

BeginRenegotiateDescription(SipDialogContext, IEnumerable<SignalingHeader>, AsyncCallback, Object)

Renegotiates the media description. Only one negotiation can be outstanding at any time. The session should be in the Connected state for this method to work.

BeginSendMessage(MessageType, ContentType, Byte[], AsyncCallback, Object)

Sends a message. The session should be in the Connected state.

BeginSendMessage(MessageType, ContentType, Byte[], IEnumerable<SignalingHeader>, AsyncCallback, Object)

Send message to participant specified. Participant who is not part of the session is ignored.

BeginSendProvisionalResponse(Int32, AsyncCallback, Object)

Sends a provisional response.

BeginSendProvisionalResponse(Int32, SendProvisionalResponseOptions, AsyncCallback, Object)

Sends a provisional response.

BeginSendReliableProvisionalResponse(Int32, IEnumerable<SignalingHeader>, Boolean, AsyncCallback, Object)

This method can be used to send a reliable provisional response with option to send answer for early media. If the inviter supports 100rel and the local policy is not unsupported, this method will wait for the PRACK. Otherwise, this method will not require 100rel. Any application that supports 100rel is recommended to use this method for sending provisional response. SendProvisional method can be used only when the application knows for sure that the remote does not require 100rel.

BeginSendReliableProvisionalResponse(Int32, String, IEnumerable<SignalingHeader>, Boolean, AsyncCallback, Object)

This method can be used to send a reliable provisional response with option to send answer for early media. If the inviter supports 100rel and the local policy is not unsupported, this method will wait for the PRACK. Otherwise, this method will not require 100rel. Any application that supports 100rel is recommended to use this method for sending provisional response. SendProvisional method can be used only when the application knows for sure that the remote does not require 100rel.

BeginTerminate(AsyncCallback, Object)

Terminates the session asynchronously. The session will be no longer usable.

BeginTerminate(IEnumerable<SignalingHeader>, AsyncCallback, Object)

Terminates the session asynchronously. The session will be no longer usable.

EndAccept(IAsyncResult)

Waits for the pending accept operation to complete.

EndEstablish(IAsyncResult)

Waits for the pending establish operation to complete.

EndParticipate(IAsyncResult)

Waits for the pending participate operation to complete.

EndRefer(IAsyncResult)

Waits for the pending refer operation to complete.

EndRenegotiateDescription(IAsyncResult)

Waits for the pending renegotiate operation to complete.

EndSendMessage(IAsyncResult)

Waits for the pending SendMessage operation to complete.

EndSendProvisionalResponse(IAsyncResult)

Waits for the send provisional operation to complete.

EndSendReliableProvisionalResponse(IAsyncResult)

Waits for the pending SendProvisionalResponse operation to complete.

EndTerminate(IAsyncResult)

Completes the pending Terminate operation.

GetNewEarlyDialog()

Creates a new dialog context.

GetTraceCorrelationID()

Gets the trace correlation id for this instance.

Participate()

Synchronously participates in a session. This method is not recommended for UI threads or scalable server applications.

Participate(IEnumerable<SignalingHeader>)

Synchronously participates in a session. This method is not recommended for UI threads or scalable server applications.

Refer(RealTimeAddress, ReferStatus)

Synchronously transfers the current session to a different real-time address. This method will wait until the transfer is completed. It is not recommended for a UI thread.

Refer(RealTimeAddress, ReferStatus, IEnumerable<SignalingHeader>)

Synchronously transfers the current session to a different real-time address. This method will wait until the transfer is completed. It is not recommended for a UI thread.

RenegotiateDescription()

Synchronously renegotiates the media description. This method will wait until the media description is renegotiated. It is not recommended for a UI thread.

RenegotiateDescription(IEnumerable<SignalingHeader>)

Synchronously renegotiates the media description. This method will wait until the media description is renegotiated. It is not recommended for a UI thread.

SendMessage(MessageType, ContentType, Byte[])

Synchronously sends a message. The session should be in the Connected state. This method is not recommended for a UI thread.

SendMessage(MessageType, ContentType, Byte[], IEnumerable<SignalingHeader>)

Synchronously sends a message. The session should be in the Connected state. This method is not recommended for a UI thread.

SendProvisionalResponse(Int32, IEnumerable<SignalingHeader>)

Sends a provisional response synchronously.

SendProvisionalResponse(Int32, IEnumerable<SignalingHeader>, Boolean)

Sends a provisional response synchronously with optional support for early media.

SendProvisionalResponse(Int32, String, IEnumerable<SignalingHeader>, Boolean)

Sends a provisional response synchronously with optional support for early media.

Terminate()

Synchronously terminates the session.

Terminate(IEnumerable<SignalingHeader>)

Synchronously terminates the session.

TerminateWithRedirection(IEnumerable<RealTimeAddress>)

Terminates an incoming session by redirecting (with response code 302) the inviter with a list of addresses.

TerminateWithRedirection(Int32, IEnumerable<RealTimeAddress>)

Terminates an incoming session by redirecting the inviter (with specific redirect response code given) with a list of addresses.

TerminateWithRedirection(RealTimeAddress)

Terminates an incoming session by redirecting the inviter with an address.

TerminateWithRejection(Int32, String, IEnumerable<SignalingHeader>)

Terminates a session by rejecting the incoming invite. This method can be called only for an incoming session before participating in it.

TryCancelRenegotiateDescription()

Tries to cancel a pending renegotiation. Returns if cancel is either sent or setup to be sent. This method does not guarantee that renegotiation will not receive a final response since there is possibility that a final response is on the way before cancel message can reach the remote.

TryCancelRenegotiateDescription(IEnumerable<SignalingHeader>)

Tries to cancel a pending renegotiation. Returns if cancel is either sent or setup to be sent. This method does not guarantee that renegotiation will not receive a final response since there is possibility that a final response is on the way before cancel message can reach the remote.

Events

InvitationAccepted

Raised when the remote has accepted the invite. Typically, this happens when a successful response is received. This event is optional for an application. Applications that want to send headers in the acknowledgement can register for this event.

InvitationCompleted

Raised when the invite process completes. Typically, this happens when the inviter acknowledges a successful response. This event is optional for an application. Applications that want to access headers in the acknowledgement can register for this event. Note that EndParticipate for the incoming side also exposes the Ack message. This event is provided for convenience.

MessageReceived

Raised when a message is received.

ProvisionalResponseReceived

Raised when the session received any provisional response (101-199).

Redirecting

Raised when a redirect request is received.

ReferReceived

Raised when a new Refer is received.

ReInviteReceived

Raised when the remote sends a re-invite. This event is optional for an application. Applications that want to access headers in the re-invite can register for this event.

RenegotiationToRefreshNeeded

Raised when the session is enabled for a session timer, the local endpoint is the refresher, and the remote does not support the
UPDATE method. The application is responsible for calling BeginRenegotiateDescription to keep the session alive.

RequestOrResponseReceived

Raised when a request or response is received.

RouteSetStatusChanged

Raised when the state of the route set of the session changes.

StateChanged

Raised when the state of the session changes.

TerminatedByRemote

Raised when the remote side terminates the session by sending a Bye or Cancel message. This event is optional for an application. This event is useful only if the application is interested in accessing the headers in the Bye or Cancel message for custom scenarios.

Extension Methods

SetGrid(SignalingSession, String)
AddFeatureParameter(SignalingSession, String)
BeginConfigureConnection(SignalingSession, ConnectionContext, AsyncCallback, Object)
EndConfigureConnection(SignalingSession, IAsyncResult)
SetUpdateMethodDisabled(SignalingSession, Boolean)

Applies to