diff --git a/CHANGES b/CHANGES index bda1cf1fc1..0327789c8f 100644 --- a/CHANGES +++ b/CHANGES @@ -1300,6 +1300,8 @@ Call Features (res_features) Changes pickup * Added parkedcallrecording option to control one-touch record w/ parking pickup + * Added parkedcallparking, parkedcallhangup, parkedcallrecording, and + parkedcalltransfers option support for multiple parking lots. * Added BRIDGE_FEATURES variable to set available features for a channel * The built-in method for doing attended transfers has been updated to include some new options that allow you to have the transferee sent diff --git a/main/features.c b/main/features.c index 8ff27ba2c9..329dd17c50 100644 --- a/main/features.c +++ b/main/features.c @@ -3865,7 +3865,39 @@ static struct ast_parkinglot *build_parkinglot(char *name, struct ast_variable * } } else if (!strcasecmp(confvar->name, "findslot")) { parkinglot->parkfindnext = (!strcasecmp(confvar->value, "next")); - } + } else if (!strcasecmp(confvar->name, "parkedcalltransfers")) { + ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value); + if (!strcasecmp(confvar->value, "both")) + parkinglot->parkedcalltransfers = AST_FEATURE_FLAG_BYBOTH; + else if (!strcasecmp(confvar->value, "caller")) + parkinglot->parkedcalltransfers = AST_FEATURE_FLAG_BYCALLER; + else if (!strcasecmp(confvar->value, "callee")) + parkinglot->parkedcalltransfers = AST_FEATURE_FLAG_BYCALLEE; + } else if (!strcasecmp(confvar->name, "parkedcallreparking")) { + ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value); + if (!strcasecmp(confvar->value, "both")) + parkinglot->parkedcallreparking = AST_FEATURE_FLAG_BYBOTH; + else if (!strcasecmp(confvar->value, "caller")) + parkinglot->parkedcallreparking = AST_FEATURE_FLAG_BYCALLER; + else if (!strcasecmp(confvar->value, "callee")) + parkinglot->parkedcallreparking = AST_FEATURE_FLAG_BYCALLEE; + } else if (!strcasecmp(confvar->name, "parkedcallhangup")) { + ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value); + if (!strcasecmp(confvar->value, "both")) + parkinglot->parkedcallhangup = AST_FEATURE_FLAG_BYBOTH; + else if (!strcasecmp(confvar->value, "caller")) + parkinglot->parkedcallhangup = AST_FEATURE_FLAG_BYCALLER; + else if (!strcasecmp(confvar->value, "callee")) + parkinglot->parkedcallhangup = AST_FEATURE_FLAG_BYCALLEE; + } else if (!strcasecmp(confvar->name, "parkedcallrecording")) { + ast_log(LOG_DEBUG, "Setting parking lot %s %s to %s\n", name, confvar->name, confvar->value); + if (!strcasecmp(confvar->value, "both")) + parkinglot->parkedcallrecording = AST_FEATURE_FLAG_BYBOTH; + else if (!strcasecmp(confvar->value, "caller")) + parkinglot->parkedcallrecording = AST_FEATURE_FLAG_BYCALLER; + else if (!strcasecmp(confvar->value, "callee")) + parkinglot->parkedcallrecording = AST_FEATURE_FLAG_BYCALLEE; + } confvar = confvar->next; } /* make sure parkingtime is set if not specified */