How to stop Twilio Voice API from expanding abbreviations in voice messages? - twilio

I have recently upgraded the Twilio library from version 3 to 5 on a project I am working on, and after finishing the upgrade I noticed that the voice messaging system is expanding abbreviations (for example, "assoc" gets read out as "association"). It is also expanding the word "tech" to "technical", even though that is not what "tech" stands for in context.
Is there a way to make Twilio read messages out verbatim, specifically without expanding things it thinks are abbreviations? I have pored over the API docs and cannot find a setting to alter this.

You could try with voice man or woman not alice. For example:
This will expand to "association".
<Say voice="alice">He works for an assoc in town.</Say>
This will keep to "assoc".
<Say voice="woman">He works for an assoc in town.</Say>
<Say voice="man">He works for an assoc in town.</Say>
Another option would be to switch specific words for their phonetic spellings.
This will keep to "assoc" even with voice alice.
<Say voice="alice">He works for an assok in town.</Say>
There is a blog about this:
https://www.twilio.com/blog/2013/08/the-pronunciation-challenge.html

Related

Is it possible to relay/forward messages from contact A to contact B using Twilio on WhatsApp?

I would like to be able to have a single phone number that holds a list of contacts. And then for contact A to be able to send a message to that phone number that looks like this: "Fred: Hi fred!", which would then get relayed by Twilio and sent onward to contact B named Fred like so "Alex said: Hi fred!"
So, is it even possible to relay/forward messages from contact A to contact B using Twilio considering?
If there is what would be an indicated way to go about this in python?
Yes, this is absolutely possible :)
In this scenario, you need a Twilio number that acts as a "Man in the middle" and forwards all messages. There is a blog post that describes almost the scenario you mentioned. The only difference is that this sample will use the phone number instead of a contact name before the colon.
+1 415 12341234: Hi, how are you doing?
+1 415 56785678: Good, any you?
Instead of
Fred: Hi, how are you doing?
Alex: Good, any you?
But it shouldn't be too hard to use a JSON object that maps names and phone numbers inside the Twilio function. If you want to go the extra mile, you could probably use an API to sync your contacts as well. But that only works if your address book/ contacts app has an API.

Having trouble using programmable SMS through Zapier & Google Sheets

im new to this form and joined because I use Twilio for my business and had no other place to go for help. Long story short, I sometimes use my Twilio number to send text messages to our customers regarding new products/updates - usually 500 - 1000 messages at a time (over the period of maybe once or twice a month).
Usually how I use Twilio is through ZAPIER, once a contact has a certain tag added from my CRM, I set it so that the tagged contacts will get a text message - it usually works but in May I've tried it several times and it hasn't worked at all.
So I switched to using Google sheets with the script feature of adding my Twilio information and tapping "send sms" on top (Today was the first time I used it). Initially it said all of the messages were sent, but when I checked my Twilio balance - it was relatively the same... so I dug deeper and checked my logs, I realized that all but 3 of the 550 text messages were "delivered" and only those three were received.
It seems like there is some type of issue, as its impossible that only 3 people would open a text message - I usually get a good amount of interest from these blasts.
When I used Zapier this month none of the messages would even get sent, so I'm not sure what's going on.
Has anyone dealt with anything like this? Please share! NOTE: Im a newbie here.

Twilio <Gather> enhanced attribute

I used widget in my project to receive the person answers on a phone call and based on the respond it proceeds to the next step. The responds are limited to 'yes' and 'no'.
I noticed most of the time, the 'timeout' situation happens in step which prevents the flow to go to the next step which is 'split based on'. It means it does not receive the answer no matter how the person says the word. I looked for the possible solution and I came across the premium speech model by adding the enhanced attribute. I'm not sure know if it is the solution or there is a better way to overcome this issue. any suggestion in this matter would be much appreciated since I couldn't find anything helpful through my google search.
For Studio, place the Text to speech in the Gather Input on Call Widget rather than a Say Widget, that will accomplish what #jack has mentioned in Studio (allow you to barge into the conversation for speech or DTMF collection). Studio doesn't currently support Enhanced Gather.
You can look at the Studio Execution logs, to see what the Gather Widget received as Input (SpeechResult) or the Split Based on Widget, to see what it received and what it is comparing to based on your logic. Sometimes, Yes or No may end in a period for example, but you are looking for Yes or No (.)
Widget Library
Understanding Twilio Studio Flow
make sure <Say> or <Play> are nested in the tag like this
<Response>
<Gather>
<Say>Please say Yes Or No</Say>
</Gather>
</Response>
not like this
<Response>
<Gather>
</Gather>
<Say>Please say Yes Or No</Say>
</Response>
If you can share some images or code, it would be helpful.

Twilio Voicemail (forwading to cell phone)

I am currently building a call forwarding system with Twilio. I am routing calls to my cell phone. The problem I am having is with the voicemail. My regular cell phones voicemail will pickup sometimes where I want to play a custom message of the business they are calling.
I understand you can use the dial time out. But, I've found that in cases where two calls are coming in on top of each other or in other instances it will still end up going to the regular cell phones voicemail.
My question is, is there any other way around this? I could press a button when I answer like 1 or something if that would work. But, I'm just not seeing a way of doing this. Ideally I would want a 100% success rate with forwarding to the proper voicemail.
Thanks in advance.
You want human detection, you can find more details at the link below, but you use the Dial verb with Number Noun URL parameter (Whisper) and Say/Gather verbs to announce yourself to the dialed party and have them enter any key to answer the call. If they don't enter a key, you know it was the voicemail that answered and direct the inbound call accordingly.
Alternatives to AMD

Twilio: Is there a way to export all opt outs?

I want to export everyone who has reply stop (opt out) for my messages. I see that my options are
API. However, through the API I can see that I get everything in pages of 50 messages, so I have to go and do a lot of code to go page by page, message by message just to check if the content is stop. Seems a bit unnecessary for a 1 time job.
From the console in my account, however when each time i try to filter on status received I get the following error, and when I dont filter I get error:
Your export request has more than 10,000 records, please filter your results and try again.
Surely there must be an easy way that I can get all the list of numbers that had opt out?
This answer above is not strictly true as of October 2020. Twilio now has an "insights" dashboard that allows you to view and download "Opt outs Received". When you click on that dashboard you are able to see and download the information.
It is under: Programmable Messaging -> Monitor -> Insights
Our account has "Opt-Out Management" enabled and this addition has been a game changer in finding out what users have or have not done in our system.
There isn't a way to export all opt-outs for LC's/TF's that Twilio maintains on your behalf but opt-outs are forwarded to your application for logging as well as added to the Twilio maintained opt-out list. Your application can keep track of the opt-outs this way. You can find more details in the Help Center article below.
Twilio support for opt-out keywords (SMS STOP filtering)
"When Twilio receives one of these replies, we will create a "blacklist" entry on our side, and then pass the message on to your webhook. Once we have a blacklist entry for a particular recipient phone number, any future attempts to message them will be met with a 400 response from our API, along with Error Code 21610 - Message cannot be sent to the 'To' number because the customer has replied with STOP. Recipients can disable this message stop, and resume receiving messages with the START, YES, or UNSTOP commands as outlined below."
Also, if you use the Twilio helper library for the respective language, it handles the paging for you, for example, for Node.js, reference.
Usage and Migration Guide for Twilio's Node.js Helper Library 3.x
"One of the biggest advantages of twilio-node 3.x is that it automatically handles paging for you! In both list and each, you can specify the maximum number of instances to grab (limit), and the page size (pageSize). The library will take care of everything else."

Resources