Play Audio


The Play Audio verb is used to play an audio file within an active call. In the example below, when the call gets answered the audio file for 'holding' music is played followed by a beep audio file. Only supports .wav and .mp3 files.

Use Cases

Use Case BXML Code
Hangup Notification Play audio track "This call has been disconnected", then hangup(`</Hangup>')
Please Hold Play audio track, then call </Redirect> to avoid hangup and </Transfer> the call to the next available operator.


Change the audio file to your preferred track.

const baseUrl = ``;
const CALL_EVENTS = '/call-events';

const handleAnswerEvent = (req, res) => {
    if (req.query.eventType !== 'answer') {
    const bxml = `<?xml version="1.0" encoding="UTF-8"?>




app.get(CALL_EVENTS, handleAnswerEvent);

results matching ""

    No results matching ""