]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Only waiting for agent channel to hangup.
authorItalo Rossi <italorossib@gmail.com>
Mon, 3 Nov 2014 15:02:03 +0000 (12:02 -0300)
committerItalo Rossi <italorossib@gmail.com>
Mon, 3 Nov 2014 15:02:03 +0000 (12:02 -0300)
If the member do an attended transfer this loop stops and
the agent is set to Available state again, when in fact he still
busy with other channel.

This was happening, for example, when a member calls support queue, then
the support operator do an attended transfer to sales queue, while the sales
operator is talking the member that was transferred, the sales queue will
send calls to the operator, which is not expected.

src/mod/applications/mod_callcenter/mod_callcenter.c

index 5c2c6ebee2cf66db183f21b412bb414294c583c0..8d4c0caf06db0f94ab7227eb1ed0d556b2bb8f0f 100644 (file)
@@ -1730,8 +1730,8 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
                /* This is used for the waiting caller to quit waiting for a agent */
                switch_channel_set_variable(member_channel, "cc_agent_found", "true");
 
-               /* Wait until the member hangup or the agent hangup.  This will quit also if the agent transfer the call */
-               while(switch_channel_up(member_channel) && switch_channel_up(agent_channel) && globals.running) {
+               /* Wait until the agent hangup.  This will quit also if the agent transfer the call */
+               while(switch_channel_up(agent_channel) && globals.running) {
                        switch_yield(100000);
                }
                tiers_state = CC_TIER_STATE_READY;