Directed Call Pickup Support. More...
#include "asterisk.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
#include "asterisk/features.h"
#include "asterisk/manager.h"
#include "asterisk/callerid.h"
#include "asterisk/cel.h"
Go to the source code of this file.
Data Structures | |
struct | pickup_by_name_args |
Macros | |
#define | PICKUPMARK "PICKUPMARK" |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | find_by_mark (void *obj, void *arg, void *data, int flags) |
static int | find_by_part (void *obj, void *arg, void *data, int flags) |
static int | find_channel_by_group (void *obj, void *arg, void *data, int flags) |
static int | load_module (void) |
static struct ast_channel * | my_ast_get_channel_by_name_locked (const char *channame) |
Helper Function to walk through ALL channels checking NAME and STATE. More... | |
static int | pickup_by_channel (struct ast_channel *chan, char *pickup) |
Attempt to pick up named channel, does not use context. More... | |
static int | pickup_by_exten (struct ast_channel *chan, const char *exten, const char *context) |
static int | pickup_by_group (struct ast_channel *chan) |
static int | pickup_by_mark (struct ast_channel *chan, const char *mark) |
static int | pickup_by_name_cb (void *obj, void *arg, void *data, int flags) |
static int | pickup_by_part (struct ast_channel *chan, const char *part) |
static int | pickup_exec (struct ast_channel *chan, const char *data) |
static int | pickupchan_exec (struct ast_channel *chan, const char *data) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Directed Call Pickup Application" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, } |
static const char | app [] = "Pickup" |
static const char | app2 [] = "PickupChan" |
static struct ast_module_info * | ast_module_info = &__mod_info |
Directed Call Pickup Support.
Definition in file app_directed_pickup.c.
#define PICKUPMARK "PICKUPMARK" |
Definition at line 51 of file app_directed_pickup.c.
Referenced by find_by_mark(), and pickup_exec().
|
static |
Definition at line 419 of file app_directed_pickup.c.
|
static |
Definition at line 419 of file app_directed_pickup.c.
|
static |
< Potential pickup target
Definition at line 221 of file app_directed_pickup.c.
References ast_can_pickup(), ast_channel_lock, ast_channel_unlock, CMP_MATCH, CMP_STOP, ast_channel::data, pbx_builtin_getvar_helper(), and PICKUPMARK.
Referenced by pickup_by_mark().
|
static |
< Potential pickup target
Definition at line 321 of file app_directed_pickup.c.
References ast_can_pickup(), ast_channel_lock, ast_channel_unlock, CMP_MATCH, CMP_STOP, ast_channel::data, len(), and ast_channel::name.
Referenced by pickup_by_part().
|
static |
< Potential pickup target
< Channel wanting to pickup call
Definition at line 255 of file app_directed_pickup.c.
References ast_can_pickup(), ast_channel_lock, ast_channel_unlock, ast_channel::callgroup, CMP_MATCH, CMP_STOP, ast_channel::data, and ast_channel::pickupgroup.
Referenced by pickup_by_group().
|
static |
Definition at line 409 of file app_directed_pickup.c.
References ast_register_application_xml, pickup_exec(), and pickupchan_exec().
|
static |
Helper Function to walk through ALL channels checking NAME and STATE.
Definition at line 143 of file app_directed_pickup.c.
References ast_alloca, ast_channel_callback(), pickup_by_name_args::len, pickup_by_name_args::name, and pickup_by_name_cb().
Referenced by pickup_by_channel().
|
static |
Attempt to pick up named channel, does not use context.
< Potential pickup target
Definition at line 171 of file app_directed_pickup.c.
References ast_channel_unlock, ast_channel_unref, ast_do_pickup(), and my_ast_get_channel_by_name_locked().
Referenced by pickupchan_exec().
|
static |
< Potential pickup target
Definition at line 190 of file app_directed_pickup.c.
References ast_can_pickup(), ast_channel_iterator_by_exten_new(), ast_channel_iterator_destroy(), ast_channel_iterator_next(), ast_channel_lock, ast_channel_unlock, ast_channel_unref, ast_do_pickup(), ast_log(), LOG_NOTICE, and ast_channel::name.
Referenced by pickup_exec().
|
static |
< Potential pickup target
Definition at line 271 of file app_directed_pickup.c.
References ast_channel_callback(), ast_channel_unlock, ast_channel_unref, ast_do_pickup(), ast_log(), find_channel_by_group(), LOG_NOTICE, and ast_channel::name.
Referenced by pickup_exec().
|
static |
< Potential pickup target
Definition at line 239 of file app_directed_pickup.c.
References ast_channel_callback(), ast_channel_unlock, ast_channel_unref, ast_do_pickup(), and find_by_mark().
Referenced by pickup_exec().
|
static |
< Potential pickup target
Definition at line 127 of file app_directed_pickup.c.
References args, ast_can_pickup(), ast_channel_lock, ast_channel_unlock, CMP_MATCH, CMP_STOP, pickup_by_name_args::len, pickup_by_name_args::name, and ast_channel::name.
Referenced by my_ast_get_channel_by_name_locked().
|
static |
< Potential pickup target
Definition at line 339 of file app_directed_pickup.c.
References ast_channel_callback(), ast_channel_unlock, ast_channel_unref, ast_do_pickup(), and find_by_part().
Referenced by pickupchan_exec().
|
static |
Definition at line 289 of file app_directed_pickup.c.
References ast_log(), ast_strdupa, ast_strlen_zero(), context, ast_channel::context, exten, LOG_NOTICE, pickup_by_exten(), pickup_by_group(), pickup_by_mark(), PICKUPMARK, and strsep().
Referenced by load_module().
|
static |
Definition at line 356 of file app_directed_pickup.c.
References args, AST_APP_ARG, AST_DECLARE_APP_ARGS, ast_log(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), LOG_NOTICE, LOG_WARNING, ast_channel::name, parse(), pickup_by_channel(), pickup_by_part(), and strsep().
Referenced by load_module().
|
static |
Definition at line 399 of file app_directed_pickup.c.
References ast_unregister_application().
|
static |
Definition at line 419 of file app_directed_pickup.c.
|
static |
Definition at line 119 of file app_directed_pickup.c.
|
static |
Definition at line 120 of file app_directed_pickup.c.
Referenced by _macro_exec(), and app_cmp().
|
static |
Definition at line 419 of file app_directed_pickup.c.