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.
Related
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
I made a simple chatbot using the studio template and it works fine. However, it then loops after the last response. So let's say I give the user 2 choices, Y and N. After they say Y they get a response but if they message the bot again they get the initial message once again to loop the process. How do I stop this? In the docs I only found info on how to stop all incoming messages but this isn't what I want. I just want to end the convo for good as in my application it has a one time use intention. Thanks.
Twilio developer evangelist here.
There's not really a way to stop incoming texts. What you want to do in this case is stop responding to an incoming text after the initial flow through.
The way to do this would be to use Twilio Functions and function widgets to store the numbers that have successfully completed the questions (you could use any database for this, if you want to keep it within Twilio then Twilio Sync can help here). Then you can insert a function widget at the start of the flow that retrieves whether the number messaging has completed the questions and combine with a split widget to decide whether to send the first message or just complete the flow.
Let me know if that helps at all.
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
Can you tell me if it is possible to forward an incoming call to a list of multiple numbers, so when one timeouts another starts?
What I am trying to do is basically this:
<Dial timeout="10">+123</Dial>
<Dial timeout="10">+124</Dial>
<Dial timeout="10">+124</Dial>
Now Dial 1 for +123 times out, but Dial 2 for +124 get's answered, so I do NOT want to start Dial 3 but it calls 3 after 2 answered. How would I achieve that? I'm basically trying to make it so multiple numbers are being called but in a sequence and the sequence stops if one answers. If you have an alternative to just using simple I'm open for that too.
Thank you.
Twilio developer evangelist here.
The way to do this without continuing to call once someone answers is by separating the <Dial>s into different webhooks. You'd do so by providing an action attribute to the <Dial> which is a URL that will be called when the <Dial> is completed.
That way you can use the DialCallStatus parameter that is sent to the action URL to see whether the phone was answered or not. If it was answered, then you can just return <Hangup/> if it wasn't answered, you can <Dial> the next number in your list.
You can also use the FindMe Twimlet for this purpose or this code written for Twilio Functions.
Let me know if this helps at all.
I'm making an IVR system for a project, and have decided on Twilio to handle the phone portion (making and receiving calls, sending and receiving SMS messages). This will surface a website with an IVR front-end, allowing users to navigate the site using their touch-tone phone.
I'm not making all the content browse-able over the phone, just what makes sense.
Twilio sends in parameters to your URL on the querystring or via POST, and you respond with a special subset of XML that tells the IVR how to act. I made a lot of headway very quickly with ASP.net MVC, treating the Twilio XML content as a View and rendering the site's data to it.
Here's what a response to Twilio looks like:
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<Say>Hello World</Say>
<Play>http://api.twilio.com/Cowbell.mp3</Play>
</Response>
Here's what a menu looks like to Twilio:
<?xml version="1.0" encoding="UTF-8" ?>
<Gather action="http://your_url" numdigits="1">
<Say>Press 1 to execute your_url, passing a parameter named "digits"</Say>
</Response>
Here's where I'm stuck:
I'm trying to add a universal "back" button, maybe a "skip" button, a "repeat" button, etc, and I'm finding that on each view, I'm detecting the digit pressed and then if-ing to a hardcoded Response.Redirect(). I know this is going to quickly become unmaintainable for large numbers of views and menus.
So, how can I model the MVC app so that it's more like an application and less like a game of Zork? Stacks of Menu objects, each with Lists of MenuItem objects? How can I make, say "9" the universal option for "back" and have the app respect it, no matter where in the menu system the user is, without having to code for it in each view?
The back feature is just a symptom of the chaos this project will step into if I don't take a moment now to design it properly. Are there .net IVR frameworks out there I can inspect for ideas? Any help would be appreciated, I know this is not a novel problem, I just can't seem to get my head around the best path to take.
Although I almost don't have a clue about what you are talking, since nobody sofar said anything I will have a shot at it (don't shoot me if I'm totally not in the direction).
In MVC 2 you can render actions in your views:
<%= Html.Action("home", "menu" , new { someparam = somevalue, someotherparam = someothervalue }) %>
This would call the Menu action in your Home controller with the given parameters. The Result of this Action would then be inserted in your view.
This way you can keep your views clean, and all your Menu stuff in one place. Just have to add the above stated line in every view.
Again the same can be done with HtmlHelper's, yet sometimes the above stated way is just easier.
Ricky from Twilio here.
For some reason, having code that's organized like Zork sounds like fun to me but in practice I can understand how that may drive someone crazy!
We just launched a bunch of non-trivial, production ready tutorials to help when developers have questions about how to organize a specific kind of application. One tutorial is an IVR built using C# with ASP.NET MVC.
Taking a look out how we decide to structure things, we're using 3 controllers to control our logic:
IVRController.cs: This controller contains the code that welcomes a user when they call into our IVR.
MenuController.cs: This controller is where we determine the appropriate IVR menu for the user depending on their inputs.
PhoneExchangeController.cs: In this controller, we have the logic to forward a call from our IVR to another phone number.
As you're looking to customize the experience by adding something like "Press 9 to go back", making changes to MenuController.cs should help get you there.