[svn-commits] file: trunk r54910 - in /trunk: configs/features.conf.sample res/res_features.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Feb 16 11:08:34 MST 2007


Author: file
Date: Fri Feb 16 12:08:34 2007
New Revision: 54910

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54910
Log:
Allow the user to specify where to enable the respective features for when a parked call is picked up. (ie: transfers and parking)

Modified:
    trunk/configs/features.conf.sample
    trunk/res/res_features.c

Modified: trunk/configs/features.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/features.conf.sample?view=diff&rev=54910&r1=54909&r2=54910
==============================================================================
--- trunk/configs/features.conf.sample (original)
+++ trunk/configs/features.conf.sample Fri Feb 16 12:08:34 2007
@@ -15,8 +15,10 @@
 				; or the Touch Monitor is activated/deactivated.
 ;parkedplay = caller		; Who to play the courtesy tone to when picking up a parked call
 				; one of: parked, caller, both  (default is caller)
-;parkedcalltransfers = yes      ; Enables or disables DTMF based transfers when picking up a parked call
-;parkedcallreparking = yes      ; Enables or disables DTMF based parking when picking up a parked call
+;parkedcalltransfers = caller   ; Enables or disables DTMF based transfers when picking up a parked call.
+                                ; one of: callee, caller, both, no (default is no)
+;parkedcallreparking = caller   ; Enables or disables DTMF based parking when picking up a parked call.
+                                ; one of: callee, caller, both, no (default is no)
 ;adsipark = yes			; if you want ADSI parking announcements
 ;findslot => next		; Continue to the 'next' free parking space. 
 				; Defaults to 'first' available

Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?view=diff&rev=54910&r1=54909&r2=54910
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Fri Feb 16 12:08:34 2007
@@ -1830,14 +1830,14 @@
 			ast_verbose(VERBOSE_PREFIX_3 "Channel %s connected to parked call %d\n", chan->name, park);
 
 		memset(&config, 0, sizeof(struct ast_bridge_config));
-		if (parkedcalltransfers) {
+		if ((parkedcalltransfers == AST_FEATURE_FLAG_BYCALLEE) || (parkedcalltransfers == AST_FEATURE_FLAG_BYBOTH))
 			ast_set_flag(&(config.features_callee), AST_FEATURE_REDIRECT);
+		if ((parkedcalltransfers == AST_FEATURE_FLAG_BYCALLER) || (parkedcalltransfers == AST_FEATURE_FLAG_BYBOTH))
 			ast_set_flag(&(config.features_caller), AST_FEATURE_REDIRECT);
-		}
-		if (parkedcallreparking) {
+		if ((parkedcallreparking == AST_FEATURE_FLAG_BYCALLEE) || (parkedcallreparking == AST_FEATURE_FLAG_BYBOTH))
 			ast_set_flag(&(config.features_callee), AST_FEATURE_PARKCALL);
+		if ((parkedcallreparking == AST_FEATURE_FLAG_BYCALLER) || (parkedcallreparking == AST_FEATURE_FLAG_BYBOTH))
 			ast_set_flag(&(config.features_caller), AST_FEATURE_PARKCALL);
-		}
 		res = ast_bridge_call(chan, peer, &config);
 
 		pbx_builtin_setvar_helper(chan, "PARKEDCHANNEL", peer->name);
@@ -2162,9 +2162,19 @@
 		} else if (!strcasecmp(var->name, "parkinghints")) {
 			parkaddhints = ast_true(var->value);
 		} else if (!strcasecmp(var->name, "parkedcalltransfers")) {
-			parkedcalltransfers = ast_true(var->value);
+			if (!strcasecmp(var->value, "both"))
+				parkedcalltransfers = AST_FEATURE_FLAG_BYBOTH;
+			else if (!strcasecmp(var->value, "caller"))
+				parkedcalltransfers = AST_FEATURE_FLAG_BYCALLER;
+			else if (!strcasecmp(var->value, "callee"))
+				parkedcalltransfers = AST_FEATURE_FLAG_BYCALLEE;
 		} else if (!strcasecmp(var->name, "parkedcallreparking")) {
-			parkedcallreparking = ast_true(var->value);
+			if (!strcasecmp(var->value, "both"))
+				parkedcalltransfers = AST_FEATURE_FLAG_BYBOTH;
+			else if (!strcasecmp(var->value, "caller"))
+				parkedcalltransfers = AST_FEATURE_FLAG_BYCALLER;
+			else if (!strcasecmp(var->value, "callee"))
+				parkedcalltransfers = AST_FEATURE_FLAG_BYCALLEE;
 		} else if (!strcasecmp(var->name, "adsipark")) {
 			adsipark = ast_true(var->value);
 		} else if (!strcasecmp(var->name, "transferdigittimeout")) {



More information about the svn-commits mailing list