[mod_callcenter] FS-9723: Fixing cc_warning_tone, using switch_ivr_play_file instead of queue private event
This commit is contained in:
parent
4e6e860fc8
commit
5ac10aaf32
|
@ -1759,7 +1759,6 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
|
||||||
agent_session = switch_core_session_locate(h->agent_uuid);
|
agent_session = switch_core_session_locate(h->agent_uuid);
|
||||||
if (agent_session) {
|
if (agent_session) {
|
||||||
switch_channel_t *agent_channel = switch_core_session_get_channel(agent_session);
|
switch_channel_t *agent_channel = switch_core_session_get_channel(agent_session);
|
||||||
switch_event_t *e;
|
|
||||||
const char *cc_warning_tone = switch_channel_get_variable(agent_channel, "cc_warning_tone");
|
const char *cc_warning_tone = switch_channel_get_variable(agent_channel, "cc_warning_tone");
|
||||||
|
|
||||||
switch_channel_set_variable(agent_channel, "cc_side", "agent");
|
switch_channel_set_variable(agent_channel, "cc_side", "agent");
|
||||||
|
@ -1770,11 +1769,8 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
|
||||||
switch_channel_set_variable(agent_channel, "cc_member_session_uuid", h->member_session_uuid);
|
switch_channel_set_variable(agent_channel, "cc_member_session_uuid", h->member_session_uuid);
|
||||||
|
|
||||||
/* Playback this to the agent */
|
/* Playback this to the agent */
|
||||||
if (cc_warning_tone && switch_event_create(&e, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
|
if (cc_warning_tone) {
|
||||||
switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "call-command", "execute");
|
playback_array(agent_session, cc_warning_tone);
|
||||||
switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "execute-app-name", "playback");
|
|
||||||
switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "execute-app-arg", cc_warning_tone);
|
|
||||||
switch_core_session_queue_private_event(agent_session, &e, SWITCH_TRUE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
status = SWITCH_STATUS_SUCCESS;
|
status = SWITCH_STATUS_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue