Play audio on a call

POST https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/Play/

This endpoint allows you to play an audio file during an active call. The audio file formats supported are .mp3 and .wav

Below is the list of arguments that can be passed in this API request, more information can be found here

ArgumentsDescriptionRequired/Conditional/Optional
urlsA single URL or a list of comma separated URLs linking to an .mp3 or .wav file.Required
lengthThis is the maximum length to which playing this audio file should be restricted to. Length is provided in seconds.Optional
legsThe call leg in which the audio has to be played. This can take three values aleg (first leg of the call), bleg(second leg of the call) or both. The default value is aleg.Optional
loopThis flag when set to true will play the audio file indefinitely. By default it is set to false.Optional
mixThis flag is used to determine the behaviour of current call audio when the file is being played. If this is set to false then participants of the call would not be able to hear anyone speaking in the call until the Play is stopped. If set to true both call audio and the Play audio will be mixed and played. Defaults to true.Optional

Request Body

{"urls"=>"https://s3.amazonaws.com/plivocloud/music.mp3", "length"=>"10", "legs"=>"aleg", "loop"=>"false", "mix"=>"true"}