Skip to content

Commit

Permalink
mod_callcenter: try to fix signalwire#2529 hangup the call when answe…
Browse files Browse the repository at this point in the history
…red - already answered by other agent
  • Loading branch information
wmasilva committed Jul 15, 2024
1 parent ed32dfd commit 8c5727e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mod/applications/mod_callcenter/mod_callcenter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1922,6 +1922,8 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
switch_safe_free(sql);

if (atoi(res) == 0) {
/* Unexpected, it's possible the agent channel wasn't created when the agent that won the race was connected, so hangup the channel */
switch_channel_hangup(switch_core_session_get_channel(agent_session), SWITCH_CAUSE_LOSE_RACE);
goto done;
}
switch_core_session_hupall_matching_var("cc_member_pre_answer_uuid", h->member_uuid, SWITCH_CAUSE_LOSE_RACE);
Expand Down

0 comments on commit 8c5727e

Please sign in to comment.