From 609c02955f9cda616f5966e58eb094a6f4b8d601 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 21 Feb 2015 00:49:18 -0600 Subject: [PATCH] fix the thing the guy mentioned on irc --- src/mod/applications/mod_commands/mod_commands.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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");