caller id fixed

This commit is contained in:
luis daniel lucio quiroz
2015-06-24 16:49:07 +00:00
parent 72f7285a0a
commit 53a7ef3756
2 changed files with 23 additions and 5 deletions

View File

@@ -40,6 +40,8 @@ include "root.php";
private $dial_string;
public $accountcode;
public $forward_caller_id_uuid;
public $outbound_caller_id_name;
public $outbound_caller_id_number;
public function set() {
//set the global variable
@@ -56,6 +58,8 @@ include "root.php";
foreach ($result as &$row) {
$this->extension = $row["extension"];
$this->accountcode = $row["accountcode"];
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
}
}
unset ($prep_statement);
@@ -91,6 +95,12 @@ include "root.php";
}
}
}
else{
$dial_string .= ",outbound_caller_id_name=".$this->outbound_caller_id_name;
$dial_string .= ",outbound_caller_id_number=".$this->outbound_caller_id_number;
$dial_string .= ",origination_caller_id_name=".$this->outbound_caller_id_name;
$dial_string .= ",origination_caller_id_number=".$this->outbound_caller_id_number;
}
$dial_string .= "}";
if (extension_exists($this->forward_all_destination)) {

View File

@@ -39,6 +39,8 @@ include "root.php";
public $accountcode;
public $follow_me_enabled;
public $follow_me_caller_id_uuid;
public $outbound_caller_id_name;
public $outbound_caller_id_number;
private $extension;
public $destination_data_1;
@@ -297,6 +299,9 @@ include "root.php";
if (count($result) > 0) {
foreach ($result as &$row) {
$this->extension = $row["extension"];
$this->accountcode = $row["accountcode"];
$this->outbound_caller_id_name = $row["outbound_caller_id_name"];
$this->outbound_caller_id_number = $row["outbound_caller_id_number"];
}
}
@@ -411,13 +416,16 @@ include "root.php";
}
else {
$dial_string .= "[";
$dial_string .= "outbound_caller_id_number=$dial_string_caller_id_number,";
$dial_string .= "presence_id=".$this->extension."@".$_SESSION['domain_name'].",";
$dial_string .= "outbound_caller_id_name=".$this->outbound_caller_id_name;
$dial_string .= ",outbound_caller_id_number=".$this->outbound_caller_id_number;
$dial_string .= ",origination_caller_id_name=".$this->outbound_caller_id_name;
$dial_string .= ",origination_caller_id_number=".$this->outbound_caller_id_number;
$dial_string .= ",presence_id=".$this->extension."@".$_SESSION['domain_name'];
if ($row["follow_me_prompt"] == "1") {
$dial_string .= "group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
$dial_string .= ",group_confirm_key=exec,group_confirm_file=lua confirm.lua,confirm=true,";
}
$dial_string .= "leg_delay_start=".$row["follow_me_delay"].",";
$dial_string .= "leg_timeout=".$row["follow_me_timeout"]."]";
$dial_string .= ",leg_delay_start=".$row["follow_me_delay"];
$dial_string .= ",leg_timeout=".$row["follow_me_timeout"]."]";
if (is_numeric($row["follow_me_destination"])) {
if ($_SESSION['domain']['bridge']['text'] == "outbound" || $_SESSION['domain']['bridge']['text'] == "bridge") {
$bridge = outbound_route_to_bridge ($_SESSION['domain_uuid'], $row["follow_me_destination"]);