I am creating a voice survey application so that the the users can complete the survey over voice using the DTMF inputs.
I am creating multiple calls at a given moment, but i get the call information only when the call connects and the user send the DTMF.
Is there a way, i map the received DTMF input with a unique outgoing call ?
Twilio developer evangelist here.
When you create an outbound call the object that is returned includes a sid property that is the unique identifier for that call resource within Twilio. That sid will be present in the webhook requests as the CallSid parameter. So, if you store the initial call sid against your user somehow, you can always look it up using the information in the incoming webhook request.
Related
Is it possible to define custom data in outbound SMS/IVR call and receive same data back on callbackurl/webhook. I want to receive few custom parameters (apart from what twilio sends) when my webhook is called.
Try appending the custom data as URL query parameters to the URL you give Twilio to fetch the TwiML. SMS is a different animal, since it doesn't request TwiML like voice does.
How to Share Information Between Your Applications
What the title describes can already be done easily via programs like Zapier, so I am hopeful that it can be done through Twilio functions directly.
Essentially, I have my CRM set up so that based on certain triggers, it sends a http POST request to the Twilio URL that controls SMS sending:
https://api.twilio.com/2010-04-01/Accounts/ + twilioAccSId + /Messages.json
For the most part, this works great!
I just want a way for Twilio to then respond by using a function to write a record into the CRM (using the CRM's APIs).
I would want the record written to include things like the delivery status of the message e.g. whether it failed, or was successful). I'm also open to exploring other ways where Twilio can transmit this outbound message info to the CRM through other means, and then having a function on the CRM then write a record!
Do you have the code to share of what you are attempting and the issue encountered? Or is the question more if this is possible? It is certainly possible.
You will use a statusCallback URL of your outbound POST to the messages resource, which will fire with the statusCallback messages and make an API call to your CRM to update the customer record accordingly. You can append a URL query parameter to your statusCallback, so you know which customer record to update.
Track Delivery Status of Messages
How to Share Information Between Your Applications
Passing Custom Information via Requests to Twilio
I have twilio account and it is upgraded.I have IOS application where from customers number the call will be send to many number so it mandiate to verify the number of the user? and if Yes could any one please let me know if there is any automatic verification process to verify that number without disturbing the customer to verify manually?
Twilio developer evangelist here.
You can verify caller ids via the REST API using the Outgoing Caller IDs resource.
Essentially you make a POST request to that endpoint with the number you want to verify. Twilio will respond with a code that you need to show the user. Twilio will also initiate a call to that phone number asking for the user to enter the code. Once they have done so correctly, the number will be verified.
Looking over the Twilio Client setup am I correct in thinking that for each person I want to route a call to that I need to have a TwiML app set up for that person.
That way they each have a unique name to register with to accept inbound calls. Then I am also limited to only haveing 1,000 apps
Twilio evangelist here.
You should only need to have a single TwiML App, but you can dynamically generate the TwiML returned from that apps Voice Request URL with whatever client name you are trying to reach.
Hope that helps.
If I wanted to create an interoffice phone system with Twilio can you call between two registered clients on Twilio, i.e. can I call my co-worker in the office across from me?
Bonus prize, if you can do that, can you enqueue the call to the other person, essentially creating a multi-line phone for people?
Thanks!
Twilio evangelist here.
Sure, you can absolutely make a Client to Client call. The Twilio Client for JavaScript Quickstart has a walk-through showing you how to do this:
https://www.twilio.com/docs/quickstart/php/client/browser-to-browser-calls
You can also use the Queue verb in a client-to-client call.
Lets say you want to put Call A (lets call them 'customer') into a queue. To do that you would create a new TwiML App and point it at a URL that returns the <Enqueue> verb. When you initiate that client you would use that TwiML Apps SID to generate the Capability token.
Now for Call B (lets call them 'agent'). If you want to connect them to callers in your Queu, you would create another TwiML app whose URL returns TwiML with the <Dial> verb containing the <Queue> noun. This tells Twilio to connect the 'agent' with the first caller in the queue. As with the 'customer', when you initialize the 'agent', you would use the 'agent' specific TwiML App SID to generate the Capability token.
Hope that helps.
Devin