From 6005ce087f87b7f57075e8cd442d31e045ffdf56 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 6 Jul 2013 04:48:23 +0000 Subject: [PATCH] Add caller id number prefix to follow me. --- app/calls/call_edit.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/app/calls/call_edit.php b/app/calls/call_edit.php index 5c6254537c..3331b2cd98 100644 --- a/app/calls/call_edit.php +++ b/app/calls/call_edit.php @@ -119,6 +119,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 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_number_prefix = check_str($_POST["cid_number_prefix"]); $call_prompt = check_str($_POST["call_prompt"]); $follow_me_enabled = check_str($_POST["follow_me_enabled"]); @@ -256,6 +257,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $follow_me->extension_uuid = $extension_uuid; $follow_me->db_type = $db_type; $follow_me->cid_name_prefix = $cid_name_prefix; + $follow_me->cid_number_prefix = $cid_number_prefix; $follow_me->call_prompt = $call_prompt; $follow_me->follow_me_enabled = $follow_me_enabled; @@ -296,13 +298,13 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); $follow_me->follow_me_uuid = $follow_me_uuid; - $follow_me->follow_me_add(); + $follow_me->add(); $follow_me->set(); } } if ($follow_me_action == "update") { $follow_me->follow_me_uuid = $follow_me_uuid; - $follow_me->follow_me_update(); + $follow_me->update(); $follow_me->set(); } unset($follow_me); @@ -368,6 +370,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { $cid_name_prefix = $row["cid_name_prefix"]; + $cid_number_prefix = $row["cid_number_prefix"]; $call_prompt = $row["call_prompt"]; $follow_me_enabled = $row["follow_me_enabled"]; @@ -560,7 +563,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " ".$text['label-ring-delay']."\n"; destination_select('destination_delay_1', $destination_delay_1, '0'); echo " ".$text['label-ring-timeout']."\n"; - destination_select('destination_timeout_1', $destination_timeout_1, '10'); + destination_select('destination_timeout_1', $destination_timeout_1, '30'); //echo "
\n"; //echo "This number rings first.\n"; echo "\n"; @@ -639,6 +642,19 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; } + if (permission_exists('follow_me_cid_number_prefix')) { + echo "\n"; + echo "\n"; + echo " ".$text['label-cid-number-prefix'].":\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-cid-number-prefix']." \n"; + echo "\n"; + echo "\n"; + } + echo "\n"; echo "\n"; echo $text['label-call-prompt'].":\n";