From 72e21db66a49c3030a21b1556f21ca0e4688c49e Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Tue, 9 Dec 2003 22:04:23 +0000 Subject: [PATCH] Minor sip fixes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1848 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d56479b1ca..fff501f66a 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1112,12 +1112,15 @@ static int sip_hangup(struct ast_channel *ast) INVITE, but do set an autodestruct just in case. */ needdestroy = 0; sip_scheddestroy(p, 15000); - /* channel still up - reverse dec of inUse counter */ - if ( p->outgoing ) { - find_user(p, INC_OUT_USE); - } - else { - find_user(p, INC_IN_USE); + if ( p->initid != -1 ) { + /* channel still up - reverse dec of inUse counter + only if the channel is not auto-congested */ + if ( p->outgoing ) { + find_user(p, INC_OUT_USE); + } + else { + find_user(p, INC_IN_USE); + } } } else { char *res;