-
-
Save mickstevens/1689dfc18713da137f88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// From http://ertw.com/blog/2013/11/05/using-an-ip-phone-with-twilio/ | |
// Connect an incoming call to your SIP phone through Twilio | |
$called = preg_replace('/sip:1?(.*?)@.*/', '{$1}', $_POST['Called']); | |
header("content-type: text/xml"); | |
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; | |
?> | |
<Response> | |
<Dial timeout="10" record="false" callerId="YOURTWILIONUMBER"><?= $called ?></Dial> | |
</Response> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment