aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-01 01:38:15 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-01 01:38:15 +0000
commitbca09ec25b88f623ce55a6034d8e3c58bb471faf (patch)
treed9a2cf707a888cb14f2bbe30207477639bcae811 /res
parent71219703ee7cb19389f1c88f035dba282f8bdc1a (diff)
Merge gryn's transfer digit timeout patch (bug #2184)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3555 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rwxr-xr-xres/res_features.c11
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;
}