When we Dial a Number with <Dial> tag, we provide the <Number> to which the call should be sent to. We can call an extension using SendDigits. How do we track if the call to the extension has been answered or not answered? Since the number is routed through an exchange, will Twilio always handle only the response of the exchange?
Twilio provides the DialCallStatus on the initial answer of the call which is handled by the device managing the extensions.
There isn't eventing available by the device handling the extensions for Twilio to capture, so you are correct, Twilio will only handle the response of the exchange.
Related
Programmable Voice docs indicate that the SHAKEN/STIR status is passed to the webhook for incoming calls, but I don't see it in the POST data. I wouldn't expect it in Lookups since that's not real-time, and I don't see it there either.
My set up is: a Twilio phone number, configured for Voice & Fax to accept incoming voice calls and POST them to a Webhook on my own server.
Added Information:
I think the issue may be threefold:
incoming calls without SHAKEN/STIR data won't have the parameter;
very few calls have SHAKEN/STIR data (based on my call logs)
(not sure why... even legitimate calls from major U.S. carrier numbers don't have it)
SHAKEN/STIR support in forwarded calls is "coming later"
This blog covers the topic.
Building SHAKEN/STIR verification Into Your Voice CAPTCHA IVR
https://www.twilio.com/blog/shaken-stir-verification-voice-captcha-ivr
I have a somewhat peculiar situation for which I can't find documentation: I have an application that will use the Twilio API to initiate a voice call from phone number X (my number) to another one. The problem is that number X could already be in the middle of another call, one that was not initiated with Twilio (so my application wouldn't know about it). Would Twilio detect this, and send an error, or try to initiate the call anyway? If the former, what would the error be? I have found the error code for "callee busy", but nothing similar to "caller busy".
Alternatively, is there an API call I could make before initiating the call to make sure number X is available and not in another call?
Twilio numbers can have multiple calls associated with them, so there would be no error id the Phone X was on an existing call (since phone numbers can be routed however you choose). You can set the outbound CallerID to be another Twilio number or a verified callerID (but if they call that verified callerID back, it wont go back to Twilio but the carrier/business owning that number).
Once the dialed party answers after making the outbound API call, you tell Twilio how to route the other piece (who to connect the answering party to) via the URL parameter hosting the Twilio Markup Language (TwiML).
There is an API call and example for, Read multiple Call resources and filter by call status and phone number (Code Example), you could query before making your outbound call (assuming you always map inbound calls to the same endpoint) or routing your inbound call (which probably makes more sense if you want to re-route to another destination who can answer the call).
The status of this call. Can be: queued, ringing, in-progress, canceled, completed, failed, busy or no-answer.
How do i set up twilio where it shows an extension after sending the call to my phone? Example: the caller id that shows up from the caller to my phone is, "123-456-7890" - is there any way to make that number show up as "123-456-7890X" or anything after so that i know its coming from twilio.
Twilio developer evangelist here.
You can't add anything to the caller ID like that, but you can do something else to alert you that an incoming call is from Twilio.
When you set up your TwiML to forward the call, you can set the url attribute on the <Number> element. You can point this URL at some more TwiML that will be played before the calls are connected. This is called a call whisper and you can use it to tell yourself that the call is coming from Twilio before you connect with the caller.
Let me know if that helps at all.
My Twilio server has 3 pages
/listener
Sets up a <dial> and <Conference statusCallback="/gather" statusCallbackEvent="speaker start"> and appends caller to said conference. In the conference, the events request should be sent on any user speaking and conference starting (starting is just used for debugging in case it's something wrong with speaking alone, but the starting request won't be sent as well).
/gather
Uses gather to listen to speech with action='/parse'
/parse
Parses the message.
Right now, when I set the webhook to /gather, I could see 2 POST requests to /gather and /parse no problem. But when I set it to /listener, only 1 POST request per call would appear and no subsequent requests would be sent on conference start or people speaking. Can anyone possibly tell me any example of statusCallbackEvent working with gather or provide any workarounds?
Twilio developer evangelist here.
It looks to me like you are trying to use speech detection on the ongoing conference call via events?
If that is the case, then I'm afraid that is not what statusCallbacks in <Conference> do. statusCallback events during calls are asynchronous callbacks, your response to them will not affect the ongoing call. Responding to a statusCallback event with TwiML will have no effect.
Subsequently, it's not possible to simultaneously continue a <Conference> and use <Gather> on the participants.
I have a twilio number that can process incoming calls with twiml. These incoming calls expect the recipient to press some digits after the call is connected.
If I were making an outgoing call, I could use the sendDigits attribute of a <Dial> tag. However, I can't figure out how to do this in response to an incoming call.
If I were receiving the call in a web client, I could use connection.sendDigits
Is there a way to do this in just twiml? Should I just play a recording file of various DTMF tones?
Edit: To clarify, I'm receiving calls from another automated system that expects additional numbers to be dialed after the call is connected.
Turns out the way to to do this is by using the <Play> twiml tag, which accepts a digits attribute.
<Play digits="94"></Play>