how to configure call url in twilio api

南笙酒味 提交于 2020-01-23 17:29:45

问题


i am creating a program for recieving the call, but every time i am calling via phone or browser it says a auto generated message : https://demo.twilio.com/welcome/voice/

i need to answer the call via phone and browser both, and which url i have to giv in twiml app for voice ? outgoing call or incoming?? if i am merging them no effect??

  Twilio.Device.incoming(function (conn) {
    $("#log").text("Incoming connection from " + conn.parameters.From);
    // accept the incoming connection and start two-way audio
    conn.accept();
  });

回答1:


Twilio evangelist here.

It sounds like you have not configured the Voice Request URL for your Twilio phone number.

This URL should return some TwiML to Twilio that tell it what to do with this inbound phone call. In your case it sounds like you want Twilio to dial another phone number or a Twilio Client, so your TwiML would look something like this to dial another phone:

<Response>
    <Dial>
        <Number>+1-555-555-5555</Number>
    </Dial>
</Response>

or this to dial a client:

<Response>
    <Dial>
        <Client>[name-of-the-registered-client]</Client>
    </Dial>
</Response>

Hop that helps.



来源:https://stackoverflow.com/questions/24430800/how-to-configure-call-url-in-twilio-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!