FS-10237 [mod_callcenter] Do not kick member out on timeout if originating to an agent
Now we're passing member_session as session parameter to switch_ivr_originate, this will make the cc_export_vars no longer needed in the future as now all the variables previously exported will be seen by switch_ivr_originate because member_session is the ORIGINATOR. cc_export_vars still works.
This commit is contained in:
parent
11d98e4fb2
commit
b4ada1b849
|
@ -1663,7 +1663,7 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
|
|||
t_agent_called = local_epoch_time_now(NULL);
|
||||
|
||||
dialstr = switch_channel_expand_variables(member_channel, h->originate_string);
|
||||
status = switch_ivr_originate(NULL, &agent_session, &cause, dialstr, 60, NULL, cid_name ? cid_name : h->member_cid_name, cid_number ? cid_number : h->member_cid_number, NULL, ovars, SOF_NONE, NULL);
|
||||
status = switch_ivr_originate(member_session, &agent_session, &cause, dialstr, 60, NULL, cid_name ? cid_name : h->member_cid_name, cid_number ? cid_number : h->member_cid_number, NULL, ovars, SOF_NONE, NULL);
|
||||
|
||||
/* Search for loopback agent */
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
|
@ -2709,7 +2709,7 @@ void *SWITCH_THREAD_FUNC cc_member_thread_run(switch_thread_t *thread, void *obj
|
|||
break;
|
||||
}
|
||||
/* Make the Caller Leave if he went over his max wait time */
|
||||
if (queue->max_wait_time > 0 && queue->max_wait_time <= time_now - m->t_member_called) {
|
||||
if (queue->max_wait_time > 0 && queue->max_wait_time <= time_now - m->t_member_called && !switch_channel_test_flag(member_channel, CF_ORIGINATOR)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member_session), SWITCH_LOG_DEBUG, "Member %s <%s> in queue '%s' reached max wait time\n", m->member_cid_name, m->member_cid_number, m->queue_name);
|
||||
m->member_cancel_reason = CC_MEMBER_CANCEL_REASON_TIMEOUT;
|
||||
switch_channel_set_flag_value(member_channel, CF_BREAK, 2);
|
||||
|
|
Loading…
Reference in New Issue