diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 89ab7a59d8..4110e061cf 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -508,6 +508,7 @@ //add this only if using application bridge if (!empty($destination_app) && $destination_app == 'bridge') { + $dialplan["dialplan_xml"] .= " \n"; $dialplan["dialplan_xml"] .= " \n"; $dialplan["dialplan_xml"] .= " \n"; } @@ -536,6 +537,7 @@ $dialplan["dialplan_xml"] .= " \n"; } if (!empty($fax_uuid)) { + $dialplan["dialplan_xml"] .= " \n"; $dialplan["dialplan_xml"] .= " \n"; $dialplan["dialplan_xml"] .= " \n"; $dialplan["dialplan_xml"] .= " \n"; @@ -686,6 +688,17 @@ //add this only if using application bridge if (!empty($destination_app) && $destination_app == 'bridge') { + //add presence_id + $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid; + $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; + $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "presence_id=\$1@".$_SESSION['domain_name']; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; + $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = $dialplan_detail_group; + $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + //add hangup_after_bridge $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; $dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid; @@ -798,6 +811,17 @@ //add fax detection if (is_uuid($fax_uuid)) { + //add presence_id + $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; + $dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid; + $dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; + $dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set"; + $dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "presence_id=\$1@".$_SESSION['domain_name']; + $dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; + $dialplan["dialplan_details"][$y]["dialplan_detail_group"] = $dialplan_detail_group; + $dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; + $y++; + //add set tone detect_hits=1 $dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; $dialplan["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid;