Step 15: Call Holds and Transfers

The SIP protocol provides a REFER request to transfer calls. Upon receipt of such a request, the subscriber device makes a call to the specified direction. The server transfers the REFER request and related responses and related requests from one device to another.

Each call goes through the B2B role on one of the servers. Recall that this is one of the B2B on the site that received the incoming INVITE request from the subscriber who initiated the call. Looking slightly ahead it is worth noting that the subscriber can be either an internal user and thus his device, or anyone else - an external subscriber or an internal service. From the point of view of the B2B role in terms of call servicing, the type of subscriber does not matter. Therefore, the cases and their corresponding model diagrams considered in the current step do not mention SG or any other roles.

Three participants are considered: Alice (A), Boris (B), Catherine ©.

Retention

Case: Alice is communicating with Boris. From her phone, she places Boris on hold. Boris hears a ringtone on hold. Alice then brings Boris back into the conversation. To do this on her phone, she presses HOLD to place him on hold and presses HOLD again to remove him from hold.

During the hold time, the waiting subscriber hears the waiting tones played by the server.

1. Active dialog

2. HOLD

3. Retention

hold_01
hold_02
hold_03

4. HOLD (Unhold)

5. Active dialog

hold_04
hold_05

Transfer to a number

Case: Alice communicates with Boris. Alice transfers Boris to Catherine’s number from her phone. To do this, she presses TRAN on her phone, dials Catherine’s number, and presses it again TRAN.

1. Active dialog

2. TRAN, Number, TRAN

3. Boris’s device is making the call

refer_num_01
refer_num_02
refer_num_03

4. Catherine’s answer

5. Alice’s device completes the dialog

6. Catherine’s active dialog with Boris

refer_num_05
refer_num_06
refer_num_07

Consultation call

Case: Alice communicates with Boris. Alice makes a call to the consultant Catherine during the conversation, talks to her, and then returns to the conversation with Boris. To do this, she presses TRAN on her phone, dials the consultant's number, presses CALL or waits for an autocall. After the conversation with the consultant Catherine ends, the conversation is terminated by one of the parties and Alice uses HOLD to return to the conversation with Boris.

1. Active dialog

2. TRAN

3. Numb CALL

consult_01
consult_02
consult_03

4. Catherine’s answer

5. Alice’s active dialog with Catherine

6. Catherine completes

consult_04
consult_05
consult_06

7. Boris is on hold

8. HOLD

9. Alice’s active dialog with Boris

consult_07
consult_08
consult_09

transfer with substitution

Case: Alice communicates with Boris. Alice makes a call to Catherine in the course of the conversation, after which she connects Boris and Catherine to each other and frees herself. To do this on her phone, she presses TRAN, dials Catherine's number, presses CALL or waits for an autocall. After Catherine answers, and possibly after Catherine confirms that she is ready to connect to Boris, Alice presses TRAN TRAN.

1. Active dialog

2. TRAN

3. Number, Call

refer_replace_01
refer_replace_02
refer_replace_03

4. Catherine’s answer

5. Alice’s active dialog with Catherine

6. TRAN

refer_replace_04
refer_replace_05
refer_replace_06

7. Boris’s device is making the call

8. Barbara’s device is tampering with the call

9. Alice’s device completes the dialog

refer_replace_07
refer_replace_08
refer_replace_09

10. Active dialog between Boris and Catherine

refer_replace_10

Since each B2B dialog is represented by two SIP dialogs - arm A and arm B, it is important to ensure that the correct arm is substituted when spoofing. Without this, the Barbarian device will not be able to detect the spoofed dialog, and the spoofing will not occur - instead, the device will either refuse the call or make a second call reception. The problem exists insofar as Alice’s device knows only its shoulder A about the dialog with Catherine, and its identifiers differ from shoulder B, i.e., from what Catherine’s device knows about the same dialog. Alice’s device sends a REFER request with a swap, specifying the parameters of its shoulder A of the dialog with Catherine as the swap, while Catherine’s device requires the parameters of shoulder B of the same dialog for a successful swap.

