diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-06-11 12:14:38 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-06-11 12:14:38 +0000 |
commit | edb03b0af45b3757192f1efb91b1a3f6e74e8ac3 (patch) | |
tree | afe225fecdde2f43036982db83499d02621ec60b /app.c | |
parent | 3e768fd8a29d516dc9419eefd6a69020ce093f6b (diff) |
Use digit/response timeouts
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1081 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rwxr-xr-x | app.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -21,6 +21,7 @@ #include <unistd.h> #include <dirent.h> #include <asterisk/channel.h> +#include <asterisk/pbx.h> #include <asterisk/file.h> #include <asterisk/app.h> #include <asterisk/dsp.h> @@ -40,8 +41,9 @@ int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, in if (res < 0) return res; } - fto = 6000; - to = 2000; + fto = c->pbx ? c->pbx->rtimeout * 1000 : 6000; + to = c->pbx ? c->pbx->dtimeout * 1000 : 2000; + if (timeout > 0) fto = to = timeout; if (timeout < 0) fto = to = 1000000000; res = ast_readstring(c, s, maxlen, to, fto, "#"); |