More work on follow me with cid_name_prefix and call_prompt.
This commit is contained in:
parent
cb07177fd7
commit
310cf55710
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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 "</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";
|
||||
echo $text['label-call-prompt'].":\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo "<select class='formfld' name='call_prompt'>\n";
|
||||
//echo "<option value=''></option>\n";
|
||||
if ($call_prompt == "true") {
|
||||
echo "<option value='true' selected='selected'>true</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='true'>true</option>\n";
|
||||
}
|
||||
if ($call_prompt == "false") {
|
||||
echo "<option value='false' selected='selected'>false</option>\n";
|
||||
}
|
||||
else {
|
||||
echo "<option value='false'>false</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-call-prompt']." \n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='2'>\n";
|
||||
echo " <br />\n";
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue