Twilio语音API

huangapple go评论69阅读模式
英文:

Twilio voice api

问题

我正在开发一个服务器,用于接收来电,然后在通话中拨号将用户A连接到用户B。我想知道这段代码是否正确?当用户B接到来电时,是否会显示用户A的联系电话号码?通话费用会由用户A支付还是由我的Twilio账户支付?

app.get('/call', async (req, res) => {
  const twiml = new VoiceResponse();
  twiml.dial('USER_B_NUMBER');
  res.type('text/xml');
  res.send(twiml.toString());
});
英文:

I am developing a server to receive incoming call and then connect the user A to use B by dialing number while on call. I want to know it this code is correct? and as User B receive a call it shows User A's contact number, will User A will be charged for the call or my Twilio account?

app.get('/call', async (req, res) => {
  const twiml = new VoiceResponse();
  twiml.dial('USER_B_NUMBER');
  res.type('text/xml');
  res.send(twiml.toString());
});

答案1

得分: 1

在这种情况下,有多个事件正在进行。首先,用户A将按其运营商的正常费率收费。

Twilio费用
> 对于呼叫转发应用程序,您将为每次对话创建两个通话腿。
>
> 来自呼叫者到您的Twilio号码的入站腿。
从Twilio到您将呼叫转发到的号码的出站腿。
每个腿都按分钟计费,并分别计入您的Twilio项目。每通电话也按最接近的一分钟四舍五入计费。

英文:

There are multiple events going on in this scenario. For once, user A will be charged their normal rate (based on their carrier).

Twilio charges:
>For call forwarding applications, you will be creating two legs for each conversation.
>
>An inbound leg from the caller to your Twilio number.
An outbound leg from Twilio to the number you are forwarding the call to.
Each leg is billed separately to your Twilio project on a per-minute basis. Each call is also rounded up to the closest minute.

huangapple
  • 本文由 发表于 2023年6月5日 03:52:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76402163.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定