The ResponseReceivedevent is raised when a response message for the request sent by the ClientTransaction object is received.

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

Syntax

Visual Basic (declaration)
Public Event 
ResponseReceived 
As 

ResponseReceivedEventHandler
Visual Basic (usage)
Dim 
instance 
As 

ClientTransaction
Dim 
handler 
As 

ResponseReceivedEventHandler

AddHandler instance.
ResponseReceived, 
handler
C#
public event 

ResponseReceivedEventHandler 
ResponseReceived

Remarks

Responses to the message sent by a ClientTransactionobject are obtained by registering for the ResponseReceivedevent. Responses can also be obtained through the Dispatch MSPL function from a message filter script.

The response is obtained from the Response property that is defined on the ResponseReceivedEventArgs object that returned by the event.

Example Code

The following example demonstrates how to register for a ResponseReceivedevent.

  Copy codeCopy code
myClientTransaction.ResponseReceived += new
ResponseReceivedEventHandler(OnResponseReceived);

...

// The method for handling the response signature must correspond
// with that of the ResponseReceivedEventHandler delegate.

public void OnResponseReceived(object sender,
ResponseReceivedEventArgs responseReceivedArgs) {

  // Obtain the Response object.
  Response resp = responseReceivedArgs.Response;

  // Put processing for the response here.
  ...
}

See also