Allow dialing bridge statements on follow me for advanced users. Remove unnecessary line feeds.
This commit is contained in:
parent
4e4029f2aa
commit
2d4dbf15d8
|
|
@ -146,22 +146,22 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
|||
$dnd_enabled = check_str($_POST["dnd_enabled"]);
|
||||
|
||||
if (strlen($forward_all_destination) > 0) {
|
||||
$forward_all_destination = preg_replace("~[^0-9]~", "",$forward_all_destination);
|
||||
// $forward_all_destination = preg_replace("~[^0-9]~", "",$forward_all_destination);
|
||||
}
|
||||
if (strlen($destination_data_1) > 0) {
|
||||
$destination_data_1 = preg_replace("~[^0-9]~", "",$destination_data_1);
|
||||
// $destination_data_1 = preg_replace("~[^0-9]~", "",$destination_data_1);
|
||||
}
|
||||
if (strlen($destination_data_2) > 0) {
|
||||
$destination_data_2 = preg_replace("~[^0-9]~", "",$destination_data_2);
|
||||
// $destination_data_2 = preg_replace("~[^0-9]~", "",$destination_data_2);
|
||||
}
|
||||
if (strlen($destination_data_3) > 0) {
|
||||
$destination_data_3 = preg_replace("~[^0-9]~", "",$destination_data_3);
|
||||
// $destination_data_3 = preg_replace("~[^0-9]~", "",$destination_data_3);
|
||||
}
|
||||
if (strlen($destination_data_4) > 0) {
|
||||
$destination_data_4 = preg_replace("~[^0-9]~", "",$destination_data_4);
|
||||
// $destination_data_4 = preg_replace("~[^0-9]~", "",$destination_data_4);
|
||||
}
|
||||
if (strlen($destination_data_5) > 0) {
|
||||
$destination_data_5 = preg_replace("~[^0-9]~", "",$destination_data_5);
|
||||
// $destination_data_5 = preg_replace("~[^0-9]~", "",$destination_data_5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -306,56 +306,55 @@ include "root.php";
|
|||
if (strlen($this->cid_name_prefix) > 0) {
|
||||
$dial_string .= ",origination_caller_id_name=".$this->cid_name_prefix."#\${caller_id_name}";
|
||||
}
|
||||
else
|
||||
else {
|
||||
$dial_string .= ",origination_caller_id_name=\${caller_id_name}";
|
||||
}
|
||||
|
||||
if (strlen($this->cid_number_prefix) > 0) {
|
||||
//$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."";
|
||||
$dial_string .= ",origination_caller_id_number=".$this->cid_number_prefix."#\${caller_id_number}";
|
||||
}
|
||||
else
|
||||
else {
|
||||
$dial_string .= ",origination_caller_id_number=\${caller_id_number}";
|
||||
}
|
||||
|
||||
if (strlen($this->accountcode) > 0) {
|
||||
$dial_string .= ",accountcode=".$this->accountcode;
|
||||
}
|
||||
$dial_string .= "}";
|
||||
foreach ($result as &$row) {
|
||||
|
||||
$dial_string .= "[";
|
||||
|
||||
if (extension_exists($row["follow_me_destination"])) {
|
||||
|
||||
$dial_string .= "outbound_caller_id_number=\${caller_id_number},";
|
||||
|
||||
$dial_string .= "presence_id=".$row["follow_me_destination"]."@".$_SESSION['domain_name'].",";
|
||||
if ($this->call_prompt == "true") {
|
||||
$dial_string .= "group_confirm_key=exec,group_confirm_file=lua confirm.lua,";
|
||||
}
|
||||
$dial_string .= "leg_delay_start=".$row["follow_me_delay"].",";
|
||||
$dial_string .= "leg_timeout=".$row["follow_me_timeout"]."]";
|
||||
|
||||
$dial_string .= "\${sofia_contact(".$row["follow_me_destination"]."@".$_SESSION['domain_name'].")},";
|
||||
//$dial_string .= "user/".$row["follow_me_destination"]."@".$_SESSION['domain_name'].",";
|
||||
}
|
||||
else {
|
||||
|
||||
$dial_string .= "outbound_caller_id_number=\${outbound_caller_id_number},";
|
||||
|
||||
$dial_string .= "presence_id=".$this->extension."@".$_SESSION['domain_name'].",";
|
||||
if ($this->call_prompt == "true") {
|
||||
$dial_string .= "group_confirm_key=exec,group_confirm_file=lua confirm.lua,";
|
||||
}
|
||||
$dial_string .= "leg_delay_start=".$row["follow_me_delay"].",";
|
||||
$dial_string .= "leg_timeout=".$row["follow_me_timeout"]."]";
|
||||
|
||||
$bridge = outbound_route_to_bridge ($_SESSION['domain_uuid'], $row["follow_me_destination"]);
|
||||
//if (strlen($bridge[0]) > 0) {
|
||||
// $dial_string .= "".$bridge[0].",";
|
||||
//}
|
||||
//else {
|
||||
$dial_string .= "loopback/".$row["follow_me_destination"].",";
|
||||
//}
|
||||
if (is_numeric($row["follow_me_destination"])) {
|
||||
$bridge = outbound_route_to_bridge ($_SESSION['domain_uuid'], $row["follow_me_destination"]);
|
||||
//if (strlen($bridge[0]) > 0) {
|
||||
// $dial_string .= "".$bridge[0].",";
|
||||
//}
|
||||
//else {
|
||||
$dial_string .= "loopback/".$row["follow_me_destination"].",";
|
||||
//}
|
||||
}
|
||||
else {
|
||||
$dial_string .= $row["follow_me_destination"].",";
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->dial_string = trim($dial_string, ",");
|
||||
|
|
|
|||
Loading…
Reference in New Issue