[svn-commits] tilghman: branch 1.4 r123110 - /branches/1.4/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 16 14:21:58 CDT 2008


Author: tilghman
Date: Mon Jun 16 14:21:58 2008
New Revision: 123110

URL: http://svn.digium.com/view/asterisk?view=rev&rev=123110
Log:
People expect that if "hasvoicemail" is set in users.conf, even if "mailbox"
isn't set, that SIP will detect a mailbox.
(closes issue #12855)
 Reported by: PLL
 Patches: 
       20080614__bug12855__2.diff.txt uploaded by Corydon76 (license 14)
 Tested by: PLL

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=123110&r1=123109&r2=123110
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Mon Jun 16 14:21:58 2008
@@ -16841,6 +16841,12 @@
 			ast_copy_string(peer->mohsuggest, v->value, sizeof(peer->mohsuggest));
 		} else if (!strcasecmp(v->name, "mailbox")) {
 			ast_copy_string(peer->mailbox, v->value, sizeof(peer->mailbox));
+		} else if (!strcasecmp(v->name, "hasvoicemail")) {
+			/* People expect that if 'hasvoicemail' is set, that the mailbox will
+			 * be also set, even if not explicitly specified. */
+			if (ast_true(v->value) && ast_strlen_zero(peer->mailbox)) {
+				ast_copy_string(peer->mailbox, name, sizeof(peer->mailbox));
+			}
 		} else if (!strcasecmp(v->name, "subscribemwi")) {
 			ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_SUBSCRIBEMWIONLY);
 		} else if (!strcasecmp(v->name, "vmexten")) {




More information about the svn-commits mailing list