make echo work from event socket (MODEVENT-10)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7064 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-01-02 18:20:28 +00:00
parent 86fd0fab70
commit 83ae81b297
2 changed files with 1 additions and 9 deletions

View File

@ -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);
}

View File

@ -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;