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"
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);
446 const char *
app_data,
int *silence_announcements);
ast_device_state
Device States.
ast_parked_call_event_type
Defines the type of parked call message being published.
Core PBX routines and definitions.
void parking_lot_cfg_remove_extensions(struct parking_lot_cfg *lot_cfg)
Remove extensions belonging to a parking lot configuration.
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.
void parking_notify_metermaids(int exten, const char *context, enum ast_device_state state)
Notify metermaids that we've changed an extension.
struct ao2_container * get_parking_lot_container(void)
Get a pointer to the parking lot container for purposes such as iteration.
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...
void unload_parking_bridge_features(void)
Unregister features registered by load_parking_bridge_features.
parked_call_feature_options
void park_common_datastore_free(struct park_common_datastore *datastore)
Free a park common datastore struct.
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.
struct ast_bridge * bridge_parking_new(struct parking_lot *bridge_lot)
Create a new parking bridge.
void flatten_dial_string(char *dialstring)
Flattens a dial string so that it can be written to/found from PBX extensions.
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.
void unload_parking_ui(void)
Unregister CLI commands.
void unload_parking_applications(void)
Unregister parking applications.
int load_parking_applications(void)
Register parking applications.
int load_parking_devstate(void)
Register Parking devstate handler.
void parking_set_duration(struct ast_bridge_features *features, struct parked_user *user)
Setup timeout interval feature on an ast_bridge_features for parking.
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...
int load_parking_manager(void)
Register manager actions and setup subscriptions for stasis events.
void unload_parking_manager(void)
Unregister manager actions and remove subscriptions for stasis events.
int create_parked_subscription(struct ast_channel *chan, const char *parkee_uuid, int hangup_after)
Create a parking announcement subscription.
void unload_parking_devstate(void)
Unregister Parking devstate handler.
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.
struct parking_lot * parking_create_dynamic_lot(const char *name, struct ast_channel *chan)
Create a dynamic parking lot.
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,...
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...
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.
void unload_parking_tests(void)
Unregister parking unit tests.
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(struct parked_user *pu, enum ast_parked_call_event_type event_type)
Publish a stasis parked call message for a given parked user.
int load_parking_ui(void)
Register CLI commands.
const char * find_channel_parking_lot_name(struct ast_channel *chan)
Find parking lot name from channel.
int load_parking_bridge_features(void)
Register bridge features for parking.
struct parking_lot * parking_lot_find_by_name(const char *lot_name)
Find a parking lot based on its name.
int parking_dynamic_lots_enabled(void)
Check global configuration to see if dynamic parking is enabled.
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 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 load_parking_tests(void)
Register parking unit tests.
void publish_parked_call_failure(struct ast_channel *parkee)
Publish a stasis parked call message for the channel indicating failure to park.
int parking_lot_cfg_create_extensions(struct parking_lot_cfg *lot_cfg)
Add extensions for a parking lot configuration.
#define AST_DECLARE_STRING_FIELDS(field_list)
Declare the fields needed in a structure.
#define AST_STRING_FIELD(name)
Declare a string field.
Structure that contains information regarding a channel in a bridge.
Structure that contains features information.
Structure that contains information about a bridge.
Structure representing a snapshot of channel state.
Main Channel structure associated with a channel.
char * parker_dial_string
char * parker_dial_string
enum park_call_resolution resolution
struct ast_channel * chan
struct ast_channel_snapshot * retriever
char comeback[AST_MAX_CONTEXT]
unsigned int comebacktoorigin
const ast_string_field comebackcontext
unsigned int parkfindnext
unsigned int parkext_exclusive
const ast_string_field registrar
const ast_string_field parkext
unsigned int parkaddhints
const ast_string_field name
const ast_string_field courtesytone
unsigned int comebackdialtime
const ast_string_field parking_con
enum parking_lot_modes mode
struct ast_bridge * parking_bridge
struct parking_lot_cfg * cfg
const ast_string_field name
struct ao2_container * parked_users
structure to hold users read from users.conf