diff --git a/app/calls/app_languages.php b/app/calls/app_languages.php
index 4024194de2..3316707d96 100644
--- a/app/calls/app_languages.php
+++ b/app/calls/app_languages.php
@@ -48,6 +48,18 @@
$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['description-cid-prefix']['en-us'] = 'Set the caller ID name prefix.';
+ $text['description-cid-prefix']['pt-pt'] = '';
+
+ $text['label-call-prompt']['en-us'] = 'Call Prompt';
+ $text['label-call-prompt']['pt-pt'] = '';
+
+ $text['description-call-prompt']['en-us'] = 'Prompt to accept the call for external destinations.';
+ $text['description-call-prompt']['pt-pt'] = '';
+
$text['label-ring-order']['en-us'] = 'Ring Order';
$text['label-ring-order']['pt-pt'] = 'Pedir Chamada';
diff --git a/app/calls/call_edit.php b/app/calls/call_edit.php
index 692b743412..6794cb88aa 100644
--- a/app/calls/call_edit.php
+++ b/app/calls/call_edit.php
@@ -117,6 +117,8 @@ 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"]);
+ $call_prompt = check_str($_POST["call_prompt"]);
$follow_me_enabled = check_str($_POST["follow_me_enabled"]);
$destination_data_1 = check_str($_POST["destination_data_1"]);
@@ -228,6 +230,8 @@ 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->call_prompt = $call_prompt;
$follow_me->follow_me_enabled = $follow_me_enabled;
$follow_me->destination_data_1 = $destination_data_1;
@@ -313,6 +317,8 @@ 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"];
+ $call_prompt = $row["call_prompt"];
$follow_me_enabled = $row["follow_me_enabled"];
$sql = "select * from v_follow_me_destinations ";
@@ -570,6 +576,42 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "\n";
echo "\n";
+ echo "
\n";
+ echo "| \n";
+ echo " ".$text['label-cid-prefix'].":\n";
+ echo " | \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo $text['description-cid-prefix']." \n";
+ echo " | \n";
+ echo "
\n";
+
+ echo "\n";
+ echo "| \n";
+ echo $text['label-call-prompt'].":\n";
+ echo " | \n";
+ echo "\n";
+ echo "\n";
+ echo " \n";
+ echo $text['description-call-prompt']." \n";
+ echo " | \n";
+ echo "
\n";
+
echo "\n";
echo "\n";
echo " \n";
diff --git a/app/calls/resources/classes/switch_follow_me.php b/app/calls/resources/classes/switch_follow_me.php
index 14822c654c..a35016638a 100644
--- a/app/calls/resources/classes/switch_follow_me.php
+++ b/app/calls/resources/classes/switch_follow_me.php
@@ -30,6 +30,8 @@ include "root.php";
public $domain_uuid;
public $db_type;
public $follow_me_uuid;
+ public $cid_name_prefix;
+ public $call_prompt;
public $follow_me_enabled;
private $extension;
private $dial_string_update = false;
@@ -62,9 +64,6 @@ include "root.php";
public $destination_timeout = 0;
public $destination_order = 1;
- public $cid_name_prefix;
- public $call_prompt;
-
public function follow_me_add() {
//set the global variable
global $db;
@@ -74,12 +73,16 @@ include "root.php";
$sql .= "(";
$sql .= "domain_uuid, ";
$sql .= "follow_me_uuid, ";
+ $sql .= "cid_name_prefix, ";
+ $sql .= "call_prompt, ";
$sql .= "follow_me_enabled ";
$sql .= ")";
$sql .= "values ";
$sql .= "(";
$sql .= "'$this->domain_uuid', ";
$sql .= "'$this->follow_me_uuid', ";
+ $sql .= "'$this->cid_name_prefix', ";
+ $sql .= "'$this->call_prompt', ";
$sql .= "'$this->follow_me_enabled' ";
$sql .= ")";
if ($v_debug) {
@@ -267,6 +270,8 @@ 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"];
+ $call_prompt = $row["call_prompt"];
if ($this->follow_me_enabled == "false" && $row["follow_me_enabled"] == "true") {
$this->dial_string_update = true;
}
@@ -286,11 +291,11 @@ include "root.php";
$prep_statement_2->execute();
$result = $prep_statement_2->fetchAll(PDO::FETCH_NAMED);
$dial_string = "{group_confirm_key=exec,group_confirm_file=lua confirm.lua,sip_invite_domain=".$_SESSION['domain_name'];
- if ($this->dial_string == "true") {
- $this->dial_string .= ",call_prompt=true";
+ if ($this->call_prompt == "true") {
+ $dial_string .= ",call_prompt=true";
}
if (strlen($this->cid_name_prefix) > 0) {
- $this->dial_string .= ",cid_name_prefix=".$this->cid_name_prefix;
+ $dial_string .= ",cid_name_prefix=".$this->cid_name_prefix;
}
$dial_string .= "}";
foreach ($result as &$row) {
|