Minor sip fixes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2003-12-09 22:04:23 +00:00
parent b3af980c46
commit 72e21db66a
1 changed files with 9 additions and 6 deletions

View File

@ -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;