Merged revisions 123113 via svnmerge from
[asterisk/asterisk.git] / channels / chan_h323.c
index bbe0551..9951d12 100644 (file)
@@ -1530,6 +1530,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)