Twillio iOS App, not making calls properly - ios

I am experimenting with Twillio for iOS, and going through the quick start tutorial here
https://www.twilio.com/docs/quickstart/php/ios-client/passing-parameters
Now I setup a heroku account as per the tutorial and so far I am accomplishing everything up until the point where I press dial in the app and make a call to a cell phone that I entered, I get an automated message saying " Welcome to Twillio"
and then in like 3 seconds it hangs up. No Error messages are logged or anything.
Any help would be appreciated.

Twilio evangelist here.
Assuming you are using the TwiML sample from the previous step in Twilio Client for iOS the quickstart, it sounds like your application is behaving as expected.
When using Twilio Client, you need to tell Twilio what to do with the VoIP connection thats being from iOS into Twilio, which you do by setting up a web server that has a URL that returns a set of TwiML "verbs". In the Quickstart, the TwiML we show includes the <Say> verb, which tells Twilio to take text and turn it into the robot voice that you're hearing.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say>Welcome to Twilio</Say>
</Response>
Once Twilio finishes executing all of the TwiML verbs you give it, it disconnects the call.
If you want a different experience from whats shown in the Quickstart you can just change the TwiML your server returns. For example, if you want to have Twilio drop that Client call into a conference you could change the TwiML to:
<Response>
<Dial>
<Conference>Party Time</Conference>
</Dial>
</Response>
If you want Twilio to dial a PSTN number (like making a call to a cell phone), you would use the <Dial> verb with the <Number> noun:
<Response>
<Dial>
<Number>+15555555555</Number>
</Dial>
</Response>
Hope that helps.

Related

TwiML Sip only dialing the first one

I am trying to get all of our customer care team's phone's to ring on inbound call's using twiml, but it only ever ring's the first one, Both test phone's are registered through twilio's Sip Domain, and depending on which one is first, that is the one that rings, Here is an exmple of my twiml ( Generated through there function's )
<Response>
<Dial>
<Sip>sip:test1#testdomianasdf.sip.us1.twilio.com</Sip>
<Sip>sip:test2#testdomianasdf.sip.us1.twilio.com</Sip>
</Dial>
</Response>
Per Twilio's Support, are not able to do "simulring", and also can not do "simulring" on if the number is hosted through twilio due to some timing issue :(
SimRing is not support on SIP End-points. It is supported using Number and Client nouns.
If you register SIP clients under the same SIP URI, up to 10 will ring.
Twilio now allows "parallel" calls via SIP:
https://www.twilio.com/docs/voice/twiml/sip?code-sample=code-parallel-calling-11
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial>
<Sip>sip:alice-soft-phone#example.com</Sip>
<Sip>sip:alice-desk-phone#example.com</Sip>
<Sip>sip:alice-mobile-client#example.com</Sip>
</Dial>
</Response>

twilio in incoming call when agent disconnect the call user is not disconnecting

this is my twiml what I m using to connect the call-
<Response>
<Dial action="dailemptyqueueurl">
<Client statusCallbackEvent="initiated ringing answered completed" statusCallback="twilio_call_notification_handler.php" statusCallbackMethod="POST">cleint</Client>
</Dial>
<Redirect>holdmusic</Redirect>
</Response>
Twilio developer evangelist here.
This is a slight hangover from my previous advice, so sorry for that.
Firstly, when <Dial> has an action, it will go onto that URL instead of continuing with the TwiML and going to the <Redirect> in this case. So watch out for that.
Secondly, because we have used this technique then calls don't just end. However, you are using, I believe, Twilio Client with your agent. So, when you hangup the call on the agent end, you could make a request to your server to use the REST API to hang up the user end too.

The phone number in 'Dial' is not shown in output file

I have the following xml
<Dial timeout="10" action="file.php" method="POST">211</Dial>
which dials the hypothetical 211 to try and connect the caller with 211.
When I read what was sent via $_POST, there's no mention of 211.. Why is that?
Not using Twilio client.
Twilio developer evangelist here.
I'm guessing you are returning that TwiML, the <Dial> (within a <Response> I hope) when someone calls your Twilio number and Twilio sends a webhook to your application.
I'm not sure where you are looking for the number, 211, in the $_POST object. If it is when Twilio sends the webhook to you then this is before you have told Twilio you want to dial 211 and so Twilio doesn't know anything about it yet. If you are looking for all the parameters that Twilio sends to you in that webhook, check out this article in the docs on Twilio's request to your application in a voice call.
Are there other POST requests that Twilio is making to your application where you are expecting to see this number?

TWIML for reverse click-to-dial browser plugin

I have a mostly working chrome extension that uses the Twilio client to allow calling a number from the browser. The twilio client is too unstable to be used reliably, so I'm re-wiring the extension to just perform 'reverse click to dial', but am having trouble getting my head wrapped around the twiml flow.
Assume I have a web service that can produce twiml. Here's the call flow I want to achieve:
Agent launches my chrome extension, and gives it a phone number to dial.
Stored in the extension's settings is the twilio account sid,token, app sid for the twiml app/service, AND the number to connect the dialed number to, typically the agent's cell phone.
My extension makes a request to twilio API, which in turn requests a route in my twiml app.
some magical twiml is produced
agent's cell phone rings
agent answers
he is connected to an outbound dial to the original number he was dialing
What is the simplest twiml that will accomplish this? to boil down the flow:
agent enters number into chrome extension and clicks CALL
agent's phone rings
agent answers and is connected to number entered in step 1.
Twilio evangelist here.
The way I would do this:
Extension talks to Twilio API to start an outbound phone call to entered number
When entered number answers your app returns Twiml that tells Twilio to <Say> something like "Hold on while we connect you to an agent and then <Dial> the agent:
<Response>
<Say>Hold on while we connect you</Say>
<Dial callerId="+15555555555">
<Number>[Agent Number]</Number>
<Dial>
<Response>
If you want to reverse this to dial the agent first, just have your extension tell Twilio to call the Agent number first and then, when the Agent answers, have the TwiML say something like "Hold on while we connect you to the customer" and <Dial> the customer number.
Hope that helps.

Issues with Twilio Transcription during recording within a Dial verb

I am Raj, an independent Twilio consultant for a customer.
As part of a solution implementation, we have a requirement to support the following -
"A Customer makes a call to a Twilio number which forwards the call to a business number and record the conversation".
We have configured the Twilio Number to route the request to our server and we send the following TwiML as a response :
<Response>
<Dial record="true">XXXXXXXXX</Dial>
</Response>
The above works fine for call forward and recording; but it does not seem to transcribe the recording.
If I send the following as a TwiML response; the recording & transcription does not seem to happen either.
<Response>
<Dial>XXXXXXXXXX</Dial>
<Record transcribe="true"/>
</Response>
Is there a limitation in the Dial verb that it can only record, but cannot transcribe?
Regards
Raj
Twilio Developer Evangelist here.
You are correct. Record is available as a dial verb attribute but transcribe is not.
If you want to transcribe in this scenario you could use a 3rd party transcription service like Rev.

Resources