【问题标题】:Set Twilio Voice Response to URL rather than TwiML App via API通过 API 将 Twilio 语音响应设置为 URL 而不是 TwiML App
【发布时间】:2015-12-04 02:10:15
【问题描述】:

我正在尝试按照以下 SO 问题通过 API 设置 Twilio Voice URL:

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

但是,当我这样做时,语音响应仍然设置为 TwiML 应用程序,而不是我的“管理电话号码”页面中的 URL

如何配置电话号码以使用 URL 而不是 TwiML 应用程序?

【问题讨论】:

    标签: node.js api twilio


    【解决方案1】:
    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);
    });
    

    【讨论】:

    • 添加您的电话号码 sid client.incomingPhoneNumbers("PN2a0747eba6abf96b7e3c3ff0b4530f6e")
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-25
    • 1970-01-01
    相关资源
    最近更新 更多