freeswitch
freeswitch copied to clipboard
[mod_callcenter] fix queue periodic announcement
- Fixes announcement playing to channel even agent answered or member broke or timed out from the queue
- Fixes frequency counted when announcement starts playing causing announcements to overlap fixed by counting only when last announcement finishes
FYI the same happens when you set the Lua Script to announce members position as defined in the mod_callcenter documentation;
The caller must wait until the Lua Script execution goes back to freeswitch.msleep(mseconds) because the execution of api:executeString(uuid_broadcast, is never stopped by mod_callcenter.
@laflammefrancois - Have you tested this patch to see if it helps your issue?
@laflammefrancois - Have you tested this patch to see if it helps your issue?
No, I needed a solution for my production servers. I have instead implemented a patch in my lua script; I subscribe for the CUSTOM/Answer-State/CC-Queue event and send uuid_break to the call when the answered Answer-State event is received.
Sadly, I do not have the setup to test the fix, sorry about that.
I've been using this fix in production without any issues for a couple of months
@greenbea - You're using it with uuid_broadcast in a LUA script? I don't see how your fix addresses @laflammefrancois problem.
I recompiled FS with this patch: https://github.com/signalwire/freeswitch/commit/acbe390da617e88e066884dfe2a92bc69b8c1eaf
But I haven't tested yet.
I have a lua script I use for announcing the queue position, but that takes quickly to announce, so I didn't notice any issues.
The solution would be to have mod_callcenter control any announcement to the member session.
@greenbea Can you dynamically calculate the member position?
@greenbea Can you dynamically calculate the member position?
A SQL query
@laflammefrancois I tested my patch listed above (https://github.com/signalwire/freeswitch/commit/acbe390da617e88e066884dfe2a92bc69b8c1eaf) and it solves our problem.
I force pushed some fixes
-
queue
was being used afterqueue_rwunlock(queue)
causing queue to point to unsafe memory. - fixed if queue gets reloaded with a new announcement the old announcement wasn't stopped
@andywolk This PR might also conflict with #1974
Correction - it does not conflict as it solves a different issue
Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1036/artifacts.html
Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1041/artifacts.html
Scan-build compilation failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1043/scan-build-result.txt
Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1043/artifacts.html
Scan-build compilation failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1044/scan-build-result.txt
Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1044/artifacts.html