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;
124 if (wrap ==
user->parking_space) {
128 if (
user->parking_space < current_target) {
134 if (
user->parking_space > current_target) {
146 if (current_target <= lot->cfg->parking_stop) {
147 return current_target;
150 if (wrap <= lot->cfg->parking_stop) {
161 if (
user->parking_space == *target) {
225 if (existing_features) {
226 feature_flags = *existing_features;
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",
294 ast_verb(2,
"Can not start %s at %s,%s,1 and exten 's@%s' does not exist. Using 's@default'\n",
Asterisk main include file. File version handling, generic pbx functions.
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ao2_iterator_next(iter)
#define ao2_callback(c, flags, cb_fn, arg)
ao2_callback() is a generic function that applies cb_fn() to all objects in a container,...
#define ao2_unlink(container, obj)
Remove an object from a container.
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
Basic bridge subclass API.
struct ast_flags * ast_bridge_features_ds_get(struct ast_channel *chan)
Get DTMF feature flags from the channel.
int ast_bridge_features_ds_set(struct ast_channel *chan, struct ast_flags *flags)
Set basic bridge DTMF feature flags datastore on the channel.
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 ast_channel_add_bridge_role(struct ast_channel *chan, const char *role_name)
Adds a bridge role to a channel.
const char * ast_channel_name(const struct ast_channel *chan)
#define ast_channel_lock(chan)
#define ast_channel_unlock(chan)
Call Parking and Pickup API Includes code and algorithms from the Zapata library.
Support for logging to various files, console and syslog Configuration in file logger....
#define ast_verb(level,...)
The AMI - Asterisk Manager Interface - is a TCP protocol created to manage Asterisk with third-party ...
struct ast_bridge * bridge_parking_new(struct parking_lot *bridge_lot)
Create a new parking bridge.
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 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.
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.
void flatten_dial_string(char *dialstring)
Flattens a dial string so that it can be written to/found from PBX extensions.
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 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.
int parking_lot_get_space(struct parking_lot *lot, int target_override)
Get an available parking space within a parking lot.
static int retrieve_parked_user_targeted(void *obj, void *arg, int flags)
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.
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...
int ast_exists_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Determine whether an extension exists.
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.
Call Parking Resource Internal API.
#define PARK_DIAL_CONTEXT
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...
static force_inline int attribute_pure ast_strlen_zero(const char *s)
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
Structure that contains information about a bridge.
Main Channel structure associated with a channel.
Structure used to handle boolean flags.
char * parker_dial_string
struct ast_channel * chan
struct parked_user * user
unsigned int comebacktoorigin
const ast_string_field comebackcontext
const ast_string_field mohclass
unsigned int parkfindnext
struct ast_bridge * parking_bridge
struct parking_lot_cfg * cfg
struct ao2_container * parked_users
structure to hold users read from users.conf
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
#define ast_set_flag(p, flag)