Response (Microsoft.Rtc.Sip)

The Response class defines a SIP response sent from a server transaction to a client transaction.

To generate a response message for a request, call Request.CreateResponse () on the associated Request Sip Class object. Populate the Response message with the proper status class and reason phrase, and then pass it to ServerTransaction.SendResponse, using the ServerTransaction object for the initial request.

There are two methods for receiving a response:

The response is filtered by the MSPL message filter and dispatched to a specific method defined in your application. (For more information, see the Dispatch built-in MSPL function.) The method handling the response must have a signature that matches the ResponseReceivedEventHandler delegate. The originating request that incurred the response was sent from a specific ClientTransaction object instance running on your application. In this case, the response is obtained by registering an event handler for the ClientTransaction.ResponseReceived event. In both cases, the response is returned as the ResponseReceivedEventArgs.Response property, which contains a Response object. In the case where a ClientTransaction object on the application incurred the response, the ResponseReceivedEventArgs.ClientTransaction property will contain a reference to the specific client transaction.

The Response class is derived from the Microsoft.Rtc.Sip.Message class.

Public Methods

The Response (Microsoft.Rtc.Sip) class has the following public methods.

Method

Description

Equals(Object)

Inherited from System.Object. Determines whether the specified System.Object is equal to the current System.Object.

GetHashCode()

Inherited from System.Object. Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

Message.GetHeaders

Inherited from Message. Obtains an IEnumerator interface for access to a type-filtered collection of headers set on the message.

GetType()

Inherited from System.Object. Gets the System.Type of the current instance.

ToString()

Inherited from System.Object. Returns a System.String that represents the current System.Object.

Public Properties

The Response (Microsoft.Rtc.Sip) class has the following public properties.

Property

Description

Message.AllHeaders

Data type: HeaderCollection

Access type: Read-only

Inherited from Message. Contains the message headers as a HeaderCollection object.

Message.AuthenticationInfo

Data type: Object

Access type: Read-only

Inherited from Message. Contains SIP stack-specific authentication information as an AuthenticationInfo structure.

Message.Content

Data type: String

Access type: Read/write

Inherited from Message. Contains the parsed message content as a string.

Message.RawContent

Data type: Byte array

Access type: Read/write

Inherited from Message. Contains the unparsed message content in raw binary form.

Response.ReasonPhrase

Data type: String

Access type: Read/write

Contains a text string describing the status code.

Message.Received

Data type: Boolean

Access type: Read-only

Inherited from Message. Indicates whether this message was received by the server (as opposed to created by the calling application).

Response.StatusClass

Data type: Int32

Access type: Read-only

Contains the class of the status code.

Response.StatusCode

Data type: Int32

Access type: Read/write

Contains the status code for the response.

Message.TimeReceived

Data type: DateTime

Access type: Read-only

Inherited from Message. Indicates the date and time the message was received by the server.

Requirements

Redistributable: Requires Microsoft Lync Server 2010

Namespace: Microsoft.Rtc.Sip

Assembly: ServerAgent (in ServerAgent.dll)

See Also