int res = 0;
struct localuser *u;
struct ast_config *cfg;
- char *context, *dialcontext;
+ char *context, *dialcontext, *dirintro;
if (!data) {
ast_log(LOG_WARNING, "directory requires an argument (context)\n");
return -1;
}
LOCAL_USER_ADD(u);
top:
+ dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
+ if (!dirintro || !strlen(dirintro))
+ dirintro = "dir-intro";
context = ast_strdupa(data);
dialcontext = strchr(context, '|');
if (dialcontext) {
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
if (!res)
- res = ast_streamfile(chan, "dir-intro", chan->language);
+ res = ast_streamfile(chan, dirintro, chan->language);
if (!res)
res = ast_waitstream(chan, AST_DIGIT_ANY);
ast_stopstream(chan);
; called when a voicemail is left, delivered, or your voicemailbox
; changes, uncomment this:
;externnotify=/usr/bin/myapp
-
+; For the directory, you can override the intro file if you want
+;directoryintro=dir-intro
; Skip the "[PBX]:" string from the message title
;pbxskip=yes