Uncomment and fix the follow me caller id prefix but only show it for people with the follow_me_cid_name_prefix. Add follow me to the app menu.

This commit is contained in:
Mark Crane
2013-05-01 17:05:53 +00:00
parent 9b9c0429a6
commit 928c03f347
6 changed files with 76 additions and 66 deletions

View File

@@ -30,7 +30,8 @@ include "root.php";
public $domain_uuid;
public $db_type;
public $follow_me_uuid;
//public $cid_name_prefix;
public $cid_name_prefix;
public $accountcode;
public $call_prompt;
public $follow_me_enabled;
private $extension;
@@ -72,7 +73,7 @@ include "root.php";
$sql .= "(";
$sql .= "domain_uuid, ";
$sql .= "follow_me_uuid, ";
//$sql .= "cid_name_prefix, ";
$sql .= "cid_name_prefix, ";
$sql .= "call_prompt, ";
$sql .= "follow_me_enabled ";
$sql .= ")";
@@ -80,7 +81,7 @@ include "root.php";
$sql .= "(";
$sql .= "'$this->domain_uuid', ";
$sql .= "'$this->follow_me_uuid', ";
//$sql .= "'$this->cid_name_prefix', ";
$sql .= "'$this->cid_name_prefix', ";
$sql .= "'$this->call_prompt', ";
$sql .= "'$this->follow_me_enabled' ";
$sql .= ")";
@@ -98,7 +99,7 @@ include "root.php";
//update follow me table
$sql = "update v_follow_me set ";
$sql .= "follow_me_enabled = '$this->follow_me_enabled', ";
//$sql .= "cid_name_prefix = '$this->cid_name_prefix', ";
$sql .= "cid_name_prefix = '$this->cid_name_prefix', ";
$sql .= "call_prompt = '$this->call_prompt' ";
$sql .= "where domain_uuid = '$this->domain_uuid' ";
$sql .= "and follow_me_uuid = '$this->follow_me_uuid' ";
@@ -269,9 +270,9 @@ include "root.php";
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
if (count($result) > 0) {
foreach ($result as &$row) {
//$cid_name_prefix = $row["cid_name_prefix"];
$follow_me_uuid = $row["follow_me_uuid"];
$this->call_prompt = $row["call_prompt"];
$this->cid_name_prefix = $row["cid_name_prefix"];
}
}
unset ($prep_statement);
@@ -293,9 +294,12 @@ include "root.php";
if ($this->call_prompt == "true") {
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua";
}
//if (strlen($this->cid_name_prefix) > 0) {
// $dial_string .= ",effective_caller_id_name=".$this->cid_name_prefix."#123";
//}
if (strlen($this->cid_name_prefix) > 0) {
$dial_string .= ",origination_caller_id_name=".$this->cid_name_prefix."#\${caller_id_name}";
}
if (strlen($this->accountcode) > 0) {
$dial_string .= ",accountcode=".$this->accountcode."}";
}
$dial_string .= "}";
foreach ($result as &$row) {
$dial_string .= "[presence_id=".$row["follow_me_destination"]."@".$_SESSION['domain_name'].",";