Twilio 呼叫转移 [英] Twilio call forwarding

查看:37
本文介绍了Twilio 呼叫转移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 Twilio 的呼叫转移概念有疑问.

I have a question about Twilio's call forwarding concept.

我想创建一个应用程序,让用户将他们现有的号码转发到 Twilio,Twilio 处理必要的信息,并将呼叫转发给用户.

I want to create an application that lets users forward their existing numbers to Twilio, which processes the necessary information, and forwards the call back to the user.

然而,当我尝试实现这一点时,会发生一个无限循环:调用被转发到 Twilio,Twilio 将调用转发回用户,用户将调用转发到 twilio...

However, when I try to implement this, an infinite loop happens: The call is forwarded to Twilio, which forwards the call back to the user, which forwards the call to twilio...

我将如何在 Twilio 端实现这一点,因为在用户端实现任何代码都很困难?

How would I implement this on the Twilio side, since it is difficult to implement any code on the user side?

这是我在 Twilio 上的代码,用于将呼叫转发回用户.

Here is my code on Twilio that forwards the call back to the user.

<?php
    header("content-type: text/xml");
?>
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Response>
  <Say>Hello User</Say>
  <Dial>+1973XXXXXXX</Dial>
</Response>

推荐答案

这很棘手.用户如何将现有号码转发到 Twilio?

This is tricky. How are users forwarding their existing numbers to Twilio?

问题在于,您需要为手机制定一条规则,例如将所有来自我手机的电话转接到我的 Twilio 号码,除非他们从 Twilio 返回到我的手机."我不确定您现有号码的呼叫转移机制是否那么复杂.

The problem is that you want a rule for your cellphone like, "Forward all calls from my cellphone to my Twilio number, unless they are coming back to my cellphone from Twilio." I'm not sure if the call forwarding mechanism for your existing numbers is that sophisticated.

在 Twilio 方面,您可以尝试根据您是否返回不同的 TwiML以前看过"这个电话(是第一次转接,还是第二次转接)?但是您必须将呼叫转接到第三个号码,以避免您已经遇到的转接问题.

On the Twilio side, you could try returning different TwiML based on whether you've "seen" the call before (is it being forwarded for the first time, or the second time)? But you would have to forward the call to a third number, to avoid the forwarding problem you are already running into.

这篇关于Twilio 呼叫转移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