By reading the Twilio tutorial, I am able to place outbound calls. But, can you point out a tutorial where I can find information that teaches how to place a outbound call in Twilio using a custom message (.i.e Good morning my friend)? On Twilio website there are several tutorials showing how to place calls, but I wasnt able to find any showing how to customize the message spoken when the call is placed.
2
Answers
Twilio developer evangelist here.
When you place an outbound call with Twilio you provide a URL parameter that points to some TwiML that tells Twilio what to do with the call next.
You can customise the message by customising the TwiML that you respond with. You need to return the TwiML you want. For your example you can return:
If you want to return dynamic content then you need to generate this TwiML from a web application.
There are a whole bunch of tutorials for building custom voice applications with Twilio in the documentation here.
Let me know if that helps at all.
Just for new upcoming who want to know how to customize Twilio calls message, you can use
twiml
key in the passed array to create method, a full snippet is below: