Transfer call
Transfer a call to a new destination. If the transfer is unsuccessful, a call.hangup webhook for the other call (Leg B) will be sent indicating that the transfer could not be completed. The original call will remain active and may be issued additional commands, potentially transfering the call to an alternate destination.
Expected Webhooks:
- call.initiated
- call.bridged to Leg B
- call.answered or call.hangup
- call.machine.detection.ended if answering_machine_detection was requested
- call.machine.greeting.ended if answering_machine_detection was requested to detect the end of machine greeting
- call.machine.premium.detection.ended if answering_machine_detection=premium was requested
- call.machine.premium.greeting.ended if answering_machine_detection=premium was requested and a beep was detected
Path parameters
Unique identifier and token for controlling the call
Request body
Example request
{
"to": "+18005550100 or sip:username@sip.telnyx.com;secure=srtp",
"from": "+18005550101",
"from_display_name": "Company Name",
"audio_url": "http://www.example.com/sounds/greeting.wav",
"send_digits_on_answer": "wwww200",
"timeout_secs": 60,
"time_limit_secs": 60,
"webhook_url": "https://www.example.com/server-b/",
"webhook_url_method": "POST",
"answering_machine_detection": "detect",
"answering_machine_detection_config": {
"total_analysis_time_millis": 5000,
"after_greeting_silence_millis": 1000,
"between_words_silence_millis": 1000,
"greeting_duration_millis": 1000,
"initial_silence_millis": 1000,
"maximum_number_of_words": 1000,
"maximum_word_length_millis": 2000,
"silence_threshold": 512,
"greeting_total_analysis_time_millis": 50000,
"greeting_silence_duration_millis": 2000
},
"custom_headers": [
{
"name": "head_1",
"value": "val_1"
},
{
"name": "head_2",
"value": "val_2"
}
],
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"command_id": "891510ac-f3e4-11e8-af5b-de00688a4901",
"early_media": true,
"media_encryption": "SRTP",
"sip_auth_username": "username",
"sip_auth_password": "password",
"sip_headers": [
{
"name": "User-to-User",
"value": "value"
}
],
"sip_transport_protocol": "TLS"
}Response
Successful response upon making a call control command.
Example response
{
"data": {
"result": "ok"
}
}Changes
Changed in 5 of the 99 revisions of this API.810
- ○
added the new optional request property
/new-optional-request-property
- ○
added the new optional request property
/new-optional-request-property
- ○
added the new optional request property
/new-optional-request-property
- ○
added the new optional request property
/new-optional-request-property
- ○
added the new optional request property
/new-optional-request-property
- ○
added the new optional request property
/new-optional-request-property
- ○
added the new optional request property
/new-optional-request-property
- ○
- ○
added the new optional request property
/new-optional-request-property
- ○
added the new optional request property
new-optional-request-property
This revision also has 34 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ▲
the
/request property type changed fromstringtoarray, and format fromurito no formatrequest-property-type-changed
- ▲
the response's body type changed from
objectto no type for statusresponse-body-type-changed
- ▲
the
/response's property type changed fromobjectto no type for statusresponse-property-type-changed
- ▲
the
//response's property type changed fromintegertostring, and format fromint32tointegerfor statusresponse-property-type-changed
This revision also has 64 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
the response's body type changed from no type to
objectfor statusresponse-body-type-changed
- ▲
the
/response's property type changed from no type toobjectfor statusresponse-property-type-changed
- ▲
the
//response's property type changed fromstringtointeger, and format fromintegertoint32for statusresponse-property-type-changed
- ▲
the
///response's property format changed fromjson-pointerto no format for statusresponse-property-type-changed
This revision also has 41 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
added the new optional request property
new-optional-request-property
- ○
Of the 99 revisions, 1 has no diff computed.