Merged revisions 123113 via svnmerge from
[asterisk/asterisk.git] / channels / chan_mgcp.c
index 6cc7e66..46b75bf 100644 (file)
@@ -3699,6 +3699,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")) {