Index: res/res_features.c =================================================================== --- res/res_features.c (revision 14178) +++ res/res_features.c (working copy) @@ -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 @@ -96,6 +97,13 @@ static int transferdigittimeout; static int featuredigittimeout; +/* + Miroslav Nachev, miro@space-comm.com + COSMOS Software Enterprises, Ltd. + Variable for No Answer Timeout for Attended Transfer +*/ +static int atxfernoanswertimeout; + static char *registrar = "res_features"; /*!< Registrar for operations */ /* module and CLI command definitions */ @@ -704,7 +712,7 @@ cid_name = transferer->cid.cid_name; if (ast_exists_extension(transferer, transferer_real_context,xferto, 1, cid_num)) { snprintf(dialstr, sizeof(dialstr), "%s@%s/n", xferto, transferer_real_context); - newchan = ast_feature_request_and_dial(transferer, "Local", ast_best_codec(transferer->nativeformats), dialstr, 15000, &outstate, cid_num, cid_name); + newchan = ast_feature_request_and_dial(transferer, "Local", ast_best_codec(transferer->nativeformats), dialstr, atxfernoanswertimeout, &outstate, cid_num, cid_name); ast_indicate(transferer, -1); if (newchan) { res = ast_channel_make_compatible(transferer, newchan); @@ -2047,6 +2055,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) { @@ -2084,7 +2093,13 @@ ast_log(LOG_WARNING, "%s is not a valid featuredigittimeout\n", var->value); featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT; } - } else if (!strcasecmp(var->name, "courtesytone")) { + } 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")) { if (!strcasecmp(var->value, "both"))