aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-16 19:24:44 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-16 19:24:44 +0000
commit2d62682dfeef12e8918536b9abfd55b32c5be410 (patch)
tree1693f8984c57153de71777803aab4d4d93681c34 /channels/chan_sip.c
parente3d5b3969b3183740cb287cd04819d357a980be5 (diff)
Merged revisions 123111 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r123111 | tilghman | 2008-06-16 14:23:51 -0500 (Mon, 16 Jun 2008) | 16 lines Merged revisions 123110 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r123110 | tilghman | 2008-06-16 14:21:58 -0500 (Mon, 16 Jun 2008) | 8 lines 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 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@123112 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index c74362c0c..374d5a915 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -19962,6 +19962,12 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
ast_copy_string(peer->mohsuggest, v->value, sizeof(peer->mohsuggest));
} else if (!strcasecmp(v->name, "mailbox")) {
add_peer_mailboxes(peer, v->value);
+ } 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")) {