提交 83ae81b2 authored 作者: Michael Jerris's avatar Michael Jerris

make echo work from event socket (MODEVENT-10)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7064 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 86fd0fab
...@@ -1018,13 +1018,6 @@ SWITCH_STANDARD_APP(stop_fax_detect_session_function) ...@@ -1018,13 +1018,6 @@ SWITCH_STANDARD_APP(stop_fax_detect_session_function)
SWITCH_STANDARD_APP(echo_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); switch_ivr_session_echo(session);
} }
......
...@@ -68,7 +68,6 @@ SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session) ...@@ -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_channel_t *channel = switch_core_session_get_channel(session);
switch_thread_t *thread; switch_thread_t *thread;
switch_threadattr_t *thd_attr = NULL; switch_threadattr_t *thd_attr = NULL;
switch_channel_pre_answer(channel); switch_channel_pre_answer(channel);
...@@ -80,7 +79,7 @@ SWITCH_DECLARE(void) switch_ivr_session_echo(switch_core_session_t *session) ...@@ -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)); 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); status = switch_core_session_read_frame(session, &read_frame, -1, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) { if (!SWITCH_READ_ACCEPTABLE(status)) {
break; break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论