4.5 Packet Exchanges to Transfer a Connected call

Client transferring an existing connected call

Figure 7: Client transferring an existing connected call

A client can transfer an existing connected call. Both outgoing calls and incoming calls that are in a connected state can be transferred to another address (phone number). The following steps describe transferring an incoming call that has been answered:

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

  2.  The server calls the RemoteSPEventProc method of the client with the LINE_APPNEWCALL packet to indicate that a new call has appeared on the line device. The client can allocate any required resources for a new call at this stage.

  3. The server calls the RemoteSPEventProc method of the client with the LINE_CALLSTATE packet; the call state is LINECALLSTATE_OFFERING to indicate that the client is being offered a new call.

  4. The client calls the Answer packet to the server to accept the incoming call. The return value is a positive number that is the request identifier, or a negative number in case of error.

  5. The server calls the RemoteSPEventProc method of the client with the LINE_REPLY packet, which matches the request identifier previously returned for the Answer packet. A return value of 0 indicates that the call was answered successfully, or a negative number is returned on error.

  6. The client calls the BlindTransfer packet to the server to transfer the answered call. The return value is a positive number that is the request identifier, or a negative number in case of error.

  7. The server calls the RemoteSPEventProc method of the client with the LINE_REPLY packet, which matches the request identifier previously returned for the BlindTransfer packet. A return value of 0 indicates that the call was answered successfully, or a negative number is returned on error.

  8. The answered call has transitioned to the idle state upon successful blind transfer, so there is no need to drop the call. The client sends the DeallocateCall packet to release any resources on the server. The server closes the call, and the handle for this call is no longer valid. The server returns 0 if the DeallocateCall operation is successful, and a negative error number if an error occurs

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