以编程方式将转接号码添加到 Twilio 号码

Add forwarding number to the Twilio number programmatically

如何将呼叫从任何手机转移到美国本地 Twilio 号码到任何美国号码?

在我看来,我将不得不使用 TwiML 来实现它。此外,https://support.twilio.com/hc/en-us/articles/223179908-Setting-up-call-forwarding#devs 中的支持文档似乎没有正确显示 TwiML。而且这样我将不得不使用动词。

我可以不直接从手机号码簿拨打Twilio号码,以便转接号码接听来电吗?

我可以不通过编程方式将转接号码设置为购买的号码吗?

这里是 Twilio 布道者。

要将移动设备拨打的电话转接到另一个美国 phone 号码,您可以使用 <Dial> 动词:

<Response>
    <Dial callerId="[your_twilio_phone_number]">[target_phone_number]</Dial>
</Response>

PHP 语音快速入门的这一部分展示了这一点,可能对您有用:

https://www.twilio.com/docs/quickstart/php/twiml/connect-call-to-second-person

希望对您有所帮助。

这是我在从 Twilio 支持人员那里得到答案之前,但在从@Devin Rader 和我的客户那里得到答案之后所做的。

here is a great tutorial doing call forwarding programmatically, https://www.twilio.com/docs/tutorials/walkthrough/call-tracking/php/laravel. Yes, you can definitely set the TwiML programmatically on the numbers, take a look at the documentation on provisioning phone numbers, https://www.twilio.com/docs/api/rest/incoming-phone-numbers. You can also set the number so that Twilio makes a call to your application and your application delivers TwiML dynamically.