Introduction

Welcome to XBP’s Custom CallFlow XML documentation.

<Redirect>

Redirect example code

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Redirect>http://example.org/play-sounds.xml</Redirect>
</Response>

Redirect example, sending HTTP GET request.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Redirect method="GET">http://example.org/play-sounds.xml</Redirect>
</Response>

The <Redirect> Verb is used to transfer the control of a call at a different URL, which then starts processing the new XML response. Any elements after <Redirect> will not be processed.

<Redirect> Attributes

Attribute Name Allowed Values Default Value
method GET,POST POST

method

The ‘method’ attribute takes the value ‘GET’ or ‘POST’. This tells XBP whether to request the <Redirect> URL via HTTP GET or POST. ‘POST’ is the default.

<Play>

Playing remote audio file

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Play loop="3">https://s3.amazonaws.com/callflow/Venus-Isle.mp3</Play>
</Response>

Playing XBP local sound file

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Play loop="3">sound_file://953</Play>
</Response>

The <Play> verb plays an audio file back to the caller. XBP retrieves the file from a URL that you provide.

You can provide remote http(s) files as well as XBP local sound files. To use your local sound files you must use sound_file://<SOUND_FILE_ID>.

<Play> Verb Attributes

Attribute Name Allowed Values Default Value
loop integer >= 0 1

loop:

The ‘loop’ attribute specifies how many times the audio file is played. The default behavior is to play the audio once. Specifying ‘0’ will cause the <Play> verb to loop until the call is hung up.

Supported Sound Files

MIME Type Description
audio/mpeg mpeg layer 3 audio
audio/wav wav format audio
audio/wave wav format audio
audio/x-wav wav format audio
audio/aiff audio interchange file format
audio/x-aifc audio interchange file format
audio/x-aiff audio interchange file format
audio/x-gsm GSM audio format
audio/gsm GSM audio format
audio/ulaw μ-law audio format

<Dial>

Example <Dial> with all attributes

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial hangupOnStar="true"
        timeout="45"
        timeLimit="180"
        record="record-from-answer">
    <Number>408-123-4567</Number>
  </Dial>
</Response>

The <Dial> verb connects the current caller to another phone. If the called party picks up, the two parties are connected and can communicate until one hangs up. If the called party does not pick up, if a busy signal is received, or if the number doesn’t exist, the dial verb will finish.

When the dialed call ends, XBP makes a GET or POST request to the action URL if provided. Call flow will continue using the CallFlow received in response to that request.

<Dial> Verb Attributes

Attribute Name Allowed Values Default Value
hangupOnStar true, false false
timeout integer >= 0 30 seconds
timeLimit integer >= 0 infinity :)
callerId valid phone number Caller’s caller ID
record do-not-record, record-from-answer, record-from-ringing. For XBP (users) backward compatibility, true is an alias for record-from-answer and false is an alias for do-not-record do-not-record

timeout

The ‘timeout’ attribute sets the limit in seconds that waits for the called party to answer the call. Basically, how long should XBP let the call ring before giving up and reporting ‘no-answer’ as the ‘DialCallStatus’.

hangupOnStar

The hangupOnStar attribute lets the calling party hang up on the called party by pressing the * key on his phone. When two parties are connected using <Dial>, XBP blocks execution of further verbs until the caller or called party hangs up. This feature allows the calling party to hang up on the called party without having to hang up her phone and ending her CallFlow processing session. When the caller presses * XBP will hang up on the called party. If an ‘action’ URL was provided, XBP submits ‘completed’ as the ‘DialCallStatus’ to the URL and processes the response. If no ‘action’ was provided XBP will continue on to the next verb in the current CallFlow document.

timeLimit

The ‘timeLimit’ attribute sets the maximum duration of the <Dial> in seconds. For example, by setting a time limit of 120 seconds <Dial> will hang up on the called party automatically two minutes into the phone call. By default, there is an infinit limit set on calls.

record

