Reputation: 93
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?
Upvotes: 0
Views: 399
Reputation: 131
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);
});
Upvotes: 5