diff options
author | Mark Spencer <markster@digium.com> | 2004-08-01 01:38:15 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-08-01 01:38:15 +0000 |
commit | 27e3cd9ca855bf978a7a957bbfcc8c50759c5b59 (patch) | |
tree | d9a2cf707a888cb14f2bbe30207477639bcae811 /res | |
parent | 13a45232fae7c489c99240009334b483b04f7bfc (diff) |
Merge gryn's transfer digit timeout patch (bug #2184)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rwxr-xr-x | res/res_features.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/res/res_features.c b/res/res_features.c index 2190cd285..f6b4dfcda 100755 --- a/res/res_features.c +++ b/res/res_features.c @@ -38,6 +38,7 @@ #include <netinet/in.h> #define DEFAULT_PARK_TIME 45000 +#define DEFAULT_TRANSFER_DIGIT_TIMEOUT 3000 static char *parkedcall = "ParkedCall"; @@ -58,6 +59,8 @@ static int parking_start = 701; /* Last available extension for parking */ static int parking_stop = 750; +static int transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT; + /* Registrar for operations */ static char *registrar = "res_parking"; @@ -342,7 +345,7 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast } res = 0; while(strlen(newext) < sizeof(newext) - 1) { - res = ast_waitfordigit(transferer, 3000); + res = ast_waitfordigit(transferer, transferdigittimeout); if (res < 1) break; if (res == '#') @@ -728,6 +731,12 @@ int load_module(void) parking_start = start; parking_stop = end; } + } else if(!strcasecmp(var->name, "transferdigittimeout")) { + if ((sscanf(var->value, "%d", &transferdigittimeout) != 1) || (transferdigittimeout < 1)) { + ast_log(LOG_WARNING, "%s is not a valid transferdigittimeout\n", var->value); + transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT; + } else + transferdigittimeout = transferdigittimeout * 1000; } var = var->next; } |