提交 dfcd4043 authored 作者: Anthony Minessale's avatar Anthony Minessale

get beginning of mod_wanpipe working (sangoma pri)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@588 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 0df19ccd
...@@ -85,16 +85,15 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj) ...@@ -85,16 +85,15 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
if (switch_core_session_read_frame(session_a, &read_frame, -1, stream_id) == SWITCH_STATUS_SUCCESS if (switch_core_session_read_frame(session_a, &read_frame, -1, stream_id) == SWITCH_STATUS_SUCCESS
&& read_frame->datalen) { && read_frame->datalen) {
if (switch_core_session_write_frame(session_b, read_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) { if (switch_core_session_write_frame(session_b, read_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "write: Bad Frame.... Bubye!\n"); switch_console_printf(SWITCH_CHANNEL_CONSOLE, "write: %s Bad Frame.... Bubye!\n", switch_channel_get_name(chan_b));
data->running = -1; data->running = -1;
} }
} else { } else {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "read: Bad Frame.... Bubye!\n"); switch_console_printf(SWITCH_CHANNEL_CONSOLE, "read: %s Bad Frame.... Bubye!\n", switch_channel_get_name(chan_a));
data->running = -1; data->running = -1;
} }
} }
switch_channel_hangup(chan_b); switch_channel_hangup(chan_b);
data->running = 0; data->running = 0;
...@@ -239,6 +238,7 @@ static void audio_bridge_function(switch_core_session *session, char *data) ...@@ -239,6 +238,7 @@ static void audio_bridge_function(switch_core_session *session, char *data)
switch_core_session_launch_thread(session, audio_bridge_thread, (void *) &other_audio_thread); switch_core_session_launch_thread(session, audio_bridge_thread, (void *) &other_audio_thread);
audio_bridge_thread(NULL, (void *) &this_audio_thread); audio_bridge_thread(NULL, (void *) &this_audio_thread);
switch_channel_hangup(peer_channel); switch_channel_hangup(peer_channel);
if (other_audio_thread.running > 0) { if (other_audio_thread.running > 0) {
other_audio_thread.running = -1; other_audio_thread.running = -1;
......
...@@ -287,6 +287,8 @@ static switch_status woomerachan_on_hangup(switch_core_session *session) ...@@ -287,6 +287,8 @@ static switch_status woomerachan_on_hangup(switch_core_session *session)
tech_pvt = switch_core_session_get_private(session); tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL); assert(tech_pvt != NULL);
switch_core_codec_destroy(&tech_pvt->read_codec);
switch_core_codec_destroy(&tech_pvt->write_codec);
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s WOOMERACHAN HANGUP\n", switch_channel_get_name(channel)); switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s WOOMERACHAN HANGUP\n", switch_channel_get_name(channel));
tech_destroy(tech_pvt); tech_destroy(tech_pvt);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论