]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
(closes issue #10323)
authorJoshua Colp <jcolp@digium.com>
Fri, 27 Jul 2007 16:27:16 +0000 (16:27 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 27 Jul 2007 16:27:16 +0000 (16:27 +0000)
Reported by: julianjm
Patches:
      chan_sip_device_state_hold_fix.v1.diff.txt uploaded by julianjm (license 99)
Clear ONHOLD flag when decrementing the onHold peer count. If we did not do this the count may keep decreasing.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77536 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 14eee8a81b32ee7ce5e99681fca5c4f9aba16491..763d0fc9b387725be23877f55525ec75df4fd530 100644 (file)
@@ -3101,8 +3101,10 @@ static int update_call_counter(struct sip_pvt *fup, int event)
                                ast_clear_flag(&fup->flags[1], SIP_PAGE2_INC_RINGING);
                        }
                }
-               if (ast_test_flag(&fup->flags[1], SIP_PAGE2_CALL_ONHOLD) && global_notifyhold)
+               if (ast_test_flag(&fup->flags[1], SIP_PAGE2_CALL_ONHOLD) && global_notifyhold) {
+                       ast_clear_flag(&fup->flags[1], SIP_PAGE2_CALL_ONHOLD);
                        sip_peer_hold(fup, 0);
+               }
                if (option_debug > 1 || sipdebug) {
                        ast_log(LOG_DEBUG, "Call %s %s '%s' removed from call limit %d\n", outgoing ? "to" : "from", u ? "user":"peer", name, *call_limit);
                }