Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Define how verbs should react and callback and continue

Notifications You must be signed in to change notification settings

Bandwidth/bxml_verb_clarity

Repository files navigation

BXML Verb Clarity

Verbs

Verb Description Comments
<Call> The Call verb is used to create call to another number. To be implemented
<Gather> The Gather verb is used to collect digits for some period of time.
<Hangup> The Hangup verb is used to hangup current call.
<Pause> Pause is a verb to specify the length of seconds to wait before executing the next verb.
** This feature is coming soon**
To be implemented
<PlayAudio> The PlayAudio verb is used to play an audio file in the call.
<Record> The Record verb allows call recording. At the end of the call, a call recording event containing the media with recorded audio URL is generated
<Redirect> The Redirect verb is used to redirect the current XML execution to another URL.
<Reject> The Reject verb is used to reject incoming calls.
**This feature is coming soon. **
To be implemented
<SpeakSentence> The SpeakSentence verb is used to convert any text into speak for the caller.
<Transfer> The Transfer verb is used to transfer the call to another number.

Events/Callbacks

Event Description
Answer Event Bandwidth API sends this message to the application when the call is answered.
Gather event Bandwidth API generates a gather event when the gather command completes in a call.
Hangup Event Bandwidth API sends this message to the application when the call ends.
Incoming Call Event Bandwidth API sends this message to the application when an incoming call arrives. For incoming call the callback set is the one related to the Application associated with the called number.
Recording event Bandwidth API sends this event to the application when an the recording media file is saved or an error occurs while saving it.
Redirect event Bandwidth API sends this event to the application when a <Redirect> is requested
Incoming SMS event Bandwidth API sends this event to the application when an SMS is sent to the Bandwidth Number assigned to an application
Transfer Complete Event Bandwidth API sends this event to the application when the <Transfer>is complete

Use cases

How would I accomplish these common use cases with BXML

Scenario 1: Transfer and survey

Common use case is to have a customer enter an IVR to direct them to a customer service rep. Once the rep handles the call, they hangup and then send the original caller to an optional survey. This requires that the incoming call stays alive after the transfered call completes.

  1. Incoming call, reply with <Gather> BXML to direct to correct department
  2. Receive the Gather callback
    1. The reply may have a BXML for another to be able to build the IVR system.
  3. Reply with <Transfer> BXML based on customer response.
  4. Customer and rep talk
  5. Rep hangs up. Receive the transferComplete event
  6. Reply with <Gather> BXML to get feedback

Scenario 2: Transfer and voicemail

Common use case is to transfer a call, if the transfer times out send the original caller to voicemail

  1. Incoming call, reply <Transfer> BXML with callTimeout set
  2. Receive the transferComplete event when transfered call doesn't answer
  3. Reply with <SpeakSentence> and <Record> BXML to get voicemail
  4. (Customer hangsup? or do we hangup? how do we determine when to end the call after record?)
  5. Receive Recording and Hangup event.

About

Define how verbs should react and callback and continue

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published