dect
/
asterisk
Archived
13
0
Fork 0

Even better, let it be specified per-context

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2820 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2004-04-29 13:53:38 +00:00
parent 2a45a10a64
commit 6821d911b9
2 changed files with 7 additions and 3 deletions

View File

@ -250,9 +250,6 @@ static int directory_exec(struct ast_channel *chan, void *data)
}
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) {
@ -260,6 +257,11 @@ top:
dialcontext++;
} else
dialcontext = context;
dirintro = ast_variable_retrieve(cfg, context, "directoryintro");
if (!dirintro || !strlen(dirintro))
dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
if (!dirintro || !strlen(dirintro))
dirintro = "dir-intro";
if (chan->_state != AST_STATE_UP)
res = ast_answer(chan);
if (!res)

View File

@ -115,4 +115,6 @@ yes
;
[other]
;The intro can be customized on a per-context basis
;directoryintro=dir-company2
1234 => 5678,Company2 User,root@localhost