Skip to main content

Play Audio File (Play)

The Play command can fetch and play audio files from URLs.

Play Track

The Play command creates a Play Track for sending audio. The start and end of the Play Track will trigger Track Start and Track End events respectively.

The playId in the TrackEnd event is the url of the Play command, which can be used to get playback completion notifications.

Play Command Parameters

url

URL of the audio file to play. Supports http and https addresses, supports wav and mp3 formats.

autoHangup

Set autoHangup=true to automatically hang up after playback completes.

waitInputTimeout

Set waitInputTimeout, when exceeding waitInputTimeout milliseconds with no audio input, will trigger Silence event.