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

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!

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! 🚑 🚨

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

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.

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?

How to recognize fax numbers?

What should be the best way to recognize that a number is connected to a fax without actually sending faxes around ?
I suppose that a short phone call can be made: the goal is to determine if a number that is declared as a fax line is really a fax line, working and available.
If you can make a phone call, many faxes create a "Fax Identification tone".
This signal may be sent by the Terminating FAX machine anywhere between 1.8 to 2.5 seconds AFTER answering the call. The CED signal consists of a 2100 Hz tone that is from 2.6 to 4 seconds in duration. The CED tone is useful for disabling any echo cancellers on the line.
The CED also incorporates a "silent" interval following the 2100 Hz tone. This interval lasts from 55 to 95 (75 +/- 20) mS. Following this interval, the Terminating FAX machine will initiate the Pre-Message Identification procedures by transmitting a 300 BPS "Line Turn-around" preamble.
Some older faxes do not support that though, no idea how they can be triggered (i.e. by you sending a tone first, but that could be really annoying if you have a phone instead of a fax number)
I understand your question as that you have a list of fax-numbers in your customer database and want to verify that those numbers still are valid.
Then you could use TAPI to programatically call those numbers and check if its a fax that answering, no need to actually send any fax, just connect and ask the device (fax) what capabilities it has.
Here are Microsofts information about their TAPI
An easier way could be to have a fax modem on the com-port and using ATI-commands to call the device and send ATX3D and see if the device answers with ATA. (Or something similar, it was ages ago I programmed modems..)
It's essentially impossible.
They make line-sharing switch devices. For example, visit http://www.faxswitch.com/ to see their offerings.
The line appears like a voice line until you send a fax recognition tone. Then the line switches to a fax machine, if one exists.
So, a single number can be voice and fax.
A quick and dirty way of testing if a number is a fax number would be to google (using some API) for "Fax [number]".
e.g.
http://www.google.co.uk/search?q="Fax+01422+329262"
Not in New Zealand at least.
Here, Fax-Numbers do not differ from normal numbers in terms of namespacing.
A fax number may be only 1 digit ( the rightmost ) different from their normal line, or even a company may not have distinct FAX/Phone lines, and they just share a line and use tone detection to initiate fax protocol instead.
Also, you don't need to register with anybody to have fax services work on your phone line, so there's no index you can look up to see if its a fax or not. The only way to know is initiate a call, and see if you get a fax response, and even then, if the Fax happens to be turned off, you'll get a false negative.
I think your question may turn out to result in hunting for phantoms.
Oh, and for additional fun, you may have desktops with their dialup modem plugged into the wall merely emulating a fax device :). If you don't want to include these as "fax machines". you will be most likely out-of-luck.
First, there isn't anything inherent in the number that identifies it as a fax line. Even the phone company doesn't know - it's just a device attached to the wall jack, by the customer.
At some point you just have to trust the user. However, try the following ideas as well:
On each fax, publish a number (preferably toll-free) where the recipient can call to cancel. In some localities this might be a requirement anyway - "unsolicited" faxes are considered abusive in much the same way as spam since they can entail both material and bandwidth costs for the recipient. This will protect you in the eventuality that someone subscribes a number that doesn't belong to them.
Add some kind of error threshold to your software that will halt fax attempts once n attempts fail, and flag the number as inoperative. If you have some other way to contact the user, you could notify them of this event. The same principle works for e-mail addresses - I've received snail-mail notifications from companies when I changed e-mail addresses and forgot to notify them; once the e-mail had bounced a few times, they sent a courtesy letter to remind me to update it.
Many old fax lines are set to automatically pick up even on a voice call, so you could just call and check. On the other hand, it won't work on a lot of new ones, so while you could tell that one is a fax line, you couldn't tell it wasn't.
I'm sure a fax is a modem, so if you connected to it - using AT codes maybe (how 1990's!), you could determine from the response codes that there was a fax there - but you still have to make the call, make the negotiation etc - just dont send a page.

Resources