Twilio complication - twilio

I'm new to Twilio, and I'm struggling with one task. I want to do the following:
Customer A calls the Twilio number. Twilio forwards the call to the sequence of number (I have used twimlet findme to forward the call). In this scenario, if the first number does not answer the call. Instead, it will be forwarded to the other number in the sequence and so on.
The problem I am facing occurs when the call is forwarded to the second number when the first one does not answer. It pauses for a long time, and after some second the bell rings. At that time the customer gets confused that whether he should continue or not.
So is there any way to notify the customer that the call is being continued?
There is a second scenario where Customer A calls the Twilio number. When the call is not answered or busy, the customer gets to hear the message from the company Operator that the "person is on another call" (in different languages). Is there any way to exclude the message from the company operator?

Twilio developer evangelist here.
I think the way to solve your first question is to use answerOnBridge="true" for your <Dial> TwiML. That will keep the phone ringing until it is answered.
For your second question, you should set a timeout on the call so that it doesn't reach an operator message.

Related

At what speed does Twilio send DTMF tones when using the sendDigits command?

My Twilio application dials our conference line, waits two seconds and then sends the conference PIN, followed by #.
$dial->number('442031234567', ['sendDigits' => 'wwww123456789'] );
I would like to be able to give my users an estimate of how long they should expect silence (while Twilio is sending the PIN digits) before the call is ready. I can make the call multiple times and time the delay, but that seems less exact that finding the underlying timings!
I know that each w character takes 0.5s, but I can't find any documentation for the amount of time each digit takes after that wait.
I've looked at Twilio's docs for sendDigits and also play
Twilio developer evangelist here.
I don't believe we give any guidance on how long the DTMF tones will take, but I believe they are a constant time. I would recommend trying it a few times, along with the system that you are dialling in to in order to estimate the time for your users.

Specifying multiple Twilio numbers when sending an SMS to spread load over all numbers

I am new to Twilio and was reading that the limit is 1 SMS per Second per Number.
If you have more phone numbers, then the overall sending rate increases.
My question is if we need to specify multiple numbers in the code in order to take advantage of the increased rate with having more numbers, or is this taken care of automatically by Twilio, even when I specify only one number in the code?
It is not clear if I manually have to Round Robin across all my numbers myself, or if Twilio does this for us.
I am using PHP to do this.
Twilio evangelist here.
You will have to write the code that round robins across all of the numbers in your account. This should be pretty straight-forward.
What I would do is put all of those numbers in an array (you can use the REST API to get the list of all of your Twilio phone numbers), and then in your message sending loop, just use a counter to keep track of your place in that array. Once that counter reaches the array size, just reset it to 0 to start over at the beginning of the array.
Hope that helps.
Over the years the answer to this question has changed. There is now a Twilio service called Copilot which enables all kinds of number intelligence. See the docs here for examples of how to use it. That docs page lists it as a "public beta" (though it also suggests sending API queries to the 2010 version of their API, so it seems a bit outdated).
Edit: Be sure to read the docs regarding the response, since the Copilot behavior is different than the standard message sending behavior:
There is a slight difference in API response when specifying the MessagingServiceSid parameter. When you only specify the From parameter, Twilio will validate the phone numbers synchronously and return either a queued status or an error. When specifying the MessagingServiceSid parameter, Twilio will first return an accepted status.

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 grab a list of only active calls and active queues from Twilio

How do i grab only active queues while incoming call to my twilio number.Is there any way to filter only latest queues and update those queues order.
Twilio evangelist here.
I guess this depends on what you mean by "Active". If you mean, Queues that have calls waiting in them, there is not currently a way to have Twilio give you just that list.
You can ask Twilio to give you a list of Queues and then your application can filter that list using the CurrentSize parameter.
If you want to dequeue callers in a order other than the default FIFO behavior seen when you <Dial> a call into a <Queue>, you can use the REST API to dequeue a specific call:
https://www.twilio.com/docs/api/rest/member#instance-post-example-2
If that still does not give you enough control for your scenario you can always fall back to using a simple <Conference> instead of a <Queue>. In that case you would add calls to a conference in a muted state, and your application would be responsible for tracking what calls are in the conference, how long they have waited and what order they arrived.
Hope that helps. If I've misunderstood what you mean by Active, please let me know.

How to connect 2 callers together with Twilio [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have a situation where I want to anonymously connect 2 callers together. The idea being, you call a phone number enter a digit (each digit corresponds to another phone number) Once you enter in your digits the phone calls the other phone number and then once that other phone number picks up, the two callers are connected.
How would I do this as cheap as possible? Is there a way to do it on Twilio to connect the 2 calls, but then once the calls are connected to not have to go through Twilio anymore?
This is possible using Twilio. The first party calls a Twilio number which then uses the <Dial> TwiML verb to call the second party, using the callerId attribute to anonymize who the call is from. For that attribute value you can use any number you have purchased from Twilio or is a validated outgoing caller ID on your account.
Generally what people do in this case is give everyone who needs to make anonymized calls their own phone number. Then you show use that for the caller ID so if the second party calls the number back, they'd also be anonymously forwarded as well.
In this case you'd be charged 1 cent per minute for the duration of the incoming call initiated by the first party, and 2 cents per minute for the duration of the leg connecting the second party.
I am fairly certain, that if you connect thru twilio, you stay connected (and incur per-minute charges) during the entire conversation.
Openvbx, which is built on twilio, does a similar thing, where you can initiate a call from the web, it calls you at your 'real' phone, you press a key and then it connects the second caller. Charges apply during the connection.
(I realize this doesn't answer the first part of the question, just answering the charge-related part)
This is a pretty basic Twilio function:
First call, respond with twiml using to get the digits, and providing a url where to send the digits to
Respond to the request with digits using a verb with to call and, like John said, set the caller ID to something else (like another twilio inbound number).
When the other party picks up, the call is connected.
Pricing-wise, you's be looking at approximately 3 cents per minute or 5 cents if a toll-free number is used.
With Twilio, you will not be able to connect the two calls and then "not use" Twilio. This is an all or nothing proposition, unless you get one of the users to re-dial the call directly.
Only alternative I can thing of, that would not require paying Twilio requires you setting up your own routing setup, such as Asterisk box. However, the cost associated with doing this is arguably greater - you have to learn telco stuff and get a decent rate on minutes from a voip carrier, not to mention supporting it. On the upside, you control your own routing here and you can get better rates, such as $0.0127 per minute here: http://www.minutehub.com/ (I have never used them and am not affiliated with them)
I've worked now in several companies using Twilio in production and have nothing but good experience with them. If you are just starting out, these guys let you focus on the problem you are solving first. Once your solution is baked, you can focus on optimizing the costs. Good luck!

Resources