Fork

Applies to: Lync 2013 | Lync Server 2013

Fork

The Fork function creates a forked copy of the current message with its request URI field set to the supplied URI string.

Syntax

void Fork(
  string uri
);

Parameters

  • Uri
    Specifies the SIP URI to receive the forked message; for example, "sip:someone@example.com:6767".

Remarks

Call this method for each URI you are forking the message to. Before calling this method, BeginFork must be called to initialize the forking operation for this message. The forked messages are sent collectively with a subsequent call to EndFork.

If you are forwarding to only one destination, ProxyRequest should be called instead. A message cannot be forked if it has a strict (fixed) route. Messages with a strict route have the "Route" header present.

An error is generated if Fork is called without a previous open call to BeginFork.

Note

Although Microsoft Lync Server 2013 APIs permit a request to be forked within an already established session, you should not do so. Forking, say, an ACK request (or any other request with route headers) confuses endpoints that are not already part of the conversation.