I've looked at the docs and haven't found anything that is capable of what I'm trying to do. Basically I have the phone call user do a input via a GATHER, and is prompted with a twiml SAY response. Is there a way to record ONLY the response? Most of the recording options record either the user only, or the entire phone call
Gather response cannot be recorded. If you need to know what user had entered, just say entered digits in gather action.
Gather Documentation
Related
I created a simple call screener using Twilio Studio Flows.
How it works:
Someone calls my Twilio number
A greeting is played
If they hang-up or record audio
Twilio sends a SMS text, with the audio recording URL, to my actual phone number
The Media URL value is {{widgets.RECORD_VM.RecordingUrl}} according to the docs
Visual:
Problem:
Most of the time, the Flow fails with ERROR - 11200
If I drill into one of the errors and replay the request, the audio recording is returned.
It feels like there needs to be a pause between the time the RECORD_VM step and SEND_SMS steps in the Flow.
Some pause to give Twilio time to write the audio recording to a database so it can be retrieved by the SEND_SMS step.
But it I don't see an option for this in Flow.
How should I troubleshoot and address this?
The fix ended up being:
Move {{widgets.RECORD_VM.RecordingUrl}} from the MEDIA URL field to the MESSAGE BODY field as shown.
(Thanks to Akash # Twilio Support!)
I would like to know if there is anyway to retrieve multiple record from a twilio call. What I am trying to do is to get voice responses records from my users.Once I have those I would apply my own NLP software to do some Speech to text.For now what I got is a TWIml bin doing then a then in action url I would like to do something to do a new and a new everything in the same call.
Twilio developer evangelist here.
Every time you use <Record> during a call and the recording completes, the URL of that recording is sent to the recordingStatusCallback attribute that you can set on the TwiML.
Once the call is complete, you can also use the Twilio REST API to retrieve all the recordings for a call.
I'm not sure what else you were asking. I hope this helps.
I want to get received messages of the same day of a phone number with the help of API or anything.
(I have purchased ofcourse a phone number)
**
Requirement :
**
I have a twilio app which sends 5 questions to 1000 user and users reply's to it. Like a survey. App is deployed on Azure.
I will get 5000 messages in log.
I am planning to retrieve messages by phone number and update my database from the user.
Implemented :
Implemented this https://www.twilio.com/docs/guides/sms/how-to-receive-and-reply-in-csharp. Any other idea for the requirement is also appreciated.
Twilio developer evangelist here.
I see that you've implemented the basic flow for responding to incoming SMS messages. If you are implementing surveys across a number of users my advice would be to expand on that application.
Firstly, you would need to run through your database to get all your users' phone numbers and send the first question to all of them using the Twilio REST API to send each a text message.
Then, when you receive an incoming message from one of your respondents you can find out the number that sent the message by inspecting the From parameter on the incoming request body. You can then look up your user in your database by phone number and save that response for them. Then you can use the TwiML <Message> to respond to the user and send them the next question.
This way you can collect the responses as they come in, rather than call the REST API to list all responses.
Let me know if that helps at all.
I'm new to using the Twilio API and I essentially want someone to be able to send text and have it be read out in the phone call, but then keep the line open so that more text can be sent at a later time.
It seems like I should be using the Programmable Voice API along with TwilML, but the problem I am having is that once the TwilML instructions are completed the call ends. Is there anyway I can stop this from happening and have the call wait for a Rest API update to be sent to the phone call to have it say new text?
Twilio developer evangelist here.
There are a few ways you could deal with this, but I believe the best would be to use <Enqueue>. Once your TwiML is played out, you can <Enqueue> the call and then provide a waitUrl that points to an endpoint that returns more TwiML to play to the user while they wait. This will automatically loop while the user remains in the queue. You could use this to simply <Pause> indefinitely or <Play> background music. Then, once you have more text to read to the user you can redirect the call by updating it.
Let me know if that helps at all.
I'm wanting to update a div or some area on a page that allows the user to progress, after a Twilio text goes out and receives either a 1 (true) or 0 (false) from a remote user. I'd like to give the user 5 minutes to answer the text, and have the page display the conditional result based on that answer.
Anybody know of a way to poll a result in order to display the two options? The user sends back a 1 to Twilio, which somehow goes to my server with parameters. I'm still learning how that can be done.
So I am looking for two items:
How to receive parameters from remote SMS using Twilio, passed to my server page, basically text number, sessionID, and user choice (1 or 0)
same page display of updated response from above. I'd like to not rely on page refresh.
Twilio developer evangelist here.
When you receive an SMS message on a Twilio phone number, Twilio makes an HTTP request to your application, at a URL that you supply, with all the details about the message, including the number it was from and the body of the message.
I would recommend checking out the quick start guides that we have on the site that will get you up and running sending and receiving messages using Twilio.
Once you've got the receiving messages bit sorted you then need to connect that incoming message to the browser the user was using. I'd take a look at either Server Sent Events (which I wrote about in a different context here) or web sockets, both ways of connecting the server to the browser without needing to poll or refresh. You'll have to figure out how to create channels for your users so that they only receive their own update to the page.