Twilio - Change Default Ring Length Before Voicemail - twilio

I'm using the following Twimlet to direct all calls go to voicemail
http://twimlets.com/voicemail?Email=somebody#somedomain.com&Message=Please+Leave+A+Message
The voicemail picks up immediately. Is there a setting to make the phone ring for x seconds before voicemail kicks in without forwarding the calls to another number?
Thanks!

Twilio evangelist here.
Unfortunately not with the Twimlet. If you want to generate your own TwiML response you can use the <Pause> verb to keep Twilio from answering the call right away.
Hope that helps.

Related

Testing our IVR - Twilio send_digits

I am building a machine to bounce with our company's IVR. For that I need a degenerated IVR and specifically I wish to have it receiving a call and sending_digits to the IVR.
I could not figure out how to send_digits without first calling the other party.
Using python for this matter.
Can someone spill light on this?
Twilio developer evangelist here.
I think you are asking how to receive a call on a Twilio number and play DTMF tones. If so, you can do that using the <Play> TwiML element.
<Play> normally expects a URL that plays an audio file. However, you can also pass the digits attribute which will direct Twilio to send the DTMF tones down the line.
You can add any digits you like as well as pauses using the w character. A single w will wait for half a second and you can use multiple in a row. For example this TwiML will direct Twilio to send the digits 123 then wait 1 second, then send 456, then end the call.
<Response>
<Play digits="123ww456"/>
</Response>

Add forwarding number to the Twilio number programmatically

How to forward the call to an US local Twilio number from any mobile to any US number?
Its seems to me that I will have to use TwiML to achieve that. Moreover, the supporting doc in https://support.twilio.com/hc/en-us/articles/223179908-Setting-up-call-forwarding#devs is not seeming to show the TwiML correctly. And also with that way I will have to use verb.
Can I not directly call from the number pad of my mobile to the Twilio number so that the call can be received from the forwarding number?
Can I not set a forwarding number to the purchased number programmatically?
Twilio evangelist here.
To forward a call made from your mobile device to a Twilio number to another US phone number you can use the <Dial> verb:
<Response>
<Dial callerId="[your_twilio_phone_number]">[target_phone_number]</Dial>
</Response>
This part of the Voice Quickstart for PHP shows this and might be useful for you:
https://www.twilio.com/docs/quickstart/php/twiml/connect-call-to-second-person
Hope that helps.
This was what I went with before getting the answer from Twilio support but after the answer from #Devin Rader and from my client.
here is a great tutorial doing call forwarding programmatically,
https://www.twilio.com/docs/tutorials/walkthrough/call-tracking/php/laravel.
Yes, you can definitely set the TwiML programmatically on the numbers,
take a look at the documentation on provisioning phone numbers,
https://www.twilio.com/docs/api/rest/incoming-phone-numbers. You can
also set the number so that Twilio makes a call to your application
and your application delivers TwiML dynamically.

Connecting phone calls with twilio

This is more of a general quest ok but when using Twilio dial in a twiML to connect the caller to another number, can you disconnect Twilio after they are connected or will it just keep connected and increase the call time?
Twilio developer evangelist here.
It sounds like you are asking whether, when you direct a phone call to a TwiML app with something like this:
<Response>
<Dial><Number>OTHER_PHONE_NUMBER</Dial>
</Response>
that you want to disconnect from Twilio once the call is connected to the number?
If that's the case, then the answer is no, I'm afraid. Once a call comes into Twilio, it is being controlled and routed by the Twilio system and you will incur costs by the minute. Whilst this call continues to live you will still be able to affect it via the REST API using its call SID.
Let me know if this helps or if you have any other questions.

"Press 1 at any time" in Twilio

I'm trying to make a Twilio workflow that allows for a user to press 1 at any time to cancel out (as long as a <Dial> hasn't connected yet) and leave a voicemail instead. The TwiML documentation offers a <Gather> option, but this is for a specific time and it supposedly won't let me run a <Dial> command during a <Gather>. Is there a trick to getting this to work?
Twilio evangelist here.
You should be able to Dial another number after gathering input.
<Gather action="[your_gather_processing_url]">
When the <Gather> completes (eg the user presses one), then Twilio will make a request for the URL you've set in the action parameter. In there you can use <Dial> to connect to another number.
It sounds like what you want to do is have Twilio <Gather> for input while the <Dial> is ringing. I believe in that case you are correct, thats something we cannot do today.
One option might be to use <Dial>s timeout property to set a finite limit on the length of time Twilio will wait for the call to be answered (its 30 seconds by default), and then in the action URL, check the DialCallStatus to see if the call was not-answered and send to voicemail when appropriate.
Hope that helps.

Use incoming caller ID on Twilio to make outgoing call

I'm wondering if the following is possible:
Caller rings Twilio number which gets answered and then automated message is played.
Caller is placed in a queue
In parallel to this, our system dials a number (using the rest API) showing the caller id of the incoming call, plays a gather to verify the user wants to pick up, and then connects the call.
I know that the easiest way to achieve something similar to this is to redirect the incoming call with a Dial verb, but for reasons that aren't really relevant to the question that isn't possible.
Twilio evangelist here.
Yes, this is possible, with the caveat that the initial callers phone number must be previously verified with Twilio. See this topic in the help center:
http://www.twilio.com/help/faq/voice/can-i-use-a-non-twilio-number-as-the-caller-id-for-outgoing-calls
Hope that helps.
Devin

Resources