Represents SIP requests.
The Requestclass 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 SendRequest(Request) method. Any transaction may have only one associated request.
Requests are proxied by calling the CreateBranch () () () () and creating an associated ClientTransactionobject for the proxied request. To fork a request, call ServerTransaction.CreateBranchonce for each fork, and then call ClientTransaction.SendRequeston each element in the BranchCollection found at Branches .
To generate a response message for a request, call CreateResponse () () () () on the associated Requestobject. Populate the Response message with the proper status class and reason phrase, and then pass it to SendResponse(Response) , by using the ServerTransactionobject for the initial request.
When a response is returned for a specific request, a ResponseReceived event is raised on the ClientTransactionobject that sent the request, and a ResponseReceivedEventArgs object is supplied to the method that is provided to the ResponseReceivedEventHandler delegate.
The Requesttype exposes the following members.
Constructors
Name | Description | |
---|---|---|
Request () () () () |
The
Requestconstructor creates an instance
of a
|
|
Request(String) | Creates a new request with the specified method type. | |
Request(Request . . :: . . StandardMethodType) | Creates a new request with the specified standard method type. | |
Request(String, String) | Creates a new request with the specified method type and target URI. | |
Request(Request . . :: . . StandardMethodType, String) | Creates a new request with the specified standard method type and target URI. |
Properties
Name | Description | |
---|---|---|
AllHeaders | Collection that contains all of the headers for this message.(Inherited from Message.) | |
AllStamps | Returns all the stamps that are associated with the message.(Inherited from Message.) | |
AuthenticationInfo | Stack-specific authentication information.(Inherited from Message.) | |
Content | Message content parsed as a string.(Inherited from Message.) | |
Method | SIP method type. | |
RawContent | Raw message content.(Inherited from Message.) | |
Received | Indicates whether this message was received by the server (as opposed to having been created by the calling application).(Inherited from Message.) | |
RequestUri | Request URI. | |
SimpleProxy | Indicates whether this request can be simple proxied. | |
Stamp | The Stampproperty contains the string that is used to stamp a message. Setting Stampmarks the message with the supplied string, which can then be read either by the application or downstream instances of the application.(Inherited from Message.) | |
StampPool | The StampPoolproperty specifies the name of the Enterprise Edition pool in which the last stamp for the application was set.(Inherited from Message.) | |
StandardMethod | Efficient representation of common SIP method types. | |
TimeReceived | The TimeReceivedproperty indicates the date and time (represented as a DateTimeobject) the message was received by the server.(Inherited from Message.) |
Methods
Name | Description | |
---|---|---|
Clone () () () () | Creates a new request based on this request. | |
Clone(String) | Creates a new request based on this request with the specified target URI. | |
CreateResponse () () () () | Creates a response to this request. | |
CreateResponse(Int32) | Creates a response to this message with the specified status code. | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetHeaders | A read-only collection of headers of the specified type.(Inherited from Message.) | |
GetStandardMethod | Returns a StandardMethodTypeenum value that matches the supplied method. | |
GetType | (Inherited from Object.) | |
InitializeUnmarshaled | Initializes an object that is created by the application in the Unmarshaled state.(Inherited from Message.) | |
MemberwiseClone | (Inherited from Object.) | |
Retarget | Sets a new target user (logical destination) for the request. The actual destination address for request routing is not provided. Other applications and/or servers should come up with the route. Setting request URI directly implies that the actual destination address is provided. | |
SetDestination | Sets the destination of the request to the specified ContactInfo. Use this method instead of setting the RequestUri property directly. | |
SetMarshaled | Updates state to Marshaled.(Overrides Message . . :: . . SetMarshaled () () () () .) | |
ToString | (Inherited from Object.) |
Fields
Name | Description | |
---|---|---|
marshalContent | The marshalContent field is used to marshal content.(Inherited from Message.) |
Explicit interface implementations
Name | Description | |
---|---|---|
ICloneable . . :: . . Clone | Creates a copy of this object.(Inherited from Message.) |