From: Anthony Minessale Date: Sat, 21 Feb 2015 06:49:18 +0000 (-0600) Subject: fix the thing the guy mentioned on irc X-Git-Tag: v1.4.17~1^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=609c02955f9cda616f5966e58eb094a6f4b8d601;p=thirdparty%2Ffreeswitch.git fix the thing the guy mentioned on irc --- diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index 7215084977..15ceb23ee7 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -3455,7 +3455,11 @@ SWITCH_STANDARD_API(uuid_pre_answer_function) if (uuid && (xsession = switch_core_session_locate(uuid))) { switch_channel_t *channel = switch_core_session_get_channel(xsession); - switch_channel_pre_answer(channel); + if (switch_channel_pre_answer(channel) == SWITCH_STATUS_SUCCESS) { + stream->write_function(stream, "+OK\n"); + } else { + stream->write_function(stream, "-ERROR\n"); + } switch_core_session_rwunlock(xsession); } else { stream->write_function(stream, "-ERROR\n");