diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-16 20:03:18 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-16 20:03:18 +0000 |
commit | e9da8938e3a5bbcdbaed21e4e8407f3d3ee693af (patch) | |
tree | e4a898f08c82306b8d455c2259fd612ff532dc3d /channels | |
parent | 2d62682dfeef12e8918536b9abfd55b32c5be410 (diff) |
Merged revisions 123114 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r123114 | tilghman | 2008-06-16 14:57:05 -0500 (Mon, 16 Jun 2008) | 10 lines
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: http://svn.digium.com/svn/asterisk/branches/1.6.0@123116 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_h323.c | 4 | ||||
-rw-r--r-- | channels/chan_iax2.c | 4 | ||||
-rw-r--r-- | channels/chan_mgcp.c | 4 | ||||
-rw-r--r-- | channels/chan_sip.c | 4 | ||||
-rw-r--r-- | channels/chan_skinny.c | 4 |
5 files changed, 18 insertions, 2 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c index 614090b87..1f0ca6d4d 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -1533,6 +1533,10 @@ static struct oh323_peer *build_peer(const char *name, struct ast_variable *v, s ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value); } else if (!strcasecmp(v->name, "mailbox")) { ast_copy_string(peer->mailbox, v->value, sizeof(peer->mailbox)); + } else if (!strcasecmp(v->name, "hasvoicemail")) { + if (ast_true(v->value) && ast_strlen_zero(peer->mailbox)) { + ast_copy_string(peer->mailbox, name, sizeof(peer->mailbox)); + } } } if (!peer->options.dtmfmode) diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 5a1a5ea5f..6339aa445 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -10241,6 +10241,10 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st ast_string_field_set(peer, secret, v->value); } else if (!strcasecmp(v->name, "mailbox")) { ast_string_field_set(peer, mailbox, v->value); + } else if (!strcasecmp(v->name, "hasvoicemail")) { + if (ast_true(v->value) && ast_strlen_zero(peer->mailbox)) { + ast_string_field_set(peer, mailbox, name); + } } else if (!strcasecmp(v->name, "mohinterpret")) { ast_string_field_set(peer, mohinterpret, v->value); } else if (!strcasecmp(v->name, "mohsuggest")) { diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index 11c8b1032..4b2e69c22 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -3695,6 +3695,10 @@ static struct mgcp_gateway *build_gateway(char *cat, struct ast_variable *v) canreinvite = ast_true(v->value); } else if (!strcasecmp(v->name, "mailbox")) { ast_copy_string(mailbox, v->value, sizeof(mailbox)); + } else if (!strcasecmp(v->name, "hasvoicemail")) { + if (ast_true(v->value) && ast_strlen_zero(mailbox)) { + ast_copy_string(mailbox, gw->name, sizeof(mailbox)); + } } else if (!strcasecmp(v->name, "adsi")) { adsi = ast_true(v->value); } else if (!strcasecmp(v->name, "callreturn")) { diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 374d5a915..c909f5af6 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -19965,8 +19965,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); diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index e77ca643e..43e566aaa 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -3037,6 +3037,10 @@ static struct skinny_device *build_device(const char *cat, struct ast_variable * cancallforward = ast_true(v->value); } else if (!strcasecmp(v->name, "mailbox")) { ast_copy_string(mailbox, v->value, sizeof(mailbox)); + } else if (!strcasecmp(v->name, "hasvoicemail")) { + if (ast_true(v->value) && ast_strlen_zero(mailbox)) { + ast_copy_string(mailbox, cat, sizeof(mailbox)); + } } else if (!strcasecmp(v->name, "callreturn")) { callreturn = ast_true(v->value); } else if (!strcasecmp(v->name, "callwaiting")) { |