From 07b9186da6041d4ab1ff166f50275f2cb7a49b8d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 4 Apr 2011 14:14:38 -0500 Subject: [PATCH] FS-3226 --resolve SO, If the RFC told you to jump off a cliff......? --- src/mod/endpoints/mod_sofia/sofia.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 582b06d933..2bf27d5ba8 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -76,14 +76,15 @@ void sofia_handle_sip_r_notify(switch_core_session_t *session, int status, char const *phrase, nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sofia_private_t *sofia_private, sip_t const *sip, tagi_t tags[]) { -#if 0 + if (status >= 300 && sip && sip->sip_call_id) { char *sql; sql = switch_mprintf("delete from sip_subscriptions where call_id='%q'", sip->sip_call_id->i_id); switch_assert(sql != NULL); sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE); + nua_handle_destroy(nh); } -#endif + } #define url_set_chanvars(session, url, varprefix) _url_set_chanvars(session, url, #varprefix "_user", #varprefix "_host", #varprefix "_port", #varprefix "_uri", #varprefix "_params")