aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-12-09 22:04:23 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-12-09 22:04:23 +0000
commit90f8f9cd1d88649f51e929e2b2878cf8371543c9 (patch)
tree48150db5c4ddea3131a0b95054aad9d2c9811c87 /channels
parent3150d758a40ebb1bfec4e53875736e1bd88de792 (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-xchannels/chan_sip.c15
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;