summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-06-16 19:57:05 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-06-16 19:57:05 +0000
commit596f8b51862a9bbcf348c2cd1776a155043233af (patch)
treeff0394cd5b908fa8019ecb214661a8dd00fef027 /channels/chan_sip.c
parentba07bd38b78a4355d14ecb9c1c422466df3186eb (diff)
Merged revisions 123113 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r123113 | tilghman | 2008-06-16 14:50:12 -0500 (Mon, 16 Jun 2008) | 2 lines Port "hasvoicemail" change from SIP to other channel drivers ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123114 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 64e1e5bc6..72035ebad 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -21262,8 +21262,8 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
} 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));
+ if (ast_true(v->value) && AST_LIST_EMPTY(&peer->mailboxes)) {
+ add_peer_mailboxes(peer, name);
}
} else if (!strcasecmp(v->name, "subscribemwi")) {
ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_SUBSCRIBEMWIONLY);