Call

/v0.1/SchedulePlay/

Schedules media playback for a specific call

post/v0.1/SchedulePlay/

Request

Request body application/x-www-form-urlencoded

CallUUIDstring required

Unique identifier of the call to play media into

Soundsstring required

Comma separated list of file paths/URIs to be played

Timeinteger required

Time (in seconds) after which the media will be playedback

Legs'aleg' | 'bleg' | 'both'

Call leg(s) for which the media will be played; aleg refers to the initial call leg, bleg refers to the bridged call leg, if applicable.

Lengthinteger

Maximum amount of time (in seconds) to playback the media

Loopboolean

Loops the media file(s) indefinitely

Mixboolean

Whether the media should be mixed with the call's audio stream

Example request

{
  "CallUUID": "e69b32da-3243-4ba6-a965-5d2f64a57d48",
  "Sounds": "/tmp/prompt.wav",
  "Time": 29,
  "Legs": "both",
  "Length": 90,
  "Loop": true
}

Response

Response

Message'Play Executed' | 'CallUUID Parameter Missing' | 'Sounds Parameter Missing' | 'Time Parameter Missing' | 'Time Parameter must be > 0' | 'Legs Parameter is Invalid' | 'Length Parameter must be a positive integer' | 'Sounds Parameter is Invalid' | 'Play Failed -- Call not found' | 'Play Failed' required

Response message

Successboolean required

Whether the request was successful or not

SchedPlayIdstring required

Unique identifier of the scheduled playback request (UUIDv4)

Example response

{
  "Message": "Play Executed",
  "Success": true,
  "SchedPlayId": "b2d1da90-c364-42e4-818a-2eb90a474729"
}

Changes

No recorded changes to this operation across all 1 revision of this API.