We have a twilio number.
When ever any one call on that twilio number then there is an automated voice of twilio play. Can we customize this to a new message?
Thanks,
Rajendra
Twilio developer evangelist here.
You can customise Twilio calls as much as you want! I recommend you take a look through this QuickStart for handling incoming phone calls with Twilio which should get you up and running.
To quickly describe it though, you have a Twilio number and that number has a Voice Request URL configured in the number's settings. When you make a call to that Twilio number, Twilio makes an HTTP request to the URL. That URL needs to return TwiML (a set of instructions to Twilio in XML) which tells Twilio what to do with the call.
If you update the URL to something you control and then return different TwiML, then you can change the message and do a whole lot of other stuff with your Twilio number.
Related
How can one create a bot in Flow.xo that listens to twilio messages? In other words can I write a bot in FlowXO to send and receive SMS messages from my twilio account?
Flow.XO allows one to send SMS messages via their twilio integration function, but it only has two functions:
1> Twilio calls
2> Twilio SMS messages
Both these are outward bound, and we can only send messages (calls, or SMS) via twilio from Flow.xo. Can I receive messages in FlowspellingXO from Twilio too? How is this accomplished?
Thanks in anticipation.
Twilio developer evangelist here.
I haven't used Flow.XO before, but a quick look through the documentation suggests that this is the guide for you: https://support.flowxo.com/article/152-creating-a-twilio-sms-bot
Going through that process will create a URL that you will apply to your Twilio number or messaging service. That URL is the webhook URL that Twilio will use to send details about incoming messages so that your bot can respond to replies from your user.
Let me know if that helps!
Is there a way to route a voice call to google Dialogflow (or Amazon Lex) ?
sequence:
Call comes into to a number
Twilio sends the voice input to endpoint (DialogFlow)
Text response is received from DialogFlow
Twilio streams voice (text to speech) back to caller
Note: This can be achieved using Google telephony. However, I would like to know if this is possible by using the twilio at the call handling layer ?
Twilio developer evangelist here.
You could do this using <Gather> with input="speech" to transcribe the caller's speech to text. When the live transcription is complete, Twilio makes a webhook request to the action attribute for the <Gather> with the SpeechResult as one of the parameters.
You can then send that text to the service you want to use (Dialogflow/Lex), which will respond with the response which you can then put into a <Say> element and respond to the webhook to speak the response.
If you're interested in building automated response bots like this, you might want to look into Twilio Autopilot which has the speech to text and NLP built in for phone calls and can also be used across messaging platforms and Alexa too.
I've recently changed /voice url on my twilio's number.
I've changed from a https://domain.localtunnel.me to to http://newdomainname.com.
But, when I'm trying to call someone, twilio still uses the old https url, so I've got many 11200- HTTP retrieval failure errors in my debugger.
Why twilio doesn't use the new url ? My client side doesn't send twilio any kind of URL, so I'm expecting it to use the one I've set on my number page.
Is there a setting I've missed ?
Thanks,
Twilio developer evangelist here.
After some more investigation it turned out that the test calls to the number were being made with Twilio Client. When you use Twilio Client you need to provide a TwiML Application which has a URL for what to do when making outbound Twilio calls. In this case, the outbound URL in the TwiML application needed to be updated from the localtunnel version to the new URL too.
I am working on an Opt-In /Opt-Out api that integrates with Twilio. The way our Opt-In/Opt-Out works is each company (our customer) signs up for one or more Twilio phone numbers and their customers can opt-in/opt-out into these numbers.
When Twilio receives these opt-in/opt-outs we want Twilio to call us into a webhook URL.
So my question is: how do we register these callback URLs? Do these have to be defined at the time when each company signs up for a phone number? If so whats the API end point for that?
These numbers can be added by different companies at any time. Please advise how to do that. We already have URLs defined for sending and receiving SMS messages with Twilio. In this case we first send the message to Twilio and we specify a callback url in that. Can the Opt-In/Opt-outs work with these already registered end points?
All the phone numbers these companies sing up for are created as a subaccount under us. So is that fine with Twilio and can Twilio call us back on the already registered end points (URLs).
If you have any documentation on how to set up an Opt-In/Opt-Out,please include that. I couldn't find one anywhere. The API method we use for creating subaccounts when companies sign up for a phone number is CreateSubAccount and there is no parameter to specify an call back endpoint URL. I tried contacting their support but they haven't gotten back to us yet.
Twilio developer evangelist here.
I'm not sure exactly what you mean when you say "When Twilio receives these opt-in/opt-outs" as the only thing you will get webhooks for is when a number receives an incoming SMS (or phone call, but we're talking SMS right now).
You can set a different SMS webhook URL per each phone number using the API when you buy the phone number. As part of the POST request to the Incoming Phone Numbers resource you can add the optional parameters SmsUrl and SmsMethod.
Once you have purchased the number, you can also update the webhook URLs for it, by POSTing or PUTing to the instance resource, using the same parameters.
Let me know if this helps at all.
I need to make calls to some Twilio clients that will received the call through the browser. The problem is, these clients don't necessarily have their browser open.
I know normally, a user would have to open up the browser and through the twilio util capability and twilio device to turn their browser into a device. And THEN they can receive incoming call.
Is there way to dial clients, when they haven't initialize their twilio client yet?
Twilio evangelist here.
If you try to dial a client who is not online Twilio will view that as a no-answer. You can get a notification of this by providing a URL for the <Dial> verbs action parameter.
When the call ends Twilio will make a request to this URL with a parameter named DialCallStatus which you can use to determine what happened when Twilio tried to dial the Client.
Hope that helps.