Call Events

 

A Call Event is information sent from your campaign to your application.  Call Events are formatted in XML.  A Call Event is sent over HTTP/HTTPS to a URL.  Call Events are sent during a phone call.  Call Events can be combined with Call Commands to enable a real-time two way communication during a phone call between your campaign and your application.

 

To enable Call Events, enter the URL to which you want the Call Events sent:

 

Figure 1: Enabling Call Events

 

 

When enabled for inbound campaigns, Call Events are sent on the following events:

 

Event

Element

Attributes

Answer

<campaign>

<...menuid= ...callid= ...action= ...callerid= ...>

Keypress (optional)

<prompt>

<...menuid= ...callid= ...promptid= ...keypress= ...>

Hangup

<campaign>

<...menuid= ...callid= ...action= ...duration= ...>

Table 1: Call Events for inbound campaigns

 

 

When enabled for outbound campaigns, Call Events are sent on the following events:

 

Event

Element

Attributes

Keypress (optional)

<prompt>

<...menuid= ...callid= ...promptid= ...keypress= ...>

Table 2: Call Events for outbound campaigns

 

 

Example 1: Connect Call Event

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

 

Example 2: Keypress Call Event

<prompt menuid="1-3" callid="213167" promptid="2" keypress="10000000"/>

 

Example 3: Hangup Call Event

<campaign menuid="1-3" callid="213167" action="5" duration="24"/>

 

Example 4: 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"/>

 

 

Note on Security

A combination of secure and authenticated communications can be used between VoiceShot and your application.  If the Call Events URL you enter in your VoiceShot account begins with "HTTPS://", VoiceShot will use industry standard Secure Socket Layer (SSL) encryption to send your Call Events.  Additionally, you can require username and password authentication in order for VoiceShot to access your Call Events URL.  If you do, you will need to enter the username and password in your VoiceShot account so VoiceShot will be able to log in to the Call Events URL you provide.  The authentication type used is basic authentication.  Normally in basic authentication, the login credentials are placed in the HTTP header in clear text.  However, when combined with HTTPS, the login credentials are sent over the secure channel.