The B2B role solves this problem on its own by direct communication between its instances (without regard to the sites on which they reside). Either at the moment of REFER+replaces request transfer, or at the moment of INVITE+Replaces processing, the B2B role instance makes a direct request to the adjacent B2B role instance, where the target dialog is served, and uses it to modify the shoulder identifiers.

During REFER+replaces During INVITE+Replaces
replaces_1
replaces_2

The target B2B (in the B2B-2 instances) is discovered directly. Each instance of B2B conducting a call through itself to each of the shoulders places "talking" identifiers. A To-Tag is generated for shoulder A, and a From-Tag and Call-ID are generated for all shoulders B. Each of the generated values contains data from which the address of the B2B instance that made the generation can be identified using configuration. Thus, to replace the ID values of one arm with those of another arm, it is sufficient to have both From-Tag and To-Tag, use them to find out the serving B2B instance, and use it to make the replacement. This is how the function works. In the REFER query, the Replaces attribute contains the Call-ID, From-Tag, To-Tag. And in the INVITE request, the Replaces, Refer-To headers contain the same shoulder IDs, and possibly an attribute of the already performed replacement.

Tracking the success of the transfer

Case: Alice communicates with Boris. Alice transfers Boris from her phone to Catherine’s number. Catherine rejects the call, Boris returns to the connection with Alice. To do this on her phone, she presses TRAN, dials Catherine's number, and presses TRAN again. This frees Alice, but her phone subscribes to the transfer operation events sent by Boris's phone. When she receives a failure event, Alice's phone rings again and Alice answers the call and connects to Boris.

The SIP protocol and its extensions define the provision of such behavior of devices. The device from which the transfer is initiated performs the subscription, and the device performing this transfer notifies the subscriber about the state of the redirected call - broadcasts to it the responses received from the third party to the INVITE sent by it. This interaction takes place within the framework of the dialog whose transfer is being performed.

Thus, one device within this dialog sends a REFER request to the opponent, and the opponent sends NOTIFY requests in the opposite direction, translating all received responses. Only after receiving a NOTIFY with a translated response of 200 OK, the transfer initiator device terminates the dialog being translated. Accordingly, upon receiving a NOTIFY with a final failed response, the initiator device reconnects in the translated dialog. If it is a device (telephone), it is in passive mode the whole time after sending a REFER request. If the handset is lying on the phone, the phone starts calling its user and only then connects in the translated dialog.

The B2B role translates REFER and NOTIFY requests and their responses.

transfer between sites

Case: Alice, Boris and Catherine’s devices are connected to different sites. Alice calls Boris, Boris makes a consultation call to Catherine and performs a transfer of Alice to Catherine with a switch.

What happens to the media servers (roles MGC, MG, BGMG)? As parsed in step 11, each instance of the B2B role connects a MG media server to each dialog it serves via the MGC media controller. The MGC and MG are selected within the same site as the instance B2B.

multisite_refer

The scheme shows that in any B2B dialog regardless of whether, * what types of subscribers are involved - internal users, external subscribers or internal services, * which domains the subscribers belong to, * what configuration of sites is set up, * how the dialog is created - by direct call, transfer to number or transfer with substitution, the dialog is serviced by a SIP server (B2B role) and a media server (MG role) located at one of the sites to which the participants of this dialog are connected.

Thus provided the media servers within a site are indistinguishable, traffic is always carried over the shortest possible route. SIP signaling is sent through 3 servers, RTP traffic is sent through 1 media server if networks are visible and through 2 or 3 if media traffic needs to be broadcast from one subnet to another at the edge (step 14). With sites in Lisbon, Paris and Rome, if a subscriber from Paris calls to Lisbon - served by Paris servers, a consultation call from Lisbon to Rome is served by Lisbon servers, a transferred call from Paris to Rome will be served by Paris servers. And in case of reverse transfer of a subscriber from Rome to a subscriber from Paris - their dialog will be serviced by Rome servers.

Table 1. Terms used
term Determination

HOLD

!

REFER

!

Retention

!

Transfer to a number

!

transfer with substitution

!

Talking ID

!