Quantcast
Channel: Active questions tagged cti - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 41

How can I build my own Twiml for outbound calls?

$
0
0

I am trying to build a call center based on Twilio and I wanted to know if we can build out own Call object like below code does in Java:

link: https://www.twilio.com/docs/voice/api/call-resource

    public class Example {    // Find your Account Sid and Token at twilio.com/console    // DANGER! This is insecure. See http://twil.io/secure    public static final String ACCOUNT_SID = "AC4b0f61f6aaa27a4231e6c03be3488178";    public static final String AUTH_TOKEN = "your_auth_token";    public static void main(String[] args) {        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);        Call call = Call.creator(                new com.twilio.type.PhoneNumber("+15558675310"),                new com.twilio.type.PhoneNumber("+15552223214"),                **new com.twilio.type.Twiml("<Response><Say>Ahoy there!</Say></Response>"))**            .create();        System.out.println(call.getSid());    }}

I know we can use the URL parameter, but I want to dynamically create a Twiml, rather than use a resource that is going to be static.

If we cannot build a Twiml dynamically, and use that to build our call resource, is there any way I can create a dial.xml file dynamically?

Source: https://www.twilio.com/docs/voice/twiml/dial

Any help is much appreciated!


Viewing all articles
Browse latest Browse all 41

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>