[svn-commits] file: branch 1.4 r52208 - /branches/1.4/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Jan 25 10:14:53 MST 2007


Author: file
Date: Thu Jan 25 11:14:53 2007
New Revision: 52208

URL: http://svn.digium.com/view/asterisk?view=rev&rev=52208
Log:
Decrement onHold count if we are hung up on and still on hold. (issue #8909 reported by alexh42)

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=52208&r1=52207&r2=52208
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Thu Jan 25 11:14:53 2007
@@ -2985,7 +2985,7 @@
 static int update_call_counter(struct sip_pvt *fup, int event)
 {
 	char name[256];
-	int *inuse = NULL, *call_limit = NULL, *inringing = NULL;
+	int *inuse = NULL, *call_limit = NULL, *inringing = NULL, *onhold = NULL;
 	int outgoing = ast_test_flag(&fup->flags[0], SIP_OUTGOING);
 	struct sip_user *u = NULL;
 	struct sip_peer *p = NULL;
@@ -3008,6 +3008,7 @@
 		inuse = &p->inUse;
 		call_limit = &p->call_limit;
 		inringing = &p->inRinging;
+		onhold = &p->onHold;
 		ast_copy_string(name, fup->peername, sizeof(name));
 	} 
 	if (!p && !u) {
@@ -3034,6 +3035,8 @@
 				ast_clear_flag(&fup->flags[1], SIP_PAGE2_INC_RINGING);
 			}
 		}
+		if (ast_test_flag(&fup->flags[1], SIP_PAGE2_CALL_ONHOLD) && global_notifyhold)
+			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);
 		}



More information about the svn-commits mailing list