* If compiled with DEBUG_THREADS enabled and if you have glibc, then issuing
the "core show locks" CLI command will give lock information output as well
as a backtrace of the stack which led to the lock calls.
+ * users.conf now sports an optional alternativeexts property, which permits
+ allocation of additional extensions which will reach the specified user.
;hasmanager = no
;callwaiting = no
;context = international
+;
+; Some administrators choose alphanumeric extensions, but still want their
+; users to be reachable by traditional numeric extensions, specified by the
+; alternateexts entry.
+;
+;alternateexts = 7057,3249
struct ast_config *cfg;
char *cat, *chan;
const char *dahdichan;
- const char *hasexten;
+ const char *hasexten, *altexts;
char tmp[256];
char iface[256];
char dahdicopy[256];
+ char *ext, altcopy[256];
char *c;
int len;
int hasvoicemail;
} else {
ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Dial", strdup("${HINT}"), ast_free_ptr, registrar);
}
+ altexts = ast_variable_retrieve(cfg, cat, "alternateexts");
+ if (!ast_strlen_zero(altexts)) {
+ snprintf(tmp, sizeof(tmp), "%s,1", cat);
+ ast_copy_string(altcopy, altexts, sizeof(altcopy));
+ c = altcopy;
+ ext = strsep(&c, ",");
+ while (ext) {
+ ast_add_extension2(con, 0, ext, 1, NULL, NULL, "Goto", strdup(tmp), ast_free, registrar);
+ ext = strsep(&c, ",");
+ }
+ }
}
}
ast_config_destroy(cfg);