-
Notifications
You must be signed in to change notification settings - Fork 199
Inbound call with IVR menu: Appointment Booking #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we don't check-in this file. It's auto generated in build process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok will remove it
validationResponse: event.data.validationCode | ||
}); | ||
} | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to check for incoming call event for answering call
|
||
await callContext.callConnection.getCallMedia().playToAll(audioPrompt); | ||
} catch (error) { | ||
console.error('An error occurred while playing audio prompt:', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not rethrowing catched exception
|
||
// Process and handle the received tone input | ||
switch (tone) { | ||
case "one": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use Enums instead of string?
else { | ||
const eventType = event.type; | ||
console.log("Received Unexpected event: " + eventType + ". Terminating Call."); | ||
callAutomationService.hangUpCall(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should hangUpCall here as we may get extra events due to other components changes.
|
||
// Method to hang up the call | ||
async hangUpCall() { | ||
await callContext.acsClient.getCallRecording().stop(callContext.recordingId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to handle exceptions
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?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
What to Check
Verify that the following are valid
Other Information