[英]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: 我尝试按照以下SO问题通过API设置Twilio语音URL:
Twilio: Update the Voice (or Message) URL via API? Twilio:通过API更新语音(或消息)URL吗?
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 但是,当我这样做时,语音响应仍设置为TwiML App,而不是“管理电话号码”页面中的URL。
How do I also configure the phone number to use the URL rather than TwiML App? 如何将电话号码配置为使用URL而不是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);
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.