Transfer call
Changed onTransfer 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
- call.machine.premium.call_screening.detected if answering_machine_detection=premium_ios_call_screening_detection was requested and an Apple Call Screening tone was detected
Request
- Base URLhttps://api.telnyx.com/v2
- URLhttps://api.telnyx.com/v2/calls/{call_control_id}/actions/transfer
- AuthHTTP bearer
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
- breaking
the
/request property type changed fromstringtoarray, and format fromurito no format - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
- info
added the new optional request property
- info
added the new
premium_ios_call_screening_detectionenum value to the request property
- breaking
- info
added the new optional request property
- info