|
|
@ -858,15 +858,24 @@ static int directory_exec(struct ast_channel *chan, void *data)
|
|
|
|
if (!ast_strlen_zero(dirintro) && !res) {
|
|
|
|
if (!ast_strlen_zero(dirintro) && !res) {
|
|
|
|
res = ast_stream_and_wait(chan, dirintro, AST_DIGIT_ANY);
|
|
|
|
res = ast_stream_and_wait(chan, dirintro, AST_DIGIT_ANY);
|
|
|
|
} else if (!res) {
|
|
|
|
} else if (!res) {
|
|
|
|
res = ast_stream_and_wait(chan, "dir-welcome", AST_DIGIT_ANY) ||
|
|
|
|
/* Stop playing sounds as soon as we have a digit. */
|
|
|
|
ast_stream_and_wait(chan, "dir-pls-enter", AST_DIGIT_ANY) ||
|
|
|
|
res = ast_stream_and_wait(chan, "dir-welcome", AST_DIGIT_ANY);
|
|
|
|
ast_stream_and_wait(chan, digits, AST_DIGIT_ANY) ||
|
|
|
|
if (!res) {
|
|
|
|
ast_stream_and_wait(chan,
|
|
|
|
res = ast_stream_and_wait(chan, "dir-pls-enter", AST_DIGIT_ANY);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!res) {
|
|
|
|
|
|
|
|
res = ast_stream_and_wait(chan, digits, AST_DIGIT_ANY);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!res) {
|
|
|
|
|
|
|
|
res = ast_stream_and_wait(chan,
|
|
|
|
which == FIRST ? "dir-first" :
|
|
|
|
which == FIRST ? "dir-first" :
|
|
|
|
which == LAST ? "dir-last" :
|
|
|
|
which == LAST ? "dir-last" :
|
|
|
|
"dir-firstlast", AST_DIGIT_ANY) ||
|
|
|
|
"dir-firstlast", AST_DIGIT_ANY);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!res) {
|
|
|
|
ast_stream_and_wait(chan, "dir-usingkeypad", AST_DIGIT_ANY);
|
|
|
|
ast_stream_and_wait(chan, "dir-usingkeypad", AST_DIGIT_ANY);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
ast_stopstream(chan);
|
|
|
|
ast_stopstream(chan);
|
|
|
|
if (!res)
|
|
|
|
if (!res)
|
|
|
|
res = ast_waitfordigit(chan, 5000);
|
|
|
|
res = ast_waitfordigit(chan, 5000);
|
|
|
|