aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directed_pickup.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-27 20:55:36 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-27 20:55:36 +0000
commitf0f89a8dd6342465d63ddd632757367e620ecf15 (patch)
tree13ed076efd0dcf9ac70e776ccf413b7cdb3da06a /apps/app_directed_pickup.c
parentb42e437b46746730fa2211e6dc8a781941743cb0 (diff)
Enhance Pickup to do native pickupgroup pickup when no arguments are specified (closes issue #10404)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81118 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_directed_pickup.c')
-rw-r--r--apps/app_directed_pickup.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c
index 99b252793..b6e483ae2 100644
--- a/apps/app_directed_pickup.c
+++ b/apps/app_directed_pickup.c
@@ -42,17 +42,21 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/app.h"
#include "asterisk/options.h"
+#include "asterisk/features.h"
#define PICKUPMARK "PICKUPMARK"
static const char *app = "Pickup";
static const char *synopsis = "Directed Call Pickup";
static const char *descrip =
-" Pickup(extension[@context][&extension2@context...]): This application can pickup any ringing channel\n"
-"that is calling the specified extension. If no context is specified, the current\n"
-"context will be used. If you use the special string \"PICKUPMARK\" for the context parameter, for example\n"
-"10@PICKUPMARK, this application tries to find a channel which has defined a channel variable with the same content\n"
-"as \"extension\".";
+" Pickup([extension[@context][&extension2@context...]]): This application can\n"
+"pickup any ringing channel that is calling the specified extension. If no\n"
+"context is specified, the current context will be used. If you use the special\n"
+"string \"PICKUPMARK\" for the context parameter, for example 10@PICKUPMARK,\n"
+"this application tries to find a channel which has defined a ${PICKUPMARK}\n"
+"channel variable with the same value as \"extension\" (in this example, \"10\").\n"
+"When no parameter is specified, the application will pickup a channel matching\n"
+"the pickup group of the active channel.";
/* Perform actual pickup between two channels */
static int pickup_do(struct ast_channel *chan, struct ast_channel *target)
@@ -137,8 +141,8 @@ static int pickup_exec(struct ast_channel *chan, void *data)
char *exten = NULL, *context = NULL;
if (ast_strlen_zero(data)) {
- ast_log(LOG_WARNING, "Pickup requires an argument (extension)!\n");
- return -1;
+ res = ast_pickup_call(chan);
+ return res;
}
/* Parse extension (and context if there) */