dongzi4030 2015-05-30 04:51
浏览 38
已采纳

试图弄清楚twilio中的呼叫是如何工作的

As subject says I am reading api docs for twilio but even after brainstorming for 2 hours I am still unable to figure out exactly how can I receive a call from twilio on my web application and answer the call with my own voice like we do in a real phone.

I know how to respond a call when someone call your twilio number but that's only text to speech conversion like their "Hello Monkey" example application but nothing so far about answering a call using their API.

Can anyone please explain how can we do that? Not everything, just main concept and few references if possible

I am using Laravel so would be good if it's in php

  • 写回答

2条回答 默认 最新

  • duanliao5995 2015-05-30 18:24
    关注

    Twilio evangelist here.

    I would suggest working through the Twilio Client for JavaScript Quickstart. This will walk you through both the server and client side code needed to build a phone in your browser, showing you how to both make outbound calls from the browser to a PSTN phone as well as receive incoming PSTN calls in the browser.

    The magic that you are looking for in either of those cases is the <Dial> verb. When an incoming PSTN call comes into Twilio, you can use the Dial verb to tell Twilio to dial and bridge that call with a Client instance:

    <Dial>
        <Client>jenny</Client>
    </Dial>
    

    When and instance of client make an outbound call and wants to connect to a PSTN phone number you again us the Dial verb:

    <Dial>
        <Number>+15555555555</Number>
    </Dial>
    

    The quickstart shows in more detail how this works.

    Hope that helps.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料