Azure-Samples / communication-services-python-quickstarts

Sample code for Azure Communication Services Python quickstarts
MIT License
19 stars 34 forks source link

Inbound call with IVR menu: appointment booking #28

Closed vivekmore-msft closed 1 year ago

vivekmore-msft commented 1 year ago

Purpose

Call Contoso Dental office to confirm your appointment: Inbound call with IVR menu.

User dials Dentist’s office number. Call is answered by CA endpoint. Start recording Play Audio – “Welcome to Contoso Dental’s virtual booking center. This call is being recorded for quality purposes. Please pick from the following times to select an appointment with your dentist.” Play Audio - “Press 1 for 9:30am, Press 2 for 10:30am, Press 3 for 11:30am.” Receive dtmf input. Play audio –

if pressed 1 -> “Thank you for confirming your appointment at 9:30am. We look forward to seeing you, goodbye.”

if pressed 2 -> “Thank you for confirming your appointment at 10:30am. We look forward to seeing you, goodbye.” 

if pressed 3 -> “Thank you for confirming your appointment at 11:30am. We look forward to seeing you, goodbye.” 

any other key-> "I'm sorry that is not a valid input, please choose from the options provided"

Play Audio -  “Press 1 for 9:30am, Press 2 for 10:30am, Press 3 for 11:30am.”  Terminate the call. Recording should end too.

Does this introduce a breaking change?

[ ] Yes
[X] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]

What to Check

Verify that the following are valid

Other Information

Frankkkkk commented 1 year ago

Hi @vivekmore-msft , thanks for this example which allowed me to try inbound calling.

IMHO your code is really great but vastly over complicated compared to other examples. For example:

Anyways, my 2 cents :-) Cheers