简体   繁体   中英

Set Twilio Voice Response to URL rather than TwiML App via API

I am attempting to set the Twilio Voice URL via API as per the following SO question:

Twilio: Update the Voice (or Message) URL via API?

However, when I do so, the voice response is still set to the TwiML App rather than the URL in my 'Manage Phone Numbers' page

How do I also configure the phone number to use the URL rather than TwiML App?

var accountSid = 'ACbc1cca15210666b7fcd7d4a95a309f6c';
var authToken = "{{ auth_token }}";
var client = require('twilio')(accountSid, authToken);

client.incomingPhoneNumbers("PN2a0747eba6abf96b7e3c3ff0b4530f6e").update({
    voiceUrl: "http://demo.twilio.com/docs/voice.xml",
    smsUrl: "http://demo.twilio.com/docs/sms.xml"
}, function(err, number) {
    console.log(number.voiceUrl);
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM