Fix the dialplan call center greeting and queue_extension.

This commit is contained in:
FusionPBX 2022-05-05 10:16:33 -06:00 committed by GitHub
parent 4e9e007a2b
commit 4e2fe618e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2018 - 2021
Portions created by the Initial Developer are Copyright (C) 2018 - 2022
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -97,12 +97,12 @@ if ($domains_processed == 1) {
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^([^#]+#)(.*)\$\" break=\"never\">\n";
$dialplan_xml .= " <action application=\"set\" data=\"caller_id_name=\$2\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$row["queue_extension"]."$\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^(callcenter\+)?".$row["queue_extension"]."$\">\n";
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
if (is_uuid($row['call_center_queue_uuid'])) {
$dialplan_xml .= " <action application=\"set\" data=\"call_center_queue_uuid=".$row['call_center_queue_uuid']."\"/>\n";
}
if (is_numeric($queue_extension)) {
if (is_numeric($row['queue_extension'])) {
$dialplan_xml .= " <action application=\"set\" data=\"queue_extension=".$row['queue_extension']."\"/>\n";
}
$dialplan_xml .= " <action application=\"set\" data=\"cc_export_vars=call_center_queue_uuid\"/>\n";
@ -110,10 +110,10 @@ if ($domains_processed == 1) {
if ($row['queue_time_base_score_sec'] != '') {
$dialplan_xml .= " <action application=\"set\" data=\"cc_base_score=".$row['queue_time_base_score_sec']."\"/>\n";
}
if ($row['queue_greeting_path'] != '') {
$greeting_array = explode(':', $row['queue_greeting_path']);
if ($row['queue_greeting'] != '') {
$greeting_array = explode(':', $row['queue_greeting']);
if (count($greeting_array) == 1) {
$dialplan_xml .= " <action application=\"playback\" data=\"".$row['queue_greeting_path']."\"/>\n";
$dialplan_xml .= " <action application=\"playback\" data=\"".$queue_greeting_path."\"/>\n";
}
else {
if ($greeting_array[0] == 'say' || $greeting_array[0] == 'tone_stream' || $greeting_array[0] == 'phrase') {