diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-01 17:23:50 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-01 17:23:50 +0000 |
commit | 792fde9ad6edba4fae537e62dadaa6a3e4d1a0d1 (patch) | |
tree | 02e130d0a8542c63ed61c6e346eb648bcd2e8381 /apps/app_read.c | |
parent | ab9c17987f4d6557f22c61d7c3b2cd432ac447b9 (diff) |
fix timeout option
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5806 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_read.c')
-rwxr-xr-x | apps/app_read.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/app_read.c b/apps/app_read.c index d561c34d4..6f63d2dac 100755 --- a/apps/app_read.c +++ b/apps/app_read.c @@ -86,6 +86,7 @@ static int read_exec(struct ast_channel *chan, void *data) maxdigitstr = args[x++]; options = args[x++]; loops = args[x++]; + timeout = args[x++]; if (options) { if (!strcasecmp(options, "skip")) @@ -108,8 +109,10 @@ static int read_exec(struct ast_channel *chan, void *data) if(timeout) { to = atoi(timeout); - if(to <= 0) + if (to <= 0) to = 0; + else + to *= 1000; } if (!(filename) || ast_strlen_zero(filename)) @@ -140,7 +143,7 @@ static int read_exec(struct ast_channel *chan, void *data) if (!res) { while(tries && !res) { ast_stopstream(chan); - res = ast_app_getdata(chan, filename, tmp, maxdigits, 0); + res = ast_app_getdata(chan, filename, tmp, maxdigits, to); if (res > -1) { pbx_builtin_setvar_helper(chan, varname, tmp); if (!ast_strlen_zero(tmp)) { |