From 83ae81b2971d7cbc2d1195a777c02d67aac5320b Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 2 Jan 2008 18:20:28 +0000 Subject: [PATCH] make echo work from event socket (MODEVENT-10) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7064 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_dptools/mod_dptools.c | 7 ------- src/switch_ivr_async.c | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index d904690b96..bc1b9bdae7 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -1018,13 +1018,6 @@ SWITCH_STANDARD_APP(stop_fax_detect_session_function) SWITCH_STANDARD_APP(echo_function) { - switch_channel_t *channel; - - channel = switch_core_session_get_channel(session); - assert(channel != NULL); - - switch_channel_pre_answer(channel); - switch_ivr_session_echo(session); } diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index 6b40133429..9fd5305111 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -68,7 +68,6 @@ SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session) switch_channel_t *channel = switch_core_session_get_channel(session); switch_thread_t *thread; switch_threadattr_t *thd_attr = NULL; - switch_channel_pre_answer(channel); @@ -80,7 +79,7 @@ SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session) switch_thread_create(&thread, thd_attr, echo_video_thread, &eh, switch_core_session_get_pool(session)); } - while(switch_channel_ready(channel) && switch_channel_get_state(channel) == CS_LOOPBACK) { + while(switch_channel_ready(channel)) { status = switch_core_session_read_frame(session, &read_frame, -1, 0); if (!SWITCH_READ_ACCEPTABLE(status)) { break;