From 423f7fe61837c1fc7b5514f0611d63e73e1d6002 Mon Sep 17 00:00:00 2001 From: Seven Du Date: Sat, 4 Jan 2014 16:53:36 +0800 Subject: [PATCH] return +OK on success --- src/mod/applications/mod_commands/mod_commands.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index e0bac25f37..d141cf7714 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -3184,8 +3184,13 @@ SWITCH_STANDARD_API(uuid_answer_function) if (uuid && (xsession = switch_core_session_locate(uuid))) { switch_channel_t *channel = switch_core_session_get_channel(xsession); - switch_channel_answer(channel); + switch_status_t status = switch_channel_answer(channel); switch_core_session_rwunlock(xsession); + if (status == SWITCH_STATUS_SUCCESS) { + stream->write_function(stream, "+OK\n"); + } else { + stream->write_function(stream, "-ERROR\n"); + } } else { stream->write_function(stream, "-ERROR\n"); }