Call Command

 

Call Commands are instructions your application sends to your VoiceShot campaign.  Call Commands are formatted in XML.  A Call Command is sent in response to a Call Event, however it is not necessary to respond with a Call Command every time you receive a Call Event.

 

Call commands consist of a <prompt> element and the following attributes:

 

Attribute

Description

<...goto= ...>

Directs the call flow to an API prompt.

<...filename= ...>

Tells the campaign which sound file to play.

<...tts= ...>

Gives the campaign a text to speech string to speak.

<...transferto= ...>

Transfers the person on the phone to a different phone number.

<...dtmf= ...>

Plays DTMF tones.

Table 1: Call Command attributes

 

 

Example 1: Going to an API prompt

<prompt goto="2" />

 

Example 2: Playing a sound file

<prompt goto="6" filename="imsorry.wav" />

 

Example 3: Speaking text

<prompt goto="7" tts="Your package is scheduled for delivery on Monday" />

 

Example 4: Transferring a call

<prompt transferto="8182238964" />

 

Example 5: Playing DTMF

<prompt dtmf="100" goto="2" />

 

Example 6: Sample Call Event / Call Command exchange for an inbound campaign

Developer's Application

HTTP/

HTTPS 

VoiceShot

   

Call is Answered.  Answer Call Event is sent

Developer's application knows a call has come in.

<campaign menuid="1-3" callid="217356" action="4" callerid="8182238964"/>

   

At the first prompt, the caller keys in "1234".  Prompt Call Event is sent.

Developer's application compares key presses against database.  Call Command is sent.

<prompt menuid="1-3" callid="217356" promptid="1" keypress="1234"/>

<prompt goto="2" />

Call continues at prompt id 2.

   

When call is over, a Hang-up Call Event is sent

Developer's application knows a call has ended.

<campaign menuid="1-3" callid="217356" action="5" duration="53"/>