Add provider_uuid to destinations dialplan xml and XML CDR
This commit is contained in:
parent
d48f4a0b89
commit
cea06a548e
|
|
@ -486,6 +486,9 @@
|
|||
$dialplan["dialplan_xml"] .= " <action application=\"export\" data=\"call_direction=inbound\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"domain_uuid=".$_SESSION['domain_uuid']."\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"domain_name=".$_SESSION['domain_name']."\" inline=\"true\"/>\n";
|
||||
if (!empty($provider_uuid)) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"provider_uuid=".xml::sanitize($provider_uuid)."\" inline=\"true\"/>\n";
|
||||
}
|
||||
if (isset($row['condition_app']) && !empty($row['condition_app'])) {
|
||||
if ($destination->valid($row['condition_app'].':'.$row['condition_data'])) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"".xml::sanitize($row['condition_app'])."\" data=\"".xml::sanitize($row['condition_data'])."\"/>\n";
|
||||
|
|
@ -499,6 +502,9 @@
|
|||
$dialplan["dialplan_xml"] .= " <action application=\"export\" data=\"call_direction=inbound\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"domain_uuid=".$_SESSION['domain_uuid']."\" inline=\"true\"/>\n";
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"domain_name=".$_SESSION['domain_name']."\" inline=\"true\"/>\n";
|
||||
if (!empty($provider_uuid)) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"set\" data=\"provider_uuid=".xml::sanitize($provider_uuid)."\" inline=\"true\"/>\n";
|
||||
}
|
||||
|
||||
//add this only if using application bridge
|
||||
if (!empty($destination_app) && $destination_app == 'bridge') {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue