--- res_features.c-orig	2006-04-12 10:23:53.000000000 +0200
+++ res_features.c	2006-04-12 10:23:40.000000000 +0200
@@ -69,6 +69,7 @@
 #define DEFAULT_PARK_TIME 45000
 #define DEFAULT_TRANSFER_DIGIT_TIMEOUT 3000
 #define DEFAULT_FEATURE_DIGIT_TIMEOUT 500
+#define DEFAULT_TRANSFER_TIMEOUT 15000
 
 #define AST_MAX_WATCHERS 256
 
@@ -108,6 +109,7 @@
 static int transferdigittimeout;
 static int featuredigittimeout;
 
+static int atxfertimeout;
 /* Default courtesy tone played when party joins conference */
 
 /* Registrar for operations */
@@ -721,7 +723,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, atxfertimeout, &outstate, cid_num, cid_name);
 			ast_indicate(transferer, -1);
 			if (newchan) {
 				res = ast_channel_make_compatible(transferer, newchan);
@@ -1120,7 +1122,7 @@
 				/* see if the timeout has been violated */
 				if(ast_tvdiff_ms(ast_tvnow(), started) > timeout) {
 					state = AST_CONTROL_UNHOLD;
-					ast_log(LOG_NOTICE, "We exceeded our AT-timeout\n");
+					ast_log(LOG_NOTICE, "We exceeded our AT-timeout: %d seconds (atxfertimeout)\n",atxfertimeout / 1000);
 					break; /*doh! timeout*/
 				}
 
@@ -1975,6 +1977,7 @@
 
 	transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT;
 	featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
+	atxfertimeout = DEFAULT_TRANSFER_TIMEOUT;
 
 	cfg = ast_config_load("features.conf");
 	if (!cfg) {
@@ -2025,6 +2028,12 @@
 				ast_copy_string(xferfailsound, var->value, sizeof(xferfailsound));
 			} else if (!strcasecmp(var->name, "pickupexten")) {
 				ast_copy_string(pickup_ext, var->value, sizeof(pickup_ext));
+			} else if (!strcasecmp(var->name, "atxfertimeout")) {
+				if ((sscanf(var->value, "%d", &atxfertimeout) != 1) || (atxfertimeout < 1)) {
+					ast_log(LOG_WARNING, "%s is not a valid atxfertimeout\n", var->value);
+					atxfertimeout = DEFAULT_TRANSFER_TIMEOUT;
+				} else
+					atxfertimeout = atxfertimeout * 1000;
 			}
 			var = var->next;
 		}
