]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_callcenter: Fix a bug when an caller leave the queue from a BREAK Call (Transfer...
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Fri, 11 Mar 2011 17:40:56 +0000 (12:40 -0500)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Fri, 11 Mar 2011 17:40:56 +0000 (12:40 -0500)
src/mod/applications/mod_callcenter/mod_callcenter.c

index 12e19608416e927372690bfd94a90c6c58df2b03..99e790db5071ee695c6da061efd2abb97e1a1ab2 100644 (file)
@@ -2302,7 +2302,7 @@ SWITCH_STANDARD_APP(callcenter_function)
        }
 
        /* Hangup any agents been callback */
-       if (!switch_channel_up(member_channel)) { /* If channel is still up, it mean that the member didn't hangup, so we should leave the agent alone */
+       if (!switch_channel_up(member_channel) || !switch_channel_get_variable(member_channel, "cc_agent_uuid")) { /* If channel is still up, it mean that the member didn't hangup, so we should leave the agent alone */
                switch_core_session_hupall_matching_var("cc_member_uuid", member_uuid, SWITCH_CAUSE_ORIGINATOR_CANCEL);
                sql = switch_mprintf("UPDATE members SET state = '%q', uuid = '', abandoned_epoch = '%ld' WHERE system = 'single_box' AND uuid = '%q'",
                                cc_member_state2str(CC_MEMBER_STATE_ABANDONED), (long) switch_epoch_time_now(NULL), member_uuid);