Twilio呼叫转移 [英] Twilio call forwarding

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

问题描述

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

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

我想创建一个应用程序,允许用户将其现有号码转发给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 ...

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 ve之前看到"呼叫(是第一次还是第二次转发)?但是您必须将呼叫转接到第三个号码,以避免已经遇到的转接问题.

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天全站免登陆