Twilio call forwarding

ぃ、小莉子 提交于 2019-12-04 13:10:05

问题


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

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.

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...

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

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>

回答1:


This is tricky. How are users forwarding their existing numbers to 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.

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.




回答2:


It is not possible to forward calls to a Twilio number and have that number call you back if you've set up call forwarding on your phone. Conditional call forwarding can only be used for unanswered or busy calls, and for some providers, certain numbers. However, AT&T and Verizon do not allow "forward all numbers but one" for call forwarding.




回答3:


you are working with twilio call it is with the best solution that we have:

"But you would have to forward the call to a third number, to avoid the forwarding problem you are already running into."



来源:https://stackoverflow.com/questions/8319093/twilio-call-forwarding

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