diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-03 20:48:36 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-02-03 20:48:36 +0000 |
commit | ce5c3d1a761f9f399bfb1b7abf8d1e4951285f43 (patch) | |
tree | d4d673b1afc3759fe09b81655419c7caf8982156 /main/features.c | |
parent | 10d028214d8260cb99916c70c6e7ab5a4aff21c3 (diff) |
Add some additional option support for non-default parking lots.
The options are: parkedcallparking, parkedcallhangup, parkedcallrecording, and
parkedcalltransfers. Previously these options were only available for the
default parking lot.
(closes issue #16641)
Reported by: bluecrow76
Patches:
asterisk-1.6.2.1-features.c.diff uploaded by bluecrow76 (license 270)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@244598 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/main/features.c b/main/features.c index 8ff27ba2c..329dd17c5 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 */ |