Add option to features.conf that enables parking via DTMF on picked up parked calls...
authorJoshua Colp <jcolp@digium.com>
Fri, 16 Feb 2007 17:41:27 +0000 (17:41 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 16 Feb 2007 17:41:27 +0000 (17:41 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54889 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
configs/features.conf.sample
res/res_features.c

diff --git a/CHANGES b/CHANGES
index da57b18..c742be0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -59,6 +59,7 @@ Changes since Asterisk 1.4-beta was branched:
   * Added 'E' and 'V' commands to ExternalIVR.
   * Added 'DBDel' and 'DBDelTree' manager commands.
   * Added 'o' and 'X' options to Chanspy.
+  * Added the parkedcallreparking option to features.conf
 
 AMI - The manager (TCP/TLS/HTTP)
 --------------------------------
index d3e54f6..ea40a80 100644 (file)
@@ -16,6 +16,7 @@ context => parkedcalls                ; Which context parked calls are in
 ;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
 ;adsipark = yes                        ; if you want ADSI parking announcements
 ;findslot => next              ; Continue to the 'next' free parking space. 
                                ; Defaults to 'first' available
index f383ebc..c14f39f 100644 (file)
@@ -79,6 +79,7 @@ static char *parkedcall = "ParkedCall";
 
 static int parkaddhints = 0;                               /*!< Add parking hints automatically */
 static int parkedcalltransfers = 0;                        /*!< Enable DTMF based transfers on bridge when picking up parked calls */
+static int parkedcallreparking = 0;                        /*!< Enable DTMF based parking on bridge when picking up parked calls */
 static int parkingtime = DEFAULT_PARK_TIME;                /*!< No more than 45 seconds parked before you do something with them */
 static char parking_con[AST_MAX_EXTENSION];                /*!< Context for which parking is made accessible */
 static char parking_con_dial[AST_MAX_EXTENSION];           /*!< Context for dialback for parking (KLUDGE) */
@@ -1833,6 +1834,10 @@ static int park_exec(struct ast_channel *chan, void *data)
                        ast_set_flag(&(config.features_callee), AST_FEATURE_REDIRECT);
                        ast_set_flag(&(config.features_caller), AST_FEATURE_REDIRECT);
                }
+               if (parkedcallreparking) {
+                       ast_set_flag(&(config.features_callee), AST_FEATURE_PARKCALL);
+                       ast_set_flag(&(config.features_caller), AST_FEATURE_PARKCALL);
+               }
                res = ast_bridge_call(chan, peer, &config);
 
                pbx_builtin_setvar_helper(chan, "PARKEDCHANNEL", peer->name);
@@ -2123,6 +2128,7 @@ static int load_config(void)
        comebacktoorigin = 1;
        parkaddhints = 0;
        parkedcalltransfers = 0;
+       parkedcallreparking = 0;
 
        transferdigittimeout = DEFAULT_TRANSFER_DIGIT_TIMEOUT;
        featuredigittimeout = DEFAULT_FEATURE_DIGIT_TIMEOUT;
@@ -2157,6 +2163,8 @@ static int load_config(void)
                        parkaddhints = ast_true(var->value);
                } else if (!strcasecmp(var->name, "parkedcalltransfers")) {
                        parkedcalltransfers = ast_true(var->value);
+               } else if (!strcasecmp(var->name, "parkedcallreparking")) {
+                       parkedcallreparking = ast_true(var->value);
                } else if (!strcasecmp(var->name, "adsipark")) {
                        adsipark = ast_true(var->value);
                } else if (!strcasecmp(var->name, "transferdigittimeout")) {