From bea46c10899ffb9b36e4ddc5855b097cb456e174 Mon Sep 17 00:00:00 2001 From: Italo Rossi Date: Tue, 27 Dec 2016 20:49:59 -0300 Subject: [PATCH] [mod_callcenter] FS-9723: Fixing cc_warning_tone, using switch_ivr_play_file instead of queue private event --- src/mod/applications/mod_callcenter/mod_callcenter.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mod/applications/mod_callcenter/mod_callcenter.c b/src/mod/applications/mod_callcenter/mod_callcenter.c index 894aa49786..b146ed7931 100644 --- a/src/mod/applications/mod_callcenter/mod_callcenter.c +++ b/src/mod/applications/mod_callcenter/mod_callcenter.c @@ -1644,7 +1644,6 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa agent_session = switch_core_session_locate(h->agent_uuid); if (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"); switch_channel_set_variable(agent_channel, "cc_side", "agent"); @@ -1655,11 +1654,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); /* Playback this to the agent */ - if (cc_warning_tone && switch_event_create(&e, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) { - switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, "call-command", "execute"); - 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); + if (cc_warning_tone) { + playback_array(agent_session, cc_warning_tone); } status = SWITCH_STATUS_SUCCESS;