Request Sip Class

Request (Microsoft.Rtc.Sip)

The Request class defines a SIP request sent from a client transaction to a server transaction.

Client transactions are represented as a ClientTransaction object, and server transactions are represented as a ServerTransaction object. A request is sent by calling the ClientTransaction.SendRequest method. Any transaction may have only one associated request.

Requests are proxied by calling ServerTransaction.CreateBranch and creating an associated ClientTransaction object for the proxied request. To fork a request, call ServerTransaction.CreateBranch once for each fork, and then call ClientTransaction.SendRequest on each element in the BranchCollection found at ServerTransaction.Branches.

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

When a response is returned for a specific request, a ClientTransaction.ResponseReceived event is raised on the ClientTransaction object that sent the request, and a ResponseReceivedEventArgs object is supplied to the method provided to the ResponseReceivedEventHandler delegate.

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

Public Constructors

The Request (Microsoft.Rtc.Sip) class has the following public constructors.

Constructor

Description

Request.Request ()

Creates an instance of a Request object.

Request.Request (StandardMethodType)

Creates an instance of a Request object, with a specified SIP standard method enumeration type.

Request.Request (StandardMethodType, String)

Creates an instance of a Request object, with a specified SIP standard method enumeration type and a destination URI.

Request.Request (String)

Creates an instance of a Request object, with a specified SIP method type.

Request.Request (String, String)

Creates an instance of a Request object, with a specified SIP method type and a destination URI.

Public Methods

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

Method

Description

Request.Clone ()

Overridden from Message. Creates a deep copy of this Request object instance.

Request.Clone (String)

Creates a deep copy of this Request object instance with the supplied SIP URI represented as a string.

Request.CreateResponse ()

Creates a Response object for this specific Request.

Request.CreateResponse (int32)

Creates a Response object with the supplied status code for this specific Request.

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 Request (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.

Request.Method

Data type: String

Access type: Read-only

Contains the SIP method for this message, represented 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.

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).

Request.RequestUri

Data type: String

Access type: Read/write

Contains the SIP URI for the request.

Request.StandardMethod

Data type: StandardMethodType

Access type: Read-only

Contains the standard SIP method for this request, represented as a StandardMethodType enumeration type.

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)