Call transfer enables you to move an active call from one endpoint to another. Twilio's Elastic SIP Trunking product supports "blind" call transfers. This means you're now able to request a call be transferred by sending Twilio a SIP REFER message from your SIP communications infrastructure. Twilio will serve as the pivot-point and handle the call redirect thereby allowing you to free up resources in your IP communications infrastructure that are no longer needed.
Call transfers are enabled on a per-Trunk basis, this enables transfers to any SIP destination. Optionally, you may also enable call Transfers to the PSTN.
To start transferring calls, you can configure call transfers using Twilio Console or API.
For Console, log into Twilio Console, and navigate to an existing Elastic SIP Trunk (or create a new Elastic SIP Trunk):
Place a call via your Elastic SIP Trunk; once established, initiate a call transfer from your phone. Twilio will receive that request & transfer your call. Check your Twilio Call Log in the Console to confirm the transfer worked as requested and to see all relevant call details.
Let's start with an active Elastic SIP Trunking Call established from your PBX/SBC via Twilio to the PSTN.
The players are:
Everything kicks off with the SIP REFER message from your PBX/SBC towards Twilio. Within the SIP REFER is a Refer-to header (designating a new SIP endpoint as the Transfer-target). Upon receiving the SIP REFER, Twilio returns a 202 Accepted response to your PBX/SBC. This informs you that Twilio is willing to carry out the transfer.
The original call is placed on hold (not shown in the call flow).
The SIP REFER creates a quasi-subscription between the Transferor (your PBX/SBC) and Twilio. Even though there wasn't a SIP SUBSCRIBE message sent, for the duration of the transfer, Twilio will act as if such a subscription exists.
Twilio sends a SIP INVITE to the new SIP endpoint which processes the SIP INVITE as a normal, incoming call. At this time, Twilio will send SIP NOTIFY messages to inform the Transferor of the status (100 Trying, 200 OK
) of the new call from Twilio to the new SIP endpoint.
Once the new call is answered, the Transferor will terminate the existing, held call to the original SIP endpoint.
Please note that early media with Call Transfers is not supported.
Twilio allows you to set the caller ID for call transfer use cases using the console. Select the Trunk of your choice, in the "General section" under "Call Transfer (SIP Refer)" you can see "Caller ID for Transfer Target". The default value is Transferee
and you can change to Transferor
based on your use cases. You can also configure the same using the API.
In order to transfer a call to the PSTN you must include your Trunking Termination Domain for example sip:+14152908007@{my-trunk}.pstn.twilio.com
or alternatively use a Tel-URI for example tel:+14152909007
in the Refer-To header.
Call Transfers to Emergency Services (911/933) are not supported.
If you look at your Elastic SIP Trunking call logs, you'll notice that the Original Call has a "Child Call" representing the new call established as a result of the requested Call Transfer.
Initiating a Call Transfer via your Elastic SIP Trunk is free, however you'll continue to be responsible for the per-minute Trunking charges to the referred-to destination on your account.
Please refer to the following tables to understand the details around Billing and Call Logs:
Transfer Scenario | Parent Call Billing | Parent Call Log | Child Call Billing | Child Call Log |
---|---|---|---|---|
Trunking Termination (from:A to:B) Transfer to SIP (to:C) | Trunking Termination (from:A to:B) x Parent call duration | from:A to:B | Trunking Termination (from:C to:B) x Child call duration | from:B to:C |
Trunking Termination (from:A to:B) Transfer to PSTN (to:C) | Trunking Termination (from:A to:B) x Parent call duration | from:A to:B | Trunking Termination (from:A to:B) x Child call duration + Trunking Termination (from:A to:C) x Child call duration | from:B to:C |
Transfer Scenario | Parent Call Billing | Parent Call Log | Child Call Billing | Child Call Log |
---|---|---|---|---|
Trunking Origination (from:A to:B) Transfer to Public SIP (to:C) | Trunking Origination (from:A to:B) x Parent call duration | from:A to:B | Trunking Origination (from:A to:C) x Child call duration | from:A to:C |
Trunking Origination (from:A to:B) Transfer to PSTN (to:C) | Trunking Origination (from:A to:B) x Parent call duration | from:A to:B | Trunking Origination (from:A to:B) x Child call duration + Trunking Termination (from:B to:C) x Child call duration | from:A to:C |