提交 d0f877a3 authored 作者: Michael Jerris's avatar Michael Jerris

Make record only end the application, and not hangup the call on * (thanks knhor).

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3143 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 dd5d7374
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* Contributor(s): * Contributor(s):
* *
* Anthony Minessale II <anthmct@yahoo.com> * Anthony Minessale II <anthmct@yahoo.com>
* Neal Horman <neal at wanlink dot com>
* *
* *
* mod_playback.c -- Raw Audio File Streaming Application Module * mod_playback.c -- Raw Audio File Streaming Application Module
...@@ -126,13 +127,15 @@ static void playback_function(switch_core_session_t *session, char *data) ...@@ -126,13 +127,15 @@ static void playback_function(switch_core_session_t *session, char *data)
static void record_function(switch_core_session_t *session, char *data) static void record_function(switch_core_session_t *session, char *data)
{ {
switch_channel_t *channel; switch_channel_t *channel;
switch_status_t status;
channel = switch_core_session_get_channel(session); channel = switch_core_session_get_channel(session);
assert(channel != NULL); assert(channel != NULL);
if (switch_ivr_record_file(session, NULL, data, on_dtmf, NULL, 0) != SWITCH_STATUS_SUCCESS) { status = switch_ivr_record_file(session, NULL, data, on_dtmf, NULL, 0);
if (!switch_channel_ready(channel) || (status != SWITCH_STATUS_SUCCESS && !SWITCH_STATUS_IS_BREAK(status))) {
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER); switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论