【问题标题】:How to add an extension number in twilio click to call using node js如何在 twilio 中添加分机号码单击以使用节点 js 进行呼叫
【发布时间】:2020-12-16 05:29:16
【问题描述】:

根据文档 here 和 github 源代码 here,我已经克隆了应用程序,它运行良好。

假设如果我的销售人员有一些扩展名,那么我如何在这个脚本中提供该扩展名。通常,使用 senddigit 我可以在 twilio 中传递扩展名,但我不知道如何使用这个 salesNumber 来实现。

  twilioClient.createCall(salesNumber, phoneNumber, headersHost)
    .then((result) => {
    response.send({message: result});
    })
    .catch((error) => {
    response.status(500).send(error);
    });

请有人帮忙。

【问题讨论】:

    标签: node.js twilio twilio-click-to-call twilio-programmable-voice


    【解决方案1】:

    我认为您在这里查看了错误的代码 sn-p。上面的代码没有直接调用 Twilio 客户端。相反,它从this file 调用辅助函数来发起调用。

    一旦用户拿起,他们将在此功能中通过 TwiML 连接到销售人员:

      voiceResponse: (salesNumber, Voice = VoiceResponse) => {
        let twimlResponse = new Voice();
    
        twimlResponse.say('Thanks for contacting our sales department. Our ' +
                          'next available representative will take your call. ',
                          { voice: 'alice' });
        twimlResponse.dial(salesNumber);
    
        return twimlResponse.toString();
      }
    

    在此功能中,您将能够按照提到的here 发送数字。

    【讨论】:

      猜你喜欢
      • 2017-10-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多