From: Anthony Minessale Date: Wed, 29 Aug 2012 23:35:52 +0000 (-0500) Subject: only skip cdr on challenge calls not cancel X-Git-Tag: v1.2.3^2~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7d7bf23d3d84015114fe03e27b8a01e05416a4e;p=thirdparty%2Ffreeswitch.git only skip cdr on challenge calls not cancel --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 582f4c0bdf..84d914fcb7 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1666,13 +1666,13 @@ void sofia_event_callback(nua_event_t event, switch_channel_t *channel = switch_core_session_get_channel(session); switch_call_cause_t cause; - switch_channel_set_flag(channel, CF_NO_CDR); - cause = sofia_glue_sip_cause_to_freeswitch(status); switch_channel_hangup(channel, cause); switch_core_session_rwunlock(session); + if (status == 401 || status == 407) { + switch_channel_set_flag(channel, CF_NO_CDR); switch_core_session_id_dec(); } }