[asterisk-commits] alecdavis: trunk r376541 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 20 11:39:14 CST 2012


Author: alecdavis
Date: Tue Nov 20 11:39:11 2012
New Revision: 376541

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376541
Log:
Reduce CLI spam of "Extension Changed" device state messages.

Asterisk 11 follows RFC3265 that states that after every subscribe or resubscribe a notify should be sent.
Thus the console if filled continuously with the following after every subscribe;
  == Extension Changed 8512[phones] new state IDLE for Notify User cisco1
 
In Asterisk 1.8 only changes would be sent. Thus only when a device state changed was anything emitted to the console.

fix:
Only print to console when device state isn't forced.

(closes ASTERISK-20706)
Reported by: alecdavis
Tested by: alecdavis
alecdavis (license 585)
........

Merged revisions 376540 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=376541&r1=376540&r2=376541
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Nov 20 11:39:11 2012
@@ -16498,8 +16498,11 @@
 			ast_set_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE);
 		}
 	}
-	ast_verb(2, "Extension Changed %s[%s] new state %s for Notify User %s %s\n", exten, context, ast_extension_state2str(data->state), p->username,
-			ast_test_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE) ? "(queued)" : "");
+
+	if (!force) {
+		ast_verb(2, "Extension Changed %s[%s] new state %s for Notify User %s %s\n", exten, context, ast_extension_state2str(data->state), p->username,
+				ast_test_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE) ? "(queued)" : "");
+	}
 
 	sip_pvt_unlock(p);
 




More information about the asterisk-commits mailing list