如何在 twilio api 中配置调用 url [英] how to configure call url in twilio api
问题描述
我正在创建一个用于接听电话的程序,但每次我通过电话或浏览器打电话时,它都会说自动生成的消息: 拨打另一部电话看起来像这样:
<拨号><号码>+1-555-555-5555</号码></拨号></响应>
或拨打客户电话:
<拨号><客户>[注册客户的名称]</客户></拨号></响应>
跳有帮助.
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();
});
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.
这篇关于如何在 twilio api 中配置调用 url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!