Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mod_callcenter] Stale members listed as answered #1973

Open
yois615 opened this issue Feb 22, 2023 · 0 comments
Open

[mod_callcenter] Stale members listed as answered #1973

yois615 opened this issue Feb 22, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@yois615
Copy link
Contributor

yois615 commented Feb 22, 2023

Describe the bug
When executing callcenter_config queue list members, it happens occasionally that a member will be listed in the 'Answered' state despite their call being terminated many hours before. The logs below show the issue as a race condition between the agent's and member's threads.

Expected behavior
mod_callcenter properly clears out Abandoned or terminated calls.

Package version or git hash

  • Version 1.10.9

Trace logs

2023-02-20 09:44:33.089076 47.47% [DEBUG] mod_callcenter.c:1753 Setting outbound caller_id_name to: PLONI-ALMONI
2023-02-20 09:44:33.089076 47.47% [DEBUG] switch_channel.c:1269 sofia/internal/2125551111 EXPORTING[cc_export_vars] [call_center_queue_uuid]=[b10cf4c7-3e27-4c0f-9b28-daca34738dfe] to event
2023-02-20 09:44:33.769070 47.47% [DEBUG] mod_callcenter.c:1965 Agent 8bc65265-0b8b-47a7-ac62-b7bec4801ee8 answered "PLONI-ALMONI" <2125551111> from queue 777@test.domain.local
2023-02-20 09:44:33.769070 47.47% [DEBUG] switch_ivr_bridge.c:2213 (sofia/internal/2125551111) State Change CS_EXECUTE -> CS_HIBERNATE
2023-02-20 09:44:33.769070 47.47% [DEBUG] mod_callcenter.c:2008 Failed to bridge, agent 8bc65265-0b8b-47a7-ac62-b7bec4801ee8 has no session
2023-02-20 09:44:33.789071 47.47% [DEBUG] switch_ivr_play_say.c:2058 done playing file local_stream://default
2023-02-20 09:44:33.789071 47.47% [DEBUG] mod_callcenter.c:3294 Member PLONI-ALMONI <2125551111> is answered by an agent in queue 777@test.domain.local

As can be clearly seen from these logs (along with review of the source code), if the bridge fails to the agent for some reason, the member's thread can still set the call as 'Answered' despite the call being terminated. (Line 3294 executed after 2008). This is a race condition.

The logs above show this behavior when the bridge fails due to the agent's channel not being up. The same behavior occurs when the member's channel is hung up as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant