diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-12-09 22:04:23 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-12-09 22:04:23 +0000 |
commit | 90f8f9cd1d88649f51e929e2b2878cf8371543c9 (patch) | |
tree | 48150db5c4ddea3131a0b95054aad9d2c9811c87 /channels | |
parent | 3150d758a40ebb1bfec4e53875736e1bd88de792 (diff) |
Minor sip fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1848 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_sip.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d56479b1c..fff501f66 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; |