The record attribute lets you record both legs of a call within the associated <Dial> verb. When using record-from-answer, the recording will begin when a call is answered. When using record-from-ringing, the recording will begin when the ringing starts. In both cases, a RecordingUrl parameter will be sent to the action URL on the associated <Dial> verb. You must set an action URL to receive the RecordingUrl.

<Number>

Simple number dialing, using sendDigits

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Number sendDigits="ww110W9">408-123-4567</Number>
  </Dial>
</Response>

Simultaneous dialing

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Number>408-123-4567</Number>
    <Number>949-123-4567</Number>
    <Number>415-123-4567</Number>
  </Dial>
</Response>

The <Dial> verb’s <Number> noun specifies a phone number to dial. Using the noun’s attributes you can specify particular behaviors that XBP should apply when dialing the number.

You can use up to ten <Number> nouns within a <Dial> verb to simultaneously call all of them at once. The first call to pick up is connected to the current call and the rest are hung up.

<Sip>

Dialing a Sip endpoint

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Sip>sip:888@conference.freeswitch.org</Sip>
  </Dial>
</Response>

Simultaneous Sip endpoint dialing

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Sip>sip:alice@example.org</Sip>
    <Sip>sip:bob@example.org</Sip>
    <Sip>sip:eve@example.org</Sip>
  </Dial>
</Response>

The <Dial> verb’s <Sip> noun lets you set up VoIP sessions by using SIP – Session Initiation Protocol. With this feature, you can send a call to any SIP endpoint. Set up your CallFlow to use the <Sip> noun within the <Dial> verb whenever any of your XBP phone numbers are called.

<Extension>

Example dialing a local XBP extension.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Extension>100</Extension>
  </Dial>
</Response>

The <Dial> verb’s <Extension> noun lets you dial local XBP extensions enabaling you to reach any defined destinations you have.

<Conference>

The <Dial> verb’s <Conference> noun is same as the verb. For more info please go to Conference verb section

The <Dial> verb’s <Conference> noun is same as the verb. For more info please go to Conference verb section

<Conference>

By default, the first caller to execute this CallFlow would join the conference room named Room 1234 and listen to the default waiting music. When the next caller executed this CallFlow, they would join the same conference room and the conference would start. The default background music ends, the notification beep is played and all parties can communicate.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Conference>Room 1234</Conference>
  </Dial>
</Response>

Join a Conference Muted: This code allows forces participants to join the conference room muted. They can hear what unmuted participants are saying but no one can hear them

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Conference muted="true">Room 1234</Conference>
  </Dial>
</Response>

Joining a conference with PIN set.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Conference pin="6699">Room 1234</Conference>
  </Dial>
</Response>

Recording a conference

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Conference record="record-from-start">Room 1234</Conference>
  </Dial>
</Response>

The <Dial> verb’s <Conference> noun allows you to connect to a conference room. Much like how the noun allows you to connect to another phone number, the <Conference> noun allows you to connect to a named conference room and talk with the other callers who have also connected to that room.

The name of the room is up to you and is namespaced to your account. This means that any caller who joins ‘room1234’ via your account will end up in the same conference room, but callers connecting through different accounts would not. The maximum number of participants in a single XBP conference room is 40.

By default, XBP conference rooms enable a number of useful features used by business conference bridges:

<Conference> Verb Attributes

Attribute Name Allowed Values Default Value
muted true, false false
pin any digits no pin is set
maxParticipants positive integer >= 2 40
record do-not-record or record-from-start do-not-record

<Pause>

Simple pause example

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Play>https://s3.amazonaws.com/callflow/Venus-Isle.mp3</Play>
  <Pause length="2"/>
  <Play>sound_file://110</Play>
</Response>

Delayed pickup

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Pause length="6"/>
  <Dial>
    <Number>408-123-4567</Number>
  </Dial>
</Response>

The <Pause> verb waits silently for a specific number of seconds. If <Pause> is the first verb in a CallFlow document, XBP will wait the specified number of seconds before picking up the call.

<Pause> Verb Attributes

Attribute Name Allowed Values Default Value
length integer > 0 1 second

<Hangup>

The <Hangup> verb ends the call.

Hanging up a call

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>
    <Hangup/>
  </Dial>
</Response>