Outbound Posts

 

The VoiceShot API establishes a communication pathway between your application and VoiceShot for commands and data exchange.  The commands and data are formatted in XML and the protocol used is HTTP or HTTPS.

 

In some instances, VoiceShot posts data to your application.  Examples of this are Call Events and Call Summaries.  Other times, you will want to post data to VoiceShot to initiate, pause or delete outbound calls or manage sound files through outbound posts.

 

Outbound posts are sent to one of the following URLs:

 

http://api.voiceshot.com/ivrapi.asp

https://api.voiceshot.com/ivrapi.asp

 

Outbound posts contain one or more of the following elements:

 

Element

Required

Description

<campaign>

Top level element.  Contains campaign specific attributes.

<phonenumbers>

Optional

Defines a block of phone numbers that will be called for an outbound campaign.  Required for all outbound calls.

<prompts>

Optional

Defines a block prompt options such as TTS to speak or filenames to play.

<file>

Optional

Sends, receives or deletes sound files.

Table 1: Outbound posts elements

 

 

Example 1: Sending Calls

 

Below is the Outbound Alert Example:

 

Figure 1: Campaign with a single message

 

 

Post the following XML to VoiceShot, substituting your values for menuid and number:

 

<campaign menuid="1-1234" action="0">

   <prompts>

      <prompt promptid="1" tts="Web server 1 is down." />

   </prompts>

   <phonenumbers>

      <phonenumber number="8185550100" />

      <phonenumber number="8185550117" />

      <phonenumber number="8185550152" />

   </phonenumbers>

</campaign>

 

You can also move the the prompts element inside the phonenumber element if you want to specify different prompt options for each phone number.

 

<campaign menuid="1-1234" action="0">

   <phonenumbers>

      <phonenumber number="8185550100" >

         <prompts>

            <prompt promptid="1" tts="Web server 1 is down." />

         </prompts>

      </phonenumber>

      <phonenumber number="8185550117" >

         <prompts>

            <prompt promptid="1" tts="Web server 2 is down." />

         </prompts>

      </phonenumber>

      <phonenumber number="8185550152" >

         <prompts>

            <prompt promptid="1" tts="Web server 3 is down." />

         </prompts>

      </phonenumber>

   </phonenumbers>

</campaign>

 

 

Example 2: Pausing Calls

 

<campaign menuid="1-1234" action="7" />

 

 

Example 3: Deleting Pending Calls

 

<campaign action="2" menuid="1-1234">

   <phonenumbers>

      <phonenumber callid="001" />

      <phonenumber callid="002" />

      <phonenumber callid="003" />

   </phonenumbers>

</campaign> 

 

 

Example 4: Uploading a Sound File

 

<campaign action="1">

<file xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64" filename="hello.wav" fileaction="save">UklGRmZGAABXQVZFZm10IBIAAAABAAEAgD4AAAB9AAACABAAAABmYWN0BAAAAKAPAABkYXRh

QB8AAAgAIAAoACAAGAAgAFAAOAAwAEgAIAAoABgACAAgADgASAAYABgAGAD4//j/8P/I/7j/ uP/A/+D/mP+Y/7j/oP+g/4j/mP9o/1j/eP9Y/1j/YP8w/zD/WP9A/1D/SP9Y/1j/YP9o/3j/ oP+Q/7j/oP+Q/5j/wP/I/6j/6P/g//j/KAAQAEAASABAAEAAQABoAGAAmACAAHgAqAC4AMgA uADIALgA4AD4AOAAAAEAAfgA2AAAAQgB6ADQAMAA2ADIANgAyACYAKgAiABwAEgAQAAoABgA IPlA+YD5wPkg+kD6oPrg+gD7QPuA+wD8IPyA/OD8IP1g/YD9wP0A/mD+gP7A/iD/YP+g/+D/ AAAAAIAAAAFgAeABAAJgAiACIAMgAKD8AAHAAiADwAQABaAF4AVABkAGQAaABgAGgAUgBWAF IAVgBOAEIAUABQAFoASABMADoANgA0ADgANAA2ADAAOgAmAC4AGgAaABAAIAAsABoAEAAcAA YADA/2D/wP5A/qD9oPwg/ED7gPog+sD5YPkg+QD5oPiA+ID4QPhA+KD4YPkA+oD6oPrg+iD7 IPuA+wD8QPyg/OD8YP2g/cD94P0A/kD+oP6g/iD/YP9A/6D/oP/g/2</file> 

</campaign>

 

 

Example 5: Deleting a Sound File

 

<campaign action="1">

   <file filename="hello.wav" fileaction="delete"/>

</campaign >

 

 

Example 6: Call Query

 

<campaign action="3" menuid="1-1234">

   <phonenumbers>

      <phonenumber callid="" />

   </phonenumbers>

</campaign>