The External Call Transfer scenario happens when your SIP endpoint receives an inbound call from PSTN through Telnyx and then transfers that call to an outside number, keeping the original PSTN number as the originator.
From a Telnyx perspective, these are two different calls, and the transferred call by itself is considered an outbound call from a non-Telnyx number.
Telnyx has implemented a mechanism to handle External Call Transfer scenarios so that these outbound calls are automatically allowed and routed to the destination.
This guide explains how Telnyx validates these transfers to keep your calls secure and properly authenticated.
Overview
If you receive calls via your SIP endpoint through a Telnyx SIP trunk and need to transfer a caller to an external destination, your endpoint will initiate a new outbound call to that number. Telnyx then verifies that this outbound call is tied to the original inbound call.
How the Flow Works
How the Flow Works
Caller A dials your Telnyx number B.
The call is delivered by Telnyx to your SIP endpoint, from A to B.
Your SIP endpoint decides to transfer the call to number C.
Your endpoint places a new outbound call, from A to C.
This outbound call must include proper diversion information to indicate that it’s a transfer of the original inbound call from A to B for it to be automatically allowed by Telnyx.
What Telnyx Checks
To allow the External Call Transfer, Telnyx performs two validations when it receives an outbound call attempt:
Active inbound call match.
Telnyx confirms that there is an active inbound call from A to B.
Presence of Diversion Headers.
The new outbound call from A to C must include a SIP Diversion header showing B.
When the Transfer Is Rejected
If the Diversion header is missing or incorrect, or Telnyx cannot match the outbound call to an active inbound call, Telnyx will reject the request.
This prevents unauthorized or spoofed calls from being placed using your number.
Programmable Voice
It is possible to transfer an inbound call to the Telnyx network to an external PSTN number using Programmable Voice while preserving the non-Telnyx origination number, and there are different mechanisms to do this:
Voice API Transfer Command
A Voice API Transfer command instructs Telnyx to transfer an established inbound call to a new destination. In that case the non-Telnyx origination number is allowed.
A Voice API Dial request triggers a new outbound call, and if that request is bridged to an existing inbound call then the non-Telnyx origination number is allowed.
For the Dial request to be considered a bridge it should contain the following parameters:
link_toparameter set tocall_control_idof the bridging callbridge_intentparameter set totrue
TeXML <Dial> Command
TeXML <Dial> instructs Telnyx to place a new outbound call and connect it to the existing inbound call. In that case the non-Telnyx origination number is allowed.
