mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Add provider_uuid to destinations dialplan xml and XML CDR
This commit is contained in:
@@ -461,6 +461,15 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "provider_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_providers";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "provider_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "extension_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
@@ -829,3 +838,4 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ if (!class_exists('xml_cdr')) {
|
||||
|
||||
$this->fields[] = "xml_cdr_uuid";
|
||||
$this->fields[] = "domain_uuid";
|
||||
$this->fields[] = "provider_uuid";
|
||||
$this->fields[] = "extension_uuid";
|
||||
$this->fields[] = "sip_call_id";
|
||||
$this->fields[] = "domain_name";
|
||||
@@ -579,6 +580,11 @@ if (!class_exists('xml_cdr')) {
|
||||
$status = 'failed';
|
||||
}
|
||||
|
||||
//set the provider id
|
||||
if (isset($xml->variables->provider_uuid)) {
|
||||
$this->array[$key]['provider_uuid'] = urldecode($xml->variables->provider_uuid);
|
||||
}
|
||||
|
||||
//misc
|
||||
$key = 0;
|
||||
$uuid = urldecode($xml->variables->uuid);
|
||||
@@ -1043,10 +1049,10 @@ if (!class_exists('xml_cdr')) {
|
||||
$destination = new destinations;
|
||||
$destination_array = $destination->get('dialplan');
|
||||
|
||||
//add new rows when callee_id_number exists
|
||||
//add new rows when callee_id_number exists
|
||||
$new_rows = 0;
|
||||
foreach ($call_flow_array as $key => $row) {
|
||||
if (!empty($row["caller_profile"]["destination_number"])
|
||||
if (!empty($row["caller_profile"]["destination_number"])
|
||||
and !empty($row["caller_profile"]["callee_id_number"])
|
||||
and $row["caller_profile"]["destination_number"] !== $row["caller_profile"]["callee_id_number"]) {
|
||||
//build the base of the new_row array
|
||||
@@ -1174,9 +1180,9 @@ if (!class_exists('xml_cdr')) {
|
||||
}
|
||||
|
||||
//valet park
|
||||
if (!empty($row["caller_profile"]["destination_number"])
|
||||
if (!empty($row["caller_profile"]["destination_number"])
|
||||
and (substr($row["caller_profile"]["destination_number"], 0, 4) == 'park'
|
||||
or (substr($row["caller_profile"]["destination_number"], 0, 3) == '*59'
|
||||
or (substr($row["caller_profile"]["destination_number"], 0, 3) == '*59'
|
||||
and strlen($row["caller_profile"]["destination_number"]) == 5))) {
|
||||
//add items to the app array
|
||||
$app['application'] = 'dialplans';
|
||||
@@ -1209,7 +1215,7 @@ if (!class_exists('xml_cdr')) {
|
||||
}
|
||||
|
||||
//debug - add the callee_id_number to the end of the status
|
||||
if (isset($_REQUEST['debug']) && $_REQUEST['debug'] == 'true' && !empty($row["caller_profile"]["destination_number"])
|
||||
if (isset($_REQUEST['debug']) && $_REQUEST['debug'] == 'true' && !empty($row["caller_profile"]["destination_number"])
|
||||
and !empty($row["caller_profile"]["callee_id_number"])
|
||||
and $row["caller_profile"]["destination_number"] !== $row["caller_profile"]["callee_id_number"]) {
|
||||
$app['status'] .= ' ('.$row["caller_profile"]["callee_id_number"].')';
|
||||
@@ -1301,7 +1307,7 @@ if (!class_exists('xml_cdr')) {
|
||||
if ($application == 'destinations') {
|
||||
if ('+'.$value['destination_prefix'].$value['destination_number'] == $detail_action
|
||||
or $value['destination_prefix'].$value['destination_number'] == $detail_action
|
||||
or $value['destination_number'] == $detail_action
|
||||
or $value['destination_number'] == $detail_action
|
||||
or $value['destination_trunk_prefix'].$value['destination_number'] == $detail_action
|
||||
or '+'.$value['destination_prefix'].$value['destination_area_code'].$value['destination_number'] == $detail_action
|
||||
or $value['destination_prefix'].$value['destination_area_code'].$value['destination_number'] == $detail_action
|
||||
|
||||
Reference in New Issue
Block a user