mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-27 11:47:41 +00:00
[mod_callcenter] FS-9891: Checking if we got a valid pointer for a queue
This commit is contained in:
parent
c302eb405b
commit
bdbd29ed17
@ -3042,9 +3042,10 @@ SWITCH_STANDARD_APP(callcenter_function)
|
|||||||
switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_name")),
|
switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_name")),
|
||||||
switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_number")),
|
switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_number")),
|
||||||
queue_name, cc_member_cancel_reason2str(h->member_cancel_reason));
|
queue_name, cc_member_cancel_reason2str(h->member_cancel_reason));
|
||||||
queue = get_queue(queue_name);
|
if ((queue = get_queue(queue_name))) {
|
||||||
queue->calls_abandoned++;
|
queue->calls_abandoned++;
|
||||||
queue_rwunlock(queue);
|
queue_rwunlock(queue);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member_session), SWITCH_LOG_DEBUG, "Member %s <%s> is answered by an agent in queue %s\n", switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_name")), switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_number")), queue_name);
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(member_session), SWITCH_LOG_DEBUG, "Member %s <%s> is answered by an agent in queue %s\n", switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_name")), switch_str_nil(switch_channel_get_variable(member_channel, "caller_id_number")), queue_name);
|
||||||
|
|
||||||
@ -3056,9 +3057,10 @@ SWITCH_STANDARD_APP(callcenter_function)
|
|||||||
|
|
||||||
/* Update some channel variables for xml_cdr needs */
|
/* Update some channel variables for xml_cdr needs */
|
||||||
switch_channel_set_variable_printf(member_channel, "cc_cause", "%s", "answered");
|
switch_channel_set_variable_printf(member_channel, "cc_cause", "%s", "answered");
|
||||||
queue = get_queue(queue_name);
|
if ((queue = get_queue(queue_name))) {
|
||||||
queue->calls_answered++;
|
queue->calls_answered++;
|
||||||
queue_rwunlock(queue);
|
queue_rwunlock(queue);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user