freeswitch icon indicating copy to clipboard operation
freeswitch copied to clipboard

[mod_callcenter] fix queue periodic announcement

Open greenbea opened this issue 3 years ago • 1 comments

  • 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

greenbea avatar Apr 21 '21 14:04 greenbea

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 avatar Jul 29 '22 12:07 laflammefrancois

@laflammefrancois - Have you tested this patch to see if it helps your issue?

yois615 avatar Jan 10 '23 01:01 yois615

@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.

laflammefrancois avatar Jan 11 '23 14:01 laflammefrancois

I've been using this fix in production without any issues for a couple of months

greenbea avatar Jan 11 '23 17:01 greenbea

@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.

yois615 avatar Jan 11 '23 17:01 yois615

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 avatar Jan 11 '23 18:01 greenbea

@greenbea Can you dynamically calculate the member position?

yois615 avatar Jan 11 '23 18:01 yois615

@greenbea Can you dynamically calculate the member position?

A SQL query

greenbea avatar Jan 11 '23 18:01 greenbea

@laflammefrancois I tested my patch listed above (https://github.com/signalwire/freeswitch/commit/acbe390da617e88e066884dfe2a92bc69b8c1eaf) and it solves our problem.

yois615 avatar Jan 11 '23 21:01 yois615

I force pushed some fixes

  1. queue was being used after queue_rwunlock(queue) causing queue to point to unsafe memory.
  2. fixed if queue gets reloaded with a new announcement the old announcement wasn't stopped

greenbea avatar Mar 03 '23 19:03 greenbea

@andywolk This PR might also conflict with #1974

yois615 avatar Mar 21 '23 17:03 yois615

Correction - it does not conflict as it solves a different issue

yois615 avatar Mar 21 '23 18:03 yois615

Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1036/artifacts.html

signalwire-ci[bot] avatar Mar 28 '23 14:03 signalwire-ci[bot]

Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1041/artifacts.html

signalwire-ci[bot] avatar Mar 28 '23 15:03 signalwire-ci[bot]

Scan-build compilation failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1043/scan-build-result.txt

signalwire-ci[bot] avatar Mar 28 '23 15:03 signalwire-ci[bot]

Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1043/artifacts.html

signalwire-ci[bot] avatar Mar 28 '23 15:03 signalwire-ci[bot]

Scan-build compilation failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1044/scan-build-result.txt

signalwire-ci[bot] avatar Mar 28 '23 16:03 signalwire-ci[bot]

Unit-tests failed: https://public-artifacts.signalwire.cloud/drone/signalwire/freeswitch/1044/artifacts.html

signalwire-ci[bot] avatar Mar 28 '23 16:03 signalwire-ci[bot]