add a way to customize the default dial string for follow me

This commit is contained in:
Mark Crane 2014-04-30 09:30:09 +00:00
parent 36e45c9504
commit 5666962c9d
2 changed files with 15 additions and 9 deletions

View File

@ -325,6 +325,7 @@ include "root.php";
foreach ($result as &$row) {
$dial_string .= "[";
if (extension_exists($row["follow_me_destination"])) {
if (strlen($_SESSION['domain']['dial_string']['text']) == 0) {
$dial_string .= "outbound_caller_id_number=\${caller_id_number},";
$dial_string .= "presence_id=".$row["follow_me_destination"]."@".$_SESSION['domain_name'].",";
if ($this->call_prompt == "true") {
@ -335,6 +336,11 @@ include "root.php";
$dial_string .= "\${sofia_contact(".$row["follow_me_destination"]."@".$_SESSION['domain_name'].")},";
//$dial_string .= "user/".$row["follow_me_destination"]."@".$_SESSION['domain_name'].",";
}
else {
$dial_string = $_SESSION['domain']['dial_string']['text'];
$dial_string = str_replace("\${dialed_user}", $row["follow_me_destination"], $dial_string);
}
}
else {
$dial_string .= "outbound_caller_id_number=\${outbound_caller_id_number},";
$dial_string .= "presence_id=".$this->extension."@".$_SESSION['domain_name'].",";