TwiML: create an automatic navigation & wait before playing the message - twilio

I am using Twilio to call Shops land-lines and play a message.
Some of the shops are using answering-machine with navigation to a specific departed: "press 3 for customer service..."
I would like to create an automatic navigation: When the system will recognize an answering machine I will use a digits sequence for each shop to reach the right department.
My problem is that after the system finished navigating
to the right department I don't know how long it will take the person in that department to pickup the phone and only after that to play the message.
This is what I am trying to do:
<Play>
<digits="wwww3">
</play>
<Pause length="?"/> // I don't know how long to wait.
<Play>
https://mySite/message.mp3
</play>
Is there an option to know when this person picks up the phone?

There is no easy answer. This is why most telemarketing companies use call screening (see below), or just play their message no matter what when someone answers.
Telemarketing is a multi-million dollar industry, and if this type of system was readily available or easy to develop companies would use it, however, they do not.
The only way you can be 100% sure a human has answered the phone and is listening is call screening as explained here: https://www.twilio.com/docs/tutorials/walkthrough/ivr-screening/php/laravel
While not a complete match for your query it is also covered here
https://www.twilio.com/help/faq/voice/can-twilio-tell-whether-a-call-was-answered-by-a-human-or-machine where it says
One alternative to AMD is Call Screening, aka “Human Detection”.
That is it for easy implementation. Outside of that you could code your own machine that could listen into the call via conference to try to identify when a human speaks and then process it. However, this type of system is very expensive and complex from what I have seen and even then it is not 100% reliable.

Related

Amazon Connect with Lex contact flow timeout

I have a contact flow that is using a pre-recorded voice prompt with a lex bot for voice rec. This is the main menu verbiage:
“Thank you for calling. If you would like to use your keypad to select the menu options, say “keypad”, otherwise please listen to the following menu options. For billing questions, say “billing”. To report a missed pickup, say “missed pickup”. If you are a current customer with recycling or other account questions, say “other”. If you are not a current customer, and have questions, say “sales”. To hear the menu again, say “repeat menu”. For all other questions, please remain on the line.”
I have set the error handling in the Lex bot to speak "Sorry, I'm having a hard time understanding you. Let's try using the keypad instead to make sure we route your call properly."
This is working when an utterance is not matched or an invalid option is spoken or pressed. However, I cannot figure out if it's possible to allow the lex bot to timeout like in a normal DTMF contact flow and send the caller to the next step in the menu without playing the error handling in from the Lex bot.
Is this possible?
That's the thing, Lex is not meant to be used this way. It MUST have an input to process, and if it reaches Lex's timeout, then it will always return an error and deliver the error handling response.
So you will have to get fancy in the Connect Flow to catch the Lex error message, and turn it into your own handling of it. But it will be hard to know whether Lex is erroring because it didn't understand, or because the user chose not to respond.
Therefore, I would personally avoid building the bot in a way that allows the user to remain silent. The user must direct Lex every step of the way and have easy ways of backing out of an unwanted action.
Remember that Lex is much more powerful than the old automatic call systems, so trying to force Lex into that old system won't work well. Depending on how you design your bot, you can make the conversation much much more natural, accepting a very wide range of responses and directing those into proper actions.
Tips:
Things may have changed more recently, but when I was building Lex/Connect, it was not possible for the user to interrupt a playback message. So I had to also avoid what you are trying to do in the welcome message:
If you would like to use your keypad to select the menu options, say “keypad”, otherwise please listen...
Naturally, a user who does want to use the keypad will try to immediately say "keypad" and probably get frustrated by having to listen to the rest of the playback message. So I design every playback message to be short, deliver information first, and always end on the question. Often breaking the conversation up into more branching points to make the questions as specific as possible.
Don't worry about going back and forth with the user too many times. It gives the user comfort knowing they are on the right path to what they want and are able to control the conversation in smaller steps. They will get stressed, having to listen to long list of options and remembering what they are while figuring out which one best applies to them.
So make each question as clear as possible and avoid spoonfeeding options. It feels less natural to explicitly state to the user what they should say:
To report a missed pickup, say “missed pickup”.
That is unnatural.
A good middle ground would be asking one question with a list of options and pausing between each option. The user will understand that these are responses they should make, but won't feel unnaturally pressured into exact phrases. For example:
Would you like to, check your billing, report a missed pickup, ask about sales, or something else?
That is natural.
We are comfortable handling those types of questions because we often do that when speaking with humans. You may even want to use a question mark instead of commas so that the playback voice uses a questioning intonation with each option. It looks less natural in written form, but would probably sound more natural.
Last tip: Don't design your bot based on your experience talking with bots. Design your bot based on your experience talking with humans.

