4.6 Packet Exchanges to Forward Incoming Calls or Modify the Existing Forward State

Client forwarding a call

Figure 8: Client forwarding a call

 The client can forward incoming calls by following the steps below:

  1. The client establishes the session as described in the example in section 4.1.

  2.  The client calls the Forward packet to the server to forward calls on the line address or to modify (including cancel) existing forward instructions. The return value is a positive number that is the request identifier, or a negative number in case of error.

  3. The server calls the RemoteSPEventProc method of the client with the LINE_REPLY packet, which matches the request identifier previously returned for the Forward packet. A return value of 0 indicates that the operation was carried out successfully, or a negative number is returned on error.

  4. The client can terminate the session as described in the example in section 4.2.