ClientTransaction class

Lync 2013

The ClientTransaction class defines a SIP client transaction object located on a SIP proxy.

A ClientTransaction object is created by calling the CreateBranch() method on a ServerTransaction object. To fork the proxy behavior, ServerTransaction.CreateBranch can be called multiple times. However, a ClientTransaction object can service only one request. To send the request, call the SendRequest(Request) method.

To handle the responses for the request that are sent by a specific client transaction, you must register for the ResponseReceived event. This event returns a ResponseReceivedEventArgs object whenever it is raised, and contains the response as a Response class object.

Currently, the User Account Control (UAC) client transaction case is not supported, where the server originates a client transaction. Only proxy behaviors are available for this class

The ClientTransaction class is derived from the Transaction class.


Namespace:  Microsoft.Rtc.Sip
Assembly:  ServerAgent (in ServerAgent.dll)

public class ClientTransaction : Transaction

Client transactions are used by UACs and proxies.

For information about the nature of client transactions, the UAC, inbound and outbound proxies, and server transactions, see Section 17 of RFC 3261 (SIP: Session Initiation Protocol).

Example Code

The following code example logs the time a request is passed to the "OnRequest" dispatch handler, and then forwards the request by creating a branch on the server transaction that is passed to the handler. Requests are dispatched to this method from the MSPL script in the application manifest by using the Dispatch MSPL function.

public void OnRequest(object sender, RequestReceivedEventArgs e)

Console.WriteLine("Enter OnRequest:" + System.DateTime.Now.ToLongTimeString());

ClientTransaction branch = e.ServerTransaction.CreateBranch();


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.