Allow the user to specify where to enable the respective features for when a parked call is picked up. (ie: transfers and parking)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54910 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
ca614c38fa
commit
91a0c3bd91
|
@ -15,8 +15,10 @@ context => parkedcalls ; Which context parked calls are in
|
|||
; 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
|
||||
|
|
|
@ -1830,14 +1830,14 @@ static int park_exec(struct ast_channel *chan, void *data)
|
|||
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 @@ static int load_config(void)
|
|||
} 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")) {
|
||||
|
|
Reference in New Issue