Call Commands
Play audio URL
Play an audio file on the call. If multiple play audio commands are issued consecutively, the audio files will be placed in a queue awaiting playback.
Notes:
- When overlay is enabled, target_legs is limited to self.
- A customer cannot Play Audio with overlay=true unless there is a Play Audio with overlay=false actively playing.
Expected Webhooks:
- call.playback.started
- call.playback.ended
post/calls/{call_control_id}/actions/playback_start
Path parameters
call_control_idstring required
Unique identifier and token for controlling the call
Request body
Example request
{
"audio_url": "http://www.example.com/sounds/greeting.wav",
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"command_id": "891510ac-f3e4-11e8-af5b-de00688a4901",
"loop": "infinity",
"overlay": true,
"stop": "current",
"target_legs": "self"
}Response
Successful response upon making a call control command.
Example response
{
"data": {
"result": "ok"
}
}