Created
June 7, 2013 20:04
-
-
Save guilespi/5732017 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 | |
//Main script settings | |
$CALL_ERROR_MSG = "Sorry, but I could not connect your call. Please try again later"; | |
$ALT_CALLER_ID = ""; | |
if (substr($CALLER_ID, 0, 3)=="011") { | |
$CALLER_ID = "00" . substr($CALLER_ID, 3); | |
} | |
//When a call transfer failure occurs | |
function callFailure($event) { | |
say($CALL_ERROR_MSG); | |
} | |
//Transfering the call to SIP | |
if($currentCall->callerID == "") { | |
transfer("sip:[email protected]/1000", array( | |
"timeout" => 120, | |
"answerOnMedia" => true, | |
"callerID" => $CALLER_ID, | |
"onTimeout" => "callFailure", | |
"onCallFailure" => "callFailure")); | |
} else { | |
transfer("sip:[email protected]/1000", array( | |
"timeout" => 120, | |
"answerOnMedia" => true, | |
"onTimeout" => "callFailure", | |
"onCallFailure" => "callFailure")); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment