Skip to main content

How to Transfer a Call

In this guide we will show you how to transfer an incoming call.

Transferring calls allows you to transfer the caller to the right person rather than them hanging up and calling a different number, providing an excellent tool for customer service.

Transfer an incoming call

The <Transfer> verb is used to transfer a party onto an existing call.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Transfer>
<PhoneNumber>+11234567892</PhoneNumber>
</Transfer>
</Response>

Above is a basic transfer scenario where an inbound call is transferred to a different phone number (+11234567892) instead of the number called.

Transfer a Call with an Announcement and Different Caller Id

While transferring a call you can also combine this with an announcement using our text-to-speech service with the transferAnswerUrl verb.

When the called party answers, if the transferAnswerUrl is specified, the Transfer Answer callback is sent to the transferAnswerUrl and the BXML returned by that callback is executed. That BXML is executed only for the called party. At the conclusion of that BXML, the calls are bridged.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<SpeakSentence>Thank you for calling Scrooge and Marley! Please hold while we connect you to an associate.</SpeakSentence>
<Transfer transferCallerId="+15555555555">
<PhoneNumber transferAnswerUrl="/announcement">+15555555554</PhoneNumber>
</Transfer>
</Response>

> The announcement endpoint response from `/announcement` is:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<SpeakSentence>Hey! There's a customer on the line.</SpeakSentence>
</Response>

This announcement will be played on the call for the called party before it is bridged.

Where to next?

Now that you have learnt how to transfer an inbound call, check out some of the available actions in the following guides: