[asterisk-commits] oej: branch oej/bug8848-blinktransfer r54374 - /team/oej/bug8848-blinktransfe...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 14 09:53:09 MST 2007


Author: oej
Date: Wed Feb 14 10:53:08 2007
New Revision: 54374

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54374
Log:
Possible fix for #8848

Modified:
    team/oej/bug8848-blinktransfer/channels/chan_sip.c

Modified: team/oej/bug8848-blinktransfer/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/bug8848-blinktransfer/channels/chan_sip.c?view=diff&rev=54374&r1=54373&r2=54374
==============================================================================
--- team/oej/bug8848-blinktransfer/channels/chan_sip.c (original)
+++ team/oej/bug8848-blinktransfer/channels/chan_sip.c Wed Feb 14 10:53:08 2007
@@ -3285,6 +3285,11 @@
 	}
 
 	if (ast_test_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER)) {
+		if (ast_test_flag(&p->flags[0], SIP_INC_COUNT)) {
+			if (option_debug && sipdebug)
+				ast_log(LOG_DEBUG, "update_call_counter(%s) - decrement call limit counter on hangup\n", p->username);
+			update_call_counter(p, DEC_CALL_LIMIT);
+		}
 		if (option_debug >3)
 			ast_log(LOG_DEBUG, "SIP Transfer: Not hanging up right now... Rescheduling hangup for %s.\n", p->callid);
 		if (p->autokillid > -1)
@@ -3308,9 +3313,11 @@
 		ast_log(LOG_DEBUG, "Hanging up zombie call. Be scared.\n");
 
 	ast_mutex_lock(&p->lock);
-	if (option_debug && sipdebug)
-		ast_log(LOG_DEBUG, "update_call_counter(%s) - decrement call limit counter on hangup\n", p->username);
-	update_call_counter(p, DEC_CALL_LIMIT);
+	if (ast_test_flag(&p->flags[0], SIP_INC_COUNT)) {
+		if (option_debug && sipdebug)
+			ast_log(LOG_DEBUG, "update_call_counter(%s) - decrement call limit counter on hangup\n", p->username);
+		update_call_counter(p, DEC_CALL_LIMIT);
+	}
 
 	/* Determine how to disconnect */
 	if (p->owner != ast) {



More information about the asterisk-commits mailing list