Index: pbx/pbx_config.c =================================================================== --- pbx/pbx_config.c (revision 312948) +++ pbx/pbx_config.c (working copy) @@ -1620,7 +1620,7 @@ struct ast_config *cfg; char *cat, *chan; const char *dahdichan; - const char *hasexten, *altexts; + const char *hasexten, *mailbox, *altexts; char tmp[256]; char iface[256]; char dahdicopy[256]; @@ -1700,7 +1700,8 @@ ast_add_extension2(con, 0, cat, -1, NULL, NULL, iface, NULL, NULL, registrar); /* If voicemail, use "stdexten" else use plain old dial */ if (hasvoicemail) { - snprintf(tmp, sizeof(tmp), "stdexten,%s,${HINT}", cat); + mailbox = ast_variable_retrieve(cfg, cat, "mailbox"); + snprintf(tmp, sizeof(tmp), "stdexten,%s,${HINT}", (mailbox?mailbox:cat)); ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Macro", strdup(tmp), ast_free_ptr, registrar); } else { ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Dial", strdup("${HINT}"), ast_free_ptr, registrar); @@ -1712,6 +1713,7 @@ c = altcopy; ext = strsep(&c, ","); while (ext) { + ast_add_extension2(con, 0, ext, -1, NULL, NULL, iface, NULL, NULL, registrar); ast_add_extension2(con, 0, ext, 1, NULL, NULL, "Goto", strdup(tmp), ast_free_ptr, registrar); ext = strsep(&c, ","); } Index: apps/app_voicemail.c =================================================================== --- apps/app_voicemail.c (revision 312948) +++ apps/app_voicemail.c (working copy) @@ -12142,7 +12142,11 @@ for (cat = ast_category_browse(ucfg, NULL); cat ; cat = ast_category_browse(ucfg, cat)) { if (!ast_true(ast_config_option(ucfg, cat, "hasvoicemail"))) continue; - if ((current = find_or_create(userscontext, cat))) { + val = ast_variable_retrieve(ucfg, cat, "mailbox"); + if ((current = find_or_create(userscontext, (val ? val : cat)))) { populate_defaults(current); apply_options_full(current, ast_variable_browse(ucfg, cat)); ast_copy_string(current->context, userscontext, sizeof(current->context)); Index: configs/users.conf.sample =================================================================== --- configs/users.conf.sample (revision 312948) +++ configs/users.conf.sample (working copy) @@ -104,6 +104,10 @@ ; alternateexts entry. ; ;alternateexts = 7057,3249 +; +; Specify voicemail mailbox. Useful with alphanumeric extensions. +; +;mailbox = 7057 ;macaddress = 112233445566 ;autoprov = yes ;LINEKEYS = 1