111 if (target_override >= lot->
cfg->
parking_start && target_override <= lot->cfg->parking_stop) {
112 original_target = target_override;
113 }
else if (target_override > -1) {
117 current_target = original_target;
122 while ((user = ao2_iterator_next(&i))) {
146 if (current_target <= lot->cfg->parking_stop) {
147 return current_target;
150 if (wrap <= lot->cfg->parking_stop) {
157 static int retrieve_parked_user_targeted(
void *obj,
void *arg,
int flags)
223 ast_channel_lock(chan);
225 if (existing_features) {
226 feature_flags = *existing_features;
230 ast_set_flag(&feature_flags, AST_FEATURE_REDIRECT);
234 ast_set_flag(&feature_flags, AST_FEATURE_PARKCALL);
238 ast_set_flag(&feature_flags, AST_FEATURE_DISCONNECT);
242 ast_set_flag(&feature_flags, AST_FEATURE_AUTOMIXMON);
246 ast_channel_unlock(chan);
255 for (i = 0; dialstring[i]; i++) {
256 if (dialstring[i] ==
'/') {
276 ast_log(LOG_ERROR,
"Can not start %s at %s,%s,1 because extension does not exist. Terminating call.\n",
277 ast_channel_name(chan), PARK_DIAL_CONTEXT, peername_flat);
288 ast_verb(2,
"Could not start %s at %s,%s,1. Using 's@%s' instead.\n", ast_channel_name(chan),
294 ast_verb(2,
"Can not start %s at %s,%s,1 and exten 's@%s' does not exist. Using 's@default'\n",
295 ast_channel_name(chan),
Main Channel structure associated with a channel.
int unpark_parked_user(struct parked_user *pu)
Pull a parked user out of its parking lot. Use this when you don't want to use the parked user afterw...
Asterisk main include file. File version handling, generic pbx functions.
int parking_lot_get_space(struct parking_lot *lot, int target_override)
Get an available parking space within a parking lot.
struct ast_bridge * parking_bridge
struct ao2_container * parked_users
#define ao2_callback(c, flags, cb_fn, arg)
ao2_callback() is a generic function that applies cb_fn() to all objects in a container, as described below.
void parked_call_retrieve_enable_features(struct ast_channel *chan, struct parking_lot *lot, int recipient_mode)
Apply features based on the parking lot feature options.
int ast_bridge_features_ds_set(struct ast_channel *chan, struct ast_flags *flags)
Set basic bridge DTMF feature flags datastore on the channel.
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
const ast_string_field comebackcontext
void flatten_dial_string(char *dialstring)
Flattens a dial string so that it can be written to/found from PBX extensions.
int ast_channel_add_bridge_role(struct ast_channel *chan, const char *role_name)
Adds a bridge role to a channel.
struct parked_user * parking_lot_retrieve_parked_user(struct parking_lot *lot, int target)
Determine if there is a parked user in a parking space and pull it from the parking lot if there is...
struct parked_user * parking_lot_inspect_parked_user(struct parking_lot *lot, int target)
Determine if there is a parked user in a parking space and return it if there is. ...
int ast_channel_set_bridge_role_option(struct ast_channel *channel, const char *role_name, const char *option, const char *value)
Set a role option on a channel.
int parking_channel_set_roles(struct ast_channel *chan, struct parking_lot *lot, int force_ringing)
Set necessary bridge roles on a channel that is about to enter a parking lot.
int parking_lot_remove_if_unused(struct parking_lot *lot)
Remove a parking lot from the usable lists if it is no longer involved in any calls and no configurat...
char * parker_dial_string
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
int ast_exists_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Determine whether an extension exists.
enum park_call_resolution resolution
unsigned int comebacktoorigin
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
Structure that contains information about a bridge.
struct ast_flags * ast_bridge_features_ds_get(struct ast_channel *chan)
Get DTMF feature flags from the channel.
int comeback_goto(struct parked_user *pu, struct parking_lot *lot)
Set a channel's position in the PBX after timeout using the parking lot settings. ...
#define ao2_unlink(container, obj)
Remove an object from a container.
struct ast_bridge * bridge_parking_new(struct parking_lot *bridge_lot)
Create a new parking bridge.
unsigned int parkfindnext
Support for logging to various files, console and syslog Configuration in file logger.conf.
Basic bridge subclass API.
structure to hold users read from users.conf
Structure used to handle boolean flags.
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
int ast_async_goto(struct ast_channel *chan, const char *context, const char *exten, int priority)
Set the channel to next execute the specified dialplan location.
const ast_string_field mohclass
Call Parking Resource Internal API.
Call Parking and Pickup API Includes code and algorithms from the Zapata library. ...
struct ast_bridge * parking_lot_get_bridge(struct parking_lot *lot)
Get a reference to a parking lot's bridge. If it doesn't exist, create it and get a reference...
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
struct ast_channel * chan
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
struct parking_lot_cfg * cfg