summaryrefslogtreecommitdiff
path: root/main/features_config.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2013-06-10 15:32:02 +0000
committerMark Michelson <mmichelson@digium.com>2013-06-10 15:32:02 +0000
commitba5c97efcd8c1aac946700ff7709bef2ad140128 (patch)
tree38dbca67a519ed8bb73ecb052e96a6c2f2473ae1 /main/features_config.c
parentc2e29abcbf20f388269e1654e4196bfc7cf6c29e (diff)
Temporary fix for people using sample features.conf from previous Asterisk versions.
People who use the features.conf.sample file from Asterisk 11 and before in trunk were given a rude awakening when features configuration changes were made. Because it uses the config framework and the config framework is strict about what is accepted and what isn't, people that had parking options configured found that Asterisk no longer started. This is because parking options are currently handled in res_parking.conf instead of features.conf. This fix seeks to create a temporary band-aid fix for the problem, but having parking options from the general section be passed to a handler that will simply print that the option is no longer supported. This will not cause Asterisk to exit. The fix only applies to options in the general section. There are two main reasons for this: 1) The sample features.conf file only has parking options in the general section. There are no configured parking lots. Therefore it's not quite as "urgent" to get the parking lot parsing fixed. 2) The plan is to move parking configuration back from res_parking.conf to features.conf. When that happens, the parking lots will also be addressed at that time. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/features_config.c')
-rw-r--r--main/features_config.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/main/features_config.c b/main/features_config.c
index 4e5a65ecd..163c37dfa 100644
--- a/main/features_config.c
+++ b/main/features_config.c
@@ -1168,6 +1168,13 @@ static int pickup_handler(const struct aco_option *opt,
return pickup_set(pickup, var->name, var->value);
}
+static int unsupported_handler(const struct aco_option *opt,
+ struct ast_variable *var, void *obj)
+{
+ ast_log(LOG_WARNING, "The option '%s' is no longer configurable in features.conf.\n", var->name);
+ return 0;
+}
+
static int featuremap_handler(const struct aco_option *opt,
struct ast_variable *var, void *obj)
{
@@ -1378,6 +1385,41 @@ static int load_config(int reload)
aco_option_register_custom(&cfg_info, "pickupfailsound", ACO_EXACT, global_options,
DEFAULT_PICKUPFAILSOUND, pickup_handler, 0);
+ aco_option_register_custom(&cfg_info, "context", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkext", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkext_exclusive", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkinghints", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkedmusicclass", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkingtime", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkpos", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "findslot", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkedcalltransfers", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkedcallreparking", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkedcallhangup", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkedcallrecording", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "comebackcontext", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "comebacktoorigin", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "comebackdialtime", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "parkeddynamic", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+ aco_option_register_custom(&cfg_info, "adsipark", ACO_EXACT, global_options,
+ "", unsupported_handler, 0);
+
aco_option_register_custom(&cfg_info, "blindxfer", ACO_EXACT, featuremap_options,
DEFAULT_FEATUREMAP_BLINDXFER, featuremap_handler, 0);
aco_option_register_custom(&cfg_info, "disconnect", ACO_EXACT, featuremap_options,