[asterisk-commits] trunk r12923 - in /trunk: channels/chan_iax2.c configs/iax.conf.sample

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Mar 14 11:05:29 MST 2006


Author: russell
Date: Tue Mar 14 12:05:22 2006
New Revision: 12923

URL: http://svn.digium.com/view/asterisk?rev=12923&view=rev
Log:
deprecate the mailboxdetail option and always use its behavior, instead (issue #6665)

Modified:
    trunk/channels/chan_iax2.c
    trunk/configs/iax.conf.sample

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_iax2.c?rev=12923&r1=12922&r2=12923&view=diff
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Tue Mar 14 12:05:22 2006
@@ -262,7 +262,7 @@
 	IAX_USEJITTERBUF =	(1 << 5),	/*!< Use jitter buffer */
 	IAX_DYNAMIC =		(1 << 6),	/*!< dynamic peer */
 	IAX_SENDANI = 		(1 << 7),	/*!< Send ANI along with CallerID */
-	IAX_MESSAGEDETAIL =	(1 << 8),	/*!< Show exact numbers */
+	/* (1 << 8) is currently unused due to the deprecation of an old option. Go ahead, take it! */	
 	IAX_ALREADYGONE =	(1 << 9),	/*!< Already disconnected */
 	IAX_PROVISION =		(1 << 10),	/*!< This is a provisioning request */
 	IAX_QUELCH = 		(1 << 11),	/*!< Whether or not we quelch audio */
@@ -5901,19 +5901,13 @@
 		iax_ie_append_short(&ied, IAX_IE_REFRESH, p->expiry);
 		iax_ie_append_addr(&ied, IAX_IE_APPARENT_ADDR, &p->addr);
 		if (!ast_strlen_zero(p->mailbox)) {
-			if (ast_test_flag(p, IAX_MESSAGEDETAIL)) {
-				int new, old;
-				ast_app_messagecount(p->mailbox, &new, &old);
-				if (new > 255)
-					new = 255;
-				if (old > 255)
-					old = 255;
-				msgcount = (old << 8) | new;
-			} else {
-				msgcount = ast_app_has_voicemail(p->mailbox, NULL);
-				if (msgcount)
-					msgcount = 65535;
-			}
+			int new, old;
+			ast_app_messagecount(p->mailbox, &new, &old);
+			if (new > 255)
+				new = 255;
+			if (old > 255)
+				old = 255;
+			msgcount = (old << 8) | new;
 			iax_ie_append_short(&ied, IAX_IE_MSGCOUNT, msgcount);
 		}
 		if (ast_test_flag(p, IAX_HASCALLERID)) {
@@ -8501,7 +8495,7 @@
 		}
 	}
 	if (peer) {
-		ast_copy_flags(peer, &globalflags, IAX_MESSAGEDETAIL | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF);
+		ast_copy_flags(peer, &globalflags, IAX_USEJITTERBUF | IAX_FORCEJITTERBUF);
 		peer->encmethods = iax2_encryption;
 		peer->secret[0] = '\0';
 		if (!found) {
@@ -8527,8 +8521,6 @@
 				ast_copy_string(peer->mailbox, v->value, sizeof(peer->mailbox));
 			} else if (!strcasecmp(v->name, "dbsecret")) {
 				ast_copy_string(peer->dbsecret, v->value, sizeof(peer->dbsecret));
-			} else if (!strcasecmp(v->name, "mailboxdetail")) {
-				ast_set2_flag(peer, ast_true(v->value), IAX_MESSAGEDETAIL);	
 			} else if (!strcasecmp(v->name, "trunk")) {
 				ast_set2_flag(peer, ast_true(v->value), IAX_TRUNK);	
 				if (ast_test_flag(peer, IAX_TRUNK) && (timingfd < 0)) {
@@ -9074,8 +9066,6 @@
 			ast_set2_flag((&globalflags), ast_true(v->value), IAX_FORCEJITTERBUF);	
 		else if (!strcasecmp(v->name, "delayreject"))
 			delayreject = ast_true(v->value);
-		else if (!strcasecmp(v->name, "mailboxdetail"))
-			ast_set2_flag((&globalflags), ast_true(v->value), IAX_MESSAGEDETAIL);	
 		else if (!strcasecmp(v->name, "rtcachefriends"))
 			ast_set2_flag((&globalflags), ast_true(v->value), IAX_RTCACHEFRIENDS);	
 		else if (!strcasecmp(v->name, "rtignoreregexpire"))

Modified: trunk/configs/iax.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/iax.conf.sample?rev=12923&r1=12922&r2=12923&view=diff
==============================================================================
--- trunk/configs/iax.conf.sample (original)
+++ trunk/configs/iax.conf.sample Tue Mar 14 12:05:22 2006
@@ -216,13 +216,6 @@
 ;   none		-- No flags
 ;
 tos=lowdelay
-;
-; If mailboxdetail is set to "yes", the user receives
-; the actual new/old message counts, not just a yes/no
-; as to whether they have messages.  this can be set on
-; a per-peer basis as well
-;
-;mailboxdetail=yes
 ;
 ; If regcontext is specified, Asterisk will dynamically create and destroy
 ; a NoOp priority 1 extension for a given peer who registers or unregisters



More information about the asterisk-commits mailing list