From 7deb3330a16027d7593d14a8f32ce3b6a2387eb4 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 9 Aug 2007 17:57:14 +0000 Subject: [PATCH] small tweak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5580 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_iax/mod_iax.c | 11 ++++++++++- src/mod/languages/mod_spidermonkey/mod_spidermonkey.c | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_iax/mod_iax.c b/src/mod/endpoints/mod_iax/mod_iax.c index 6929c69852..186dea3e94 100644 --- a/src/mod/endpoints/mod_iax/mod_iax.c +++ b/src/mod/endpoints/mod_iax/mod_iax.c @@ -763,8 +763,17 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s assert(tech_pvt != NULL); switch (msg->message_id) { + case SWITCH_MESSAGE_INDICATE_REJECT: + { + if (tech_pvt->iax_session) { + iax_reject(tech_pvt->iax_session, msg->string_arg ? msg->string_arg : "Call Rejected"); + } + } + break; case SWITCH_MESSAGE_INDICATE_ANSWER: - channel_answer_channel(session); + { + channel_answer_channel(session); + } break; default: break; diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index bcabf92bc6..959515206e 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -1788,9 +1788,9 @@ static JSBool session_execute(JSContext * cx, JSObject * obj, uintN argc, jsval channel = switch_core_session_get_channel(jss->session); assert(channel != NULL); - - CHANNEL_SANITY_CHECK(); - + /* you can execute some apps before you answer */ + /* CHANNEL_SANITY_CHECK(); */ + if (argc > 0) { const switch_application_interface_t *application_interface;