Skip to content

dtolb/bandwidth-ivr-webinar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bandwidth IVR Webinar Starter

Basic IVR Flow for use with Bandwidth APIs

IVR Webinar Pre-reqs

What we're going to cover

  1. Ordering a Phone Number
  2. Setting up an application
  3. Speaking to the caller with BXML SpeakSentence
  4. Request the caller to press a digit with BXML Gather
  5. Forwarding the caller to their choice with BXML Transfer

Get Ready!

After installing pre-reqs

Clone this repo then navigate to that folder

git clone https://github.com/dtolb/ivr-webinar.git
cd ivr-webinar

Install Dependencies

npm i

Launch the server

npm start

Launch ngrok

./ngrok http 3000

BXML Snips

Gather

Bandwidth uses a gather to ask the user to press a digit.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Gather requestUrl="http://your-server.com/gather-response" maxDigits="1">
        <SpeakSentence gender="female" locale="en_US" voice="susan">Hello, please press 1 for pizza and 2 for burgers</SpeakSentence>
    </Gather>
</Response>

Multi-Transfer

Bandwidth uses a transfer to transfer calls to another number.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <SpeakSentence gender="female" locale="en_US" voice="susan">
        Transferring you to Pizza!
    </SpeakSentence>
    <Transfer>
        <PhoneNumber>+15552223333</PhoneNumber>
        <PhoneNumber>+15552224444</PhoneNumber>
        <PhoneNumber>+15552226666</PhoneNumber>
    </Transfer>
</Response>

Single Transfer

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <SpeakSentence gender="female" locale="en_US" voice="susan">
        Transferring you to Bad Daddys!
    </SpeakSentence>
    <Transfer>
        <PhoneNumber>+15552227777</PhoneNumber>
    </Transfer>
</Response>

Speak Sentence

Bandwidth uses SpeakSentence to play speak to the call, and Hangup to end the call

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <SpeakSentence gender="female" locale="en_US" voice="susan">
        I'm sorry, I didn't understand your choice. Please callback and try again.
    </SpeakSentence>
<Hangup/>
</Response>

About

Basic IVR Flow for use with Bandwidth APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published