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条)

报告相同问题?

悬赏问题

  • ¥15 抖音咸鱼付款链接转码支付宝
  • ¥15 ubuntu22.04上安装ursim-3.15.8.106339遇到的问题
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了