From fe390a35097f328dc045a2f26d65f64bb7e4a08a Mon Sep 17 00:00:00 2001 From: Antonio Fernandez Date: Wed, 7 Apr 2021 01:09:22 -0400 Subject: [PATCH] Fixed Queues so they work along with example cleanup In troubleshooting a known FreeSwitch bug with mod_callcenter, I started to try out mod_fifo as an alternative. I realized that the dialplan that was being created by Fusion was not working. Creating a queue is very simple so I knew it wasn't a user error on my part so I dug in deeper. There were a few issues I needed to fix to get queues working again. 1. Add a "break on-true" to each condition destination_number (it was changed in two places) 2. populate the "action" for callers entering the queue via the $agent_queue_extension_number 3. remove the appended "_agent" which was added to the $queue_name which was causing the queue for entering and retrieving calls different. 4. remove the inline="true" for the action that executes the lua script I also fixed the example comments to be accurate to how the queues should be written in the dialplan. --- app/fifo/fifo_add.php | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/app/fifo/fifo_add.php b/app/fifo/fifo_add.php index 0f34fb5987..b886de570d 100644 --- a/app/fifo/fifo_add.php +++ b/app/fifo/fifo_add.php @@ -167,9 +167,7 @@ $dialplan_detail_order = $dialplan_detail_order + 10; //action fifo - //if (strlen($pin_number) > 0) { $pin_number = "+".$pin_number; } - //if (strlen($flags) > 0) { $flags = "+{".$flags."}"; } - //$queue_action_data = $extension_name."@\${domain_name}".$profile.$flags.$pin_number; + $queue_action_data = $queue_name." in"; $array["dialplan_details"][$y]["domain_uuid"] = $domain_uuid; $array["dialplan_details"][$y]["dialplan_uuid"] = $dialplan_uuid; $array["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; @@ -194,7 +192,7 @@ // // //-------------------------------------------------------- - $queue_name = $extension_name."_agent@\${domain_name}"; + $queue_name = $extension_name."@\${domain_name}"; if (is_uuid($dialplan_uuid)) { //set the dialplan detial order to zero @@ -208,7 +206,7 @@ $array["dialplan_details"][$y]["dialplan_detail_data"] = '^'.$agent_queue_extension_number.'$'; $array["dialplan_details"][$y]["dialplan_detail_inline"] = ""; if (strlen($agent_login_logout_extension_number) > 0) { - $array["dialplan_details"][$y]["dialplan_detail_break"] = $dialplan_detail_break; + $array["dialplan_details"][$y]["dialplan_detail_break"] = 'on-true'; } $array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $array["dialplan_details"][$y]["dialplan_detail_group"] = '2'; @@ -262,12 +260,16 @@ // agent or member login / logout if (strlen($agent_login_logout_extension_number) > 0) { //-------------------------------------------------------- - // Agent Queue [FIFO out] - // - // - // - // - // + // Agent Queue [FIFO login logout] + // + // + // + // + // + // + // + // + // // // //-------------------------------------------------------- @@ -284,6 +286,7 @@ $array["dialplan_details"][$y]["dialplan_detail_type"] = "destination_number"; $array["dialplan_details"][$y]["dialplan_detail_data"] = '^'.$agent_login_logout_extension_number.'$'; $array["dialplan_details"][$y]["dialplan_detail_inline"] = ""; + $array["dialplan_details"][$y]["dialplan_detail_break"] = 'on-true'; $array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $array["dialplan_details"][$y]["dialplan_detail_group"] = '3'; $y++; @@ -381,7 +384,7 @@ $array["dialplan_details"][$y]["dialplan_detail_tag"] = "action"; $array["dialplan_details"][$y]["dialplan_detail_type"] = "lua"; $array["dialplan_details"][$y]["dialplan_detail_data"] = "fifo_member.lua"; - $array["dialplan_details"][$y]["dialplan_detail_inline"] = "true"; + $array["dialplan_details"][$y]["dialplan_detail_inline"] = ""; $array["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order; $array["dialplan_details"][$y]["dialplan_detail_group"] = '3'; $y++;