Connecting phone calls with twilio - 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.

Related

Show Caller id on calls from Mobile

How do I get my twilio Virtual landline number to show as caller id when I call my customer from my cellphone? Both my cell phone and twilio virtual landline numbers are "verified" with twilio.
Twilio developer evangelist here.
To make your Twilio number appear, you would need to generate the outbound call to the customer from Twilio. There are a couple of ways you can do this. The easiest is likely triggering a call to your phone first with the REST API then connecting you to the customer using <Dial> and setting the callerId to your Twilio number. If you wanted to do the entire thing starting from an outbound call on your phone, you could build an app that let you dial a Twilio number, then use <Gather> to take the number you want to dial, and then connect the call out to that number. And the hardest way is building yourself an application using the Twilio Voice SDK so you can open the app and dial your customer.

Twilio Mobile to Mobile Call

I am new to Twilio and I need some help on a specific scenario. I have been trying to find a solution for this for some time, but I haven't been able to do so.
I want to use a Twilio number from one mobile (A) to call another user on mobile (B). I want to do this in a manner where the call is initiated by the Twilio number and not by (A)'s phone number.
In other words, (A) dials a Twilio number from a mobile and Twilio in turn dials (B) and connects (B) with (A).
I have configured the Twilio phone number dialed by (A) to used a Twiml bin and I have used the Dial verb to dial (B) upon receiving the call from (A).
But the Dial verb adds user (B) to the call. USer (B) does not see the call coming from the Twilio number but from User (A). This is not what I was hoping to achieve.
First of all, I hope I have been able to explain the scenario properly.
IS the scenario possible?
IS it possible for me to get Twilio to dial another user's number when it receives a call from a user? (without using the dial verb in Twiml).
IS there any solution in the API?
Let me know your thoughts. Also, please feel free to ask for any clarifications
Yes it's possible, you just need to supply a callerId parameter in your TwiML. Without one then Twilio will just use the incoming callers number as the caller ID, as you are currently experiencing.
You can use any Twilio number you have purchased or any number you have verified as the displayed caller ID. Your TwiML dial verb should look like this:
<Dial callerId="+15551231234">
<Number>+1555555555</Number>
</Dial>

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.

VoIP - GSM calling via iOS

I've spent days now searching for a way to route calls from an iOS application through a voip server to mobile number or fixed landline number (or send an SMS)... Essentially like voIP-GSM
I want to essentially have a similar system set up to Skype but with out the other user having the app, just directly call someone's phone using your data/wifi rather than your limited voice minutes or numbers if SMS.
One company who I know of that has worked out how to do this is: http://callsfreecalls.com/
I don't just want app-app communication like from twilio or rebtel!!
1) Would Asterisk or PJSIP help me in any way?
2) Would there be anyway I could do this all for free?
3) Will I have to create my own VoIP network or SIP server??
4) Will I be able to accomplish all this and put it into an iOS app?
Any ideas or help would be much appreciated. Thank you
Twilio evangelist here.
With Twilio Client you can make a VoIP connection from a mobile app into Twilio, then route that to any other number (mobile or landline). You are not restricted to app-to-app only calls.
When you create a Capability Token for Twilio Client, one of the parameters you can pass it is a TwiML Application SID. That TwiML Application maps to a URL that you can use to return TwiML instructions that Twilio will execute when a user initiates an outbound call from your iOS app. In those instructions, you can use the <Dial> verb to tell Twilio to dial a regular phone number, which we will bridge to the Twilio Client connection.
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