ServerTransaction
The ServerTransaction class defines a SIP server transaction object located on a SIP proxy or user agent server (UAS).
A ServerTransaction instance is generated as the RequestReceivedEventArgs.ServerTransaction property, available on the RequestReceivedEventArgs object dispatched to a specific method by the MSPL script filter. (For more information, see the Dispatch MSPL built-in function.) There are no public constructors for this class.
The request being serviced by this server transaction can be forwarded by calling ServerTransaction.CreateBranch, which will create an associated ClientTransaction. To fork a message, CreateBranch can be called for each fork. The collection of branches for this server transaction can be obtained as a BranchCollection object by referencing the ServerTransaction.Branches property. Requests are sent by calling ClientTransaction.SendRequest on each branch.
To send a response for the request the server transaction was created to service, call ServerTransaction.SendResponse with the Response Sip Class object created by calling Request.CreateResponse () on the Request Sip Class object available in the RequestReceivedEventArgs.Request property.
The ServerTransaction class is derived from the Microsoft.Rtc.Sip.Transaction class.
Public Methods
The ServerTransaction class has the following public methods.
Method |
Description |
---|---|
Inherited from Transaction Sip Class. Cancels the transaction and raises the Transaction.Canceled event. |
|
Sends an authentication challenge response to the client transaction whose request is attempting to initiate this server transaction. |
|
Adds a new ClientTransaction object to the Branches property. |
|
Inherited from Transaction. Releases all resources used by this object and destroys it. |
|
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. |
GetType() |
Inherited from System.Object. Gets the System.Type of the current instance. |
Sends a SIP response message to the client transaction whose request initiated this server transaction. |
|
ToString() |
Inherited from System.Object. Returns a System.String that represents the current System.Object. |
Public Properties
The ServerTransaction class has the following public properties.
Property |
Description |
---|---|
Data type: BranchCollection Access type: Read-only Contains all branches (client transactions) associated with this server transaction as a BranchCollection object. |
|
Data type: Boolean Access type: Read/write Indicates whether request forking is enabled or not. |
|
Data type: DateTime Access type: Read-only Inherited from Transaction. Contains the date and time the transaction originated. |
|
Data type: Request Access type: Read-only Inherited from Transaction. Contains the Request object that initiated the transaction. |
|
Data type: ResponseCollection Access type: Read-only Inherited from Transaction. Contains a collection of all Response objects associated with the transaction. |
|
Data type: Object Access type: Read-only Inherited from Transaction. Contains an object used for synchronizing access to a group of objects related to a server or client transaction. |
Public Events
The ServerTransaction class has the following public events.
Event |
Description |
---|---|
Inherited from Transaction. Occurs when the transaction is canceled. |
|
Inherited from Transaction. Occurs when the transaction is terminated. |
|
Inherited from Transaction. Occurs when the transaction times out. |
Protected Methods
The ServerTransaction class has the following protected methods.
Method |
Description |
---|---|
Inherited from Transaction. Throws ObjectDisposedException if the transaction is in the disposed state. |
|
Inherited from Transaction. Releases all resources associated with the transaction. |
|
Inherited from Transaction. Destroys this transaction and releases all unmanaged resources as well as optionally releasing all managed ones. |
|
Inherited from Transaction. Provides a finalizer for this instance of the Transaction class. |
|
Inherited from Transaction. Raises the Transaction.Canceled event. |
|
Inherited from Transaction. Raises the Transaction.Terminated event. |
|
Inherited from Transaction. Raises the Transaction.TimedOut event. |
Requirements
Redistributable: Requires Microsoft Lync Server 2010
Namespace:Microsoft.Rtc.Sip
Assembly: ServerAgent (in ServerAgent.dll)