[asterisk-commits] trunk r29766 - in /trunk: ./ configs/ res/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue May 23 11:23:06 MST 2006
Author: mogorman
Date: Tue May 23 13:23:05 2006
New Revision: 29766
URL: http://svn.digium.com/view/asterisk?rev=29766&view=rev
Log:
allows for configurable answer timeout on attended transfer
patch 0006763 with minor changes.
Modified:
trunk/CREDITS
trunk/configs/features.conf.sample
trunk/res/res_features.c
Modified: trunk/CREDITS
URL: http://svn.digium.com/view/asterisk/trunk/CREDITS?rev=29766&r1=29765&r2=29766&view=diff
==============================================================================
--- trunk/CREDITS (original)
+++ trunk/CREDITS Tue May 23 13:23:05 2006
@@ -79,6 +79,8 @@
Steve Murphy - privacy support, $[ ] parser upgrade, AEL2 parser upgrade
Claude Patry - bug fixes, feature enhancements, and bug marshalling
cpatry at gmail.com
+Miroslav Nachev, miro at space-comm.com COSMOS Software Enterprises, Ltd.
+ - for Variable for No Answer Timeout for Attended Transfer
=== OTHER CONTRIBUTIONS ===
John Todd - Monkey sounds and associated teletorture prompt
Modified: trunk/configs/features.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/features.conf.sample?rev=29766&r1=29765&r2=29766&view=diff
==============================================================================
--- trunk/configs/features.conf.sample (original)
+++ trunk/configs/features.conf.sample Tue May 23 13:23:05 2006
@@ -26,6 +26,7 @@
;pickupexten = *8 ; Configure the pickup extension. (default is *8)
;featuredigittimeout = 500 ; Max time (ms) between digits for
; feature activation (default is 500 ms)
+;atxfernoanswertimeout = 15 ; Timeout for answer on attended transfer default is 15 seconds.
[featuremap]
;blindxfer => #1 ; Blind transfer (default is #)
Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?rev=29766&r1=29765&r2=29766&view=diff
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Tue May 23 13:23:05 2006
@@ -70,6 +70,7 @@
#define DEFAULT_PARK_TIME 45000
#define DEFAULT_TRANSFER_DIGIT_TIMEOUT 3000
#define DEFAULT_FEATURE_DIGIT_TIMEOUT 500
+#define DEFAULT_NOANSWER_TIMEOUT_ATTENDED_TRANSFER 15000
#define AST_MAX_WATCHERS 256
@@ -95,6 +96,8 @@
static int transferdigittimeout;
static int featuredigittimeout;
+
+static int atxfernoanswertimeout;
static char *registrar = "res_features"; /*!< Registrar for operations */
@@ -722,7 +725,7 @@
l = strlen(xferto);
snprintf(xferto + l, sizeof(xferto) - l, "@%s/n", transferer_real_context); /* append context */
newchan = ast_feature_request_and_dial(transferer, "Local", ast_best_codec(transferer->nativeformats),
- xferto, 15000, &outstate, transferer->cid.cid_num, transferer->cid.cid_name);
+ xferto, atxfernoanswertimeout, &outstate, transferer->cid.cid_num, transferer->cid.cid_name);
ast_indicate(transferer, -1);
if (!newchan) {
finishup(transferee);
@@ -1986,6 +1989,7 @@
transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT;
featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
+ atxfernoanswertimeout = DEFAULT_NOANSWER_TIMEOUT_ATTENDED_TRANSFER;
cfg = ast_config_load("features.conf");
if (cfg) {
@@ -2022,6 +2026,12 @@
ast_log(LOG_WARNING, "%s is not a valid featuredigittimeout\n", var->value);
featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
}
+ } else if (!strcasecmp(var->name, "atxfernoanswertimeout")) {
+ if ((sscanf(var->value, "%d", &atxfernoanswertimeout) != 1) || (atxfernoanswertimeout < 1)) {
+ ast_log(LOG_WARNING, "%s is not a valid atxfernoanswertimeout\n", var->value);
+ atxfernoanswertimeout = DEFAULT_NOANSWER_TIMEOUT_ATTENDED_TRANSFER;
+ } else
+ atxfernoanswertimeout = atxfernoanswertimeout * 1000;
} else if (!strcasecmp(var->name, "courtesytone")) {
ast_copy_string(courtesytone, var->value, sizeof(courtesytone));
} else if (!strcasecmp(var->name, "parkedplay")) {
More information about the asterisk-commits
mailing list