Create call_forward.php

This commit is contained in:
FusionPBX
2017-06-09 10:27:32 -06:00
committed by GitHub
parent 66b849d946
commit a222007792

View File

@@ -126,24 +126,23 @@ include "root.php";
else {
// setting here presence_id equal extension not dialed number allows work BLF and intercept.
$presence_id = extension_presence_id($this->extension, $this->number_alias);
if (strlen($caller_id_number) > 0) {
if (strlen($caller_id_number) > 0) {
//set the caller id if it is set
if (strlen($caller_id_name) > 0) {
if (strlen($caller_id_name) > 0) {
$dial_string .= ",origination_caller_id_name=".$caller_id_name;
$dial_string .= ",effective_caller_id_name=".$caller_id_name;
}
}
$dial_string .= ",origination_caller_id_number=".$caller_id_number;
$dial_string .= ",effective_caller_id_number=".$caller_id_number;
}
else {
//set the outbound caller id number if the caller id number is a user
$dial_string .='{origination_caller_id_number=${cond(${from_user_exists} == true ? ${outbound_caller_id_number} : ${origination_caller_id_number})}}';
$dial_string .='{effective_caller_id_number=${cond(${from_user_exists} == true ? ${outbound_caller_id_number} : ${effective_caller_id_number})}}';
$dial_string .='{origination_caller_id_name=${cond(${from_user_exists} == true ? ${outbound_caller_id_name} : ${origination_caller_id_name})}}';
$dial_string .='{effective_caller_id_name=${cond(${from_user_exists} == true ? ${outbound_caller_id_name} : ${effective_caller_id_name})}}';
}
}
else {
//set the outbound caller id number if the caller id number is a user
$dial_string .=',origination_caller_id_number=${cond(${from_user_exists} == true ? ${outbound_caller_id_number} : ${origination_caller_id_number})}';
$dial_string .=',effective_caller_id_number=${cond(${from_user_exists} == true ? ${outbound_caller_id_number} : ${effective_caller_id_number})}';
$dial_string .=',origination_caller_id_name=${cond(${from_user_exists} == true ? ${outbound_caller_id_name} : ${origination_caller_id_name})}';
$dial_string .=',effective_caller_id_name=${cond(${from_user_exists} == true ? ${outbound_caller_id_name} : ${effective_caller_id_name})}';
}
// $presence_id = $this->forward_all_destination;
$dial_string .= ",presence_id=".$presence_id."@".$_SESSION['domain_name'];