How to stop Twilio filtering user entered DTMF

I'm using Twilio to forward calls to "local" freephone numbers across the world to an IVR system local to us.
The problem is that this doesn't work, because you need to be able to press numbers to navigate the IVR system, but if you dial via a Twilio number, it seems to filter DTMF tones going through it, so they don't get passed to the end system.
Is there a way to turn off this filtering?
I tried writing a little app to deal with it by moving the basics of the IVR into this app/Twilio, and then it works - except it has to Dial the "real" IVR system and then sendDigits to press the right buttons based onwhat the user inputted, however these tones are ignored by our IVR system. Grrr. Not sure why, I'm guessing it doesn't play the tones for long enough?
Any ideas for getting it sorted? It's an IVR for emergency medical assistance, so it's critical it's working (and it's in production now!!).
<Response><Dial timeout="180" record="record-from-ringing"><Number sendDigits="wwww1">+<my number></Number></Dial></Response>
Should work, but doesn't. And it wouldn't matter anyway if I could press a button on my phone and it go through!!
You can see here for the types of DTMF tones we support.
It is likely that you're experiencing filtering from the carrier end. And this is absolutely something best handled on the support level where you can share Call Sids that display the undesired behavior.
There doesn't appear to be anything out of place in your IVR setup as you describe it. If others need to set one up from scratch, I'd recommend the following tutorial (C#, Java, Node.js, PHP, Ruby):
https://www.twilio.com/docs/tutorials/walkthrough/ivr-screening/ruby/rails#0.
I do hope this helps your Emergency Medical Assistance to be up and running soon! 🚑 🚨

How to call 200 UK cell phones simultaneously and deliver a recorded message?

Working on a fun element for a big company event.
I would like to find a way to call 200 UK cell/mobile numbers as simultaneously as possible and deliver the same recorded message to each of them. All of the target devices belong to people attending the event.
Anybody managed to do something similar?
I think I could do this with Twilio's APIs, but a more packaged solution is preferred.
Any risk of overwhelming the local cells by trying to start a call with so many devices in the same area at once?
Twilio Evangelist here.
This is totally possible with Twilio and some simple programming logic. With the numbers you have, you can loop through them and create phone calls like so (in Python):
for num in number:
# Create a phone call
client.calls.create(
to=num,
from_='MY_TWILIO_NUMBER',
url='http://mywebsite.com/instructions.xml'
)
The url here (final line) will provide some basic TwiML to play an MP3 file.
There are solutions for this available, but it is likely you'll be able to build this in software faster than you will be able to get the solution running, especially if this is for a one-time event and you have some software people handy.
If you need any help, let me know!

Sending tones via a manual process with Twilio

Our call center deals with businesses and we use Twilio to make our calls. However, many businesses have a menu to navigate before we get to talk to someone. How can I create a 10-key pad on our end and use it to send menu selections to the call we are connected with?
I know about the senddigits attribute on Dialing numbers with Twilio, but this sends preprogrammed tones. We have no way of knowing what the tones need to be until we are connected and in the menu, so this won't work.
I've been through the API pretty thoroughly and can't seem to find anything relating to this.
If there is nothing, is there another software that anyone can recommend that allows for making calls out, generating recordings of calls and allows me to send keytones manually after the call has been started?
Check out the digits attribute of the 'Play' tag.
https://www.twilio.com/docs/api/twiml/play#attributes-digits
Each 'w' character tells Twilio to wait 0.5 seconds instead of playing a digit.
Assuming I am understanding your problem, could you not us MP3s of DTMF tones (http://jetcityorange.com/dtmf/) and PLAY to send the tones after the call has started?

Twilio Detecting When On Hold

I've used Twilio to detect whether an outbound call gets a human or answering machine response, but now I'm trying to determine when I'm on hold and when the rep eventually picks up. The goal is to have a flag to know when I'm no longer on hold with the party I called.
Is this simply impossible with Twilio? Do you know of any work-arounds or other services that I might explore?
There's nothing built into the Twilio API specific to this. You could maybe get away with playing a repeating prompt for someone to press a digit. The on hold time would never complete the prompt, but when a human picks up they would be able to and it would indicate their presence.

Resources