]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
[mod_callcenter] Fix stale agents and UUID broadcasts
authoryois615 <38441801+yois615@users.noreply.github.com>
Tue, 28 Mar 2023 11:53:16 +0000 (07:53 -0400)
committerGitHub <noreply@github.com>
Tue, 28 Mar 2023 11:53:16 +0000 (14:53 +0300)
commit6d65f8e08cdffcd657d837a4f5cdb1b6c51d74d0
tree603b8c0faecd9648ea9a02eb3da907d133ee82e2
parent965e88a6b0607eb7f248c9a95ba0c3652eda8e36
[mod_callcenter] Fix stale agents and UUID broadcasts

* [call_center] Stop uuid_broadcast on answer

* [mod_callcenter] Fix stale members in database

When a channel is originated to an agent but the
member fails to bridge to that agent, the database is
not updated with the member status and a stale entry
of 'Answered' persists until mod_callcenter is restarted.

Additionally, cc_agent_found is set before the bridge,
therefore ending the while loop on the member channel.
If there is a problem with the agent bridge, the call is
terminated prematurely.

In this commit, we:

* Move the SQL update of the member
to the 'Answered' state to the agent thread instead of
the member's thread, so that correct data is populated.

* Reset the members state accordingly to Abandoned or
Waiting if the channels fail to bridge.

* Use cc_agent_bridged to end the member loop,
so that a member is put back on queue if the agent
channel fails to bridge.
src/mod/applications/mod_callcenter/mod_callcenter.c