26 #ifndef ASTERISK_RES_PARKING_H 27 #define ASTERISK_RES_PARKING_H 34 #define DEFAULT_PARKING_LOT "default" 35 #define DEFAULT_PARKING_EXTEN "700" 36 #define BASE_REGISTRAR "res_parking" 37 #define PARK_DIAL_CONTEXT "park-dial" 38 #define PARKED_CALL_APPLICATION "ParkedCall" 108 struct timeval start;
111 char *parker_dial_string;
112 unsigned int time_limit;
117 #if defined(TEST_FRAMEWORK) 305 #if defined(TEST_FRAMEWORK) 424 const char *lot_name,
const char *comeback_override,
425 int use_ringing,
int randomize,
int time_limit,
int silence_announcements);
450 char *parker_dial_string;
451 char *comeback_override;
454 int silence_announce;
parked_call_feature_options
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...
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
ast_device_state
Device States.
struct parking_lot * parking_create_dynamic_lot(const char *name, struct ast_channel *chan)
Create a dynamic parking lot.
unsigned int comebackdialtime
struct park_common_datastore * get_park_common_datastore_copy(struct ast_channel *parkee)
Get a copy of the park_common_datastore from a channel that is being parked.
void parking_set_duration(struct ast_bridge_features *features, struct parked_user *user)
Setup timeout interval feature on an ast_bridge_features for parking.
void flatten_dial_string(char *dialstring)
Flattens a dial string so that it can be written to/found from PBX extensions.
Structure that contains features information.
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 load_parking_manager(void)
Register manager actions and setup subscriptions for stasis events.
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 ast_bridge * park_common_setup(struct ast_channel *parkee, struct ast_channel *parker, const char *lot_name, const char *comeback_override, int use_ringing, int randomize, int time_limit, int silence_announcements)
Setup a parked call on a parking bridge without needing to parse appdata.
struct ast_bridge * parking_bridge
void unload_parking_bridge_features(void)
Unregister features registered by load_parking_bridge_features.
struct ao2_container * parked_users
Structure representing a snapshot of channel state.
#define AST_DECLARE_STRING_FIELDS(field_list)
Declare the fields needed in a structure.
const ast_string_field comebackcontext
void unload_parking_devstate(void)
Unregister Parking devstate handler.
void unload_parking_tests(void)
Unregister parking unit tests.
struct ao2_container * get_parking_lot_container(void)
Get a pointer to the parking lot container for purposes such as iteration.
int parking_lot_cfg_create_extensions(struct parking_lot_cfg *lot_cfg)
Add extensions for a parking lot configuration.
void parking_lot_cfg_remove_extensions(struct parking_lot_cfg *lot_cfg)
Remove extensions belonging to a parking lot configuration.
int parking_dynamic_lots_enabled(void)
Check global configuration to see if dynamic parking is enabled.
int load_parking_ui(void)
Register CLI commands.
const ast_string_field name
void publish_parked_call(struct parked_user *pu, enum ast_parked_call_event_type event_type)
Publish a stasis parked call message for a given parked user.
const ast_string_field parking_con
int load_parking_devstate(void)
Register Parking devstate handler.
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...
int load_parking_bridge_features(void)
Register bridge features for parking.
unsigned int parkaddhints
int parking_lot_get_space(struct parking_lot *lot, int target_override)
Get an available parking space within a parking lot.
void publish_parked_call_failure(struct ast_channel *parkee)
Publish a stasis parked call message for the channel indicating failure to park.
struct parking_lot_cfg * parking_lot_cfg_create(const char *cat)
Create an empty parking lot configuration structure useful for unit tests.
#define AST_STRING_FIELD(name)
Declare a string field.
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. ...
void say_parking_space(struct ast_bridge_channel *bridge_channel, const char *payload)
custom callback function for ast_bridge_channel_queue_playfile which plays a parking space and option...
Core PBX routines and definitions.
unsigned int comebacktoorigin
int unpark_parked_user(struct parked_user *user)
Pull a parked user out of its parking lot. Use this when you don't want to use the parked user afterw...
Structure that contains information about a bridge.
int load_parking_applications(void)
Register parking applications.
const ast_string_field registrar
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 parking_lot * parking_lot_build_or_update(struct parking_lot_cfg *cfg, int dynamic)
If a parking lot exists in the parking lot list already, update its status to match the provided conf...
void unload_parking_manager(void)
Unregister manager actions and remove subscriptions for stasis events.
unsigned int parkfindnext
ast_parked_call_event_type
Defines the type of parked call message being published.
const ast_string_field courtesytone
structure to hold users read from users.conf
int load_parking_tests(void)
Register parking unit tests.
void parking_notify_metermaids(int exten, const char *context, enum ast_device_state state)
Notify metermaids that we've changed an extension.
Structure that contains information regarding a channel in a bridge.
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. ...
const ast_string_field parkext
void park_common_datastore_free(struct park_common_datastore *datastore)
Free a park common datastore struct.
struct ast_bridge * park_application_setup(struct ast_channel *parkee, struct ast_channel *parker, const char *app_data, int *silence_announcements)
Function to prepare a channel for parking by determining which parking bridge should be used...
struct parking_lot * parking_lot_find_by_name(const char *lot_name)
Find a parking lot based on its name.
const char * find_channel_parking_lot_name(struct ast_channel *chan)
Find parking lot name from channel.
static char context[AST_MAX_CONTEXT]
struct ast_bridge * bridge_parking_new(struct parking_lot *bridge_lot)
Create a new parking bridge.
struct parking_lot * parking_create_dynamic_lot_forced(const char *name, struct ast_channel *chan)
Create a dynamic parking lot without respect to whether they are enabled by configuration.
int create_parked_subscription(struct ast_channel *chan, const char *parkee_uuid, int hangup_after)
Create a parking announcement subscription.
struct ast_channel * chan
unsigned int parkext_exclusive
struct parking_lot_cfg * cfg
void unload_parking_applications(void)
Unregister parking applications.
void unload_parking_ui(void)
Unregister CLI commands.