0
votes

When i make a call as voice content to that call, can i send a dynamically generated twiml message rather pointing to a URI that contains twiml message ?

If not is there a a workaround to accomplish this , cause I see DIAL and SAY APIs which get used during call response, so would it be possible to make use of those when creating a new call and passing twiml messages using these APIs ?

https://www.twilio.com/docs/api/twiml/dial https://www.twilio.com/docs/api/twiml/say

1

1 Answers

0
votes

Twilio evangelist here.

Its not possible to send TwiML to the REST API. If you don't want to host the TwiML on your own URL there are a few options:

  • Use TwiML Bins which lets you host relatively static (there is some templating support) TwiML on Twilios servers.

  • Use Twilio Functions which let you write, store and execute Node on Twilios servers

  • Use Twilio Studio to define your call flow. A flow in studio can be triggered via an HTTP request to it, so you can take the flows URL and pass it to the REST API when you start your outbound call.

Hope that helps.