Remove caller id prefix from follow me.

This commit is contained in:
Mark Crane
2012-12-18 14:15:38 +00:00
parent 310cf55710
commit 44fa591991
4 changed files with 27 additions and 27 deletions

View File

@@ -48,8 +48,8 @@
$text['label-ring-5']['en-us'] = 'Ring 5th Number';
$text['label-ring-5']['pt-pt'] = '5º Número a Tocar';
$text['label-cid-prefix']['en-us'] = 'CID Prefix';
$text['label-cid-prefix']['pt-pt'] = '';
//$text['label-cid-prefix']['en-us'] = 'CID Prefix';
//$text['label-cid-prefix']['pt-pt'] = '';
$text['description-cid-prefix']['en-us'] = 'Set the caller ID name prefix.';
$text['description-cid-prefix']['pt-pt'] = '';

View File

@@ -117,7 +117,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if (count($_POST)>0) {
$forward_all_enabled = check_str($_POST["forward_all_enabled"]);
$forward_all_destination = check_str($_POST["forward_all_destination"]);
$cid_name_prefix = check_str($_POST["cid_name_prefix"]);
//$cid_name_prefix = check_str($_POST["cid_name_prefix"]);
$call_prompt = check_str($_POST["call_prompt"]);
$follow_me_enabled = check_str($_POST["follow_me_enabled"]);
@@ -230,7 +230,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$follow_me->domain_name = $_SESSION['domain_name'];
$follow_me->extension_uuid = $extension_uuid;
$follow_me->db_type = $db_type;
$follow_me->cid_name_prefix = $cid_name_prefix;
//$follow_me->cid_name_prefix = $cid_name_prefix;
$follow_me->call_prompt = $call_prompt;
$follow_me->follow_me_enabled = $follow_me_enabled;
@@ -317,7 +317,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
$cid_name_prefix = $row["cid_name_prefix"];
//$cid_name_prefix = $row["cid_name_prefix"];
$call_prompt = $row["call_prompt"];
$follow_me_enabled = $row["follow_me_enabled"];
@@ -576,16 +576,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-cid-prefix'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='cid_name_prefix' maxlength='255' value='$cid_name_prefix'>\n";
echo "<br />\n";
echo $text['description-cid-prefix']." \n";
echo "</td>\n";
echo "</tr>\n";
//echo "<tr>\n";
//echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
//echo " ".$text['label-cid-prefix'].":\n";
//echo "</td>\n";
//echo "<td class='vtable' align='left'>\n";
//echo " <input class='formfld' type='text' name='cid_name_prefix' maxlength='255' value='$cid_name_prefix'>\n";
//echo "<br />\n";
//echo $text['description-cid-prefix']." \n";
//echo "</td>\n";
//echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";

View File

@@ -30,7 +30,7 @@ include "root.php";
public $domain_uuid;
public $db_type;
public $follow_me_uuid;
public $cid_name_prefix;
//public $cid_name_prefix;
public $call_prompt;
public $follow_me_enabled;
private $extension;
@@ -73,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 .= ")";
@@ -81,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 .= ")";
@@ -99,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' ";
@@ -270,7 +270,7 @@ 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"];
//$cid_name_prefix = $row["cid_name_prefix"];
$call_prompt = $row["call_prompt"];
if ($this->follow_me_enabled == "false" && $row["follow_me_enabled"] == "true") {
$this->dial_string_update = true;
@@ -294,9 +294,9 @@ include "root.php";
if ($this->call_prompt == "true") {
$dial_string .= ",call_prompt=true";
}
if (strlen($this->cid_name_prefix) > 0) {
$dial_string .= ",cid_name_prefix=".$this->cid_name_prefix;
}
//if (strlen($this->cid_name_prefix) > 0) {
// $dial_string .= ",effective_caller_id_name=".$this->cid_name_prefix."#123";
//}
$dial_string .= "}";
foreach ($result as &$row) {
$dial_string .= "[presence_id=".$row["follow_me_destination"]."@".$_SESSION['domain_name'].",";

View File

@@ -74,10 +74,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key'] = 'primary';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'cid_name_prefix';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
$z++;
//$apps[$x]['db'][$y]['fields'][$z]['name'] = 'cid_name_prefix';
//$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
//$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';
//$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'call_prompt';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['description']['en'] = '';