]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix the thing the guy mentioned on irc
authorAnthony Minessale <anthm@freeswitch.org>
Sat, 21 Feb 2015 06:49:18 +0000 (00:49 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Sat, 21 Feb 2015 06:49:18 +0000 (00:49 -0600)
src/mod/applications/mod_commands/mod_commands.c

index 7215084977a3632f9420eb08fc84adb1833bad5b..15ceb23ee72f1a4a93d8ef8ef5786f80b68af071 100644 (file)
@@ -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");