For some reason, it’s very difficult for me to understand how the Twilio model works; as a result, I try to encode the solution by guessing (something that I hate doing). Hope someone can help with the confusion.
I have already set up forwarding, so when someone sends text to my Twilio number, I get it on my phone. The problem is that when I reply to this text, it goes to Twilio instead of returning to the original sender.
I tried passing my number as the "from" string in the tag, but this is rejected by Twilio as an invalid Twilio number.
<?php header('Content-Type: text/html'); ?>
<Response>
<Message to="<?=$_REQUEST['PhoneNumber']?>">
<?=htmlspecialchars(substr($_REQUEST['From'] . $_REQUEST['Body'], 0, 1600))?>
</Message>
</Response>
source
share