Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Call Parking Resource Internal API. More...
#include "asterisk/pbx.h"
#include "asterisk/bridge.h"
#include "asterisk/parking.h"
#include "asterisk/stasis_channels.h"
Go to the source code of this file.
Data Structures | |
struct | park_common_datastore |
struct | parked_user |
struct | parking_lot |
struct | parking_lot_cfg |
Macros | |
#define | BASE_REGISTRAR "res_parking" |
#define | DEFAULT_PARKING_EXTEN "700" |
#define | DEFAULT_PARKING_LOT "default" |
#define | PARK_DIAL_CONTEXT "park-dial" |
#define | PARKED_CALL_APPLICATION "ParkedCall" |
Enumerations | |
enum | park_call_resolution { PARK_UNSET = 0 , PARK_ABANDON , PARK_TIMEOUT , PARK_FORCED , PARK_ANSWERED } |
enum | parked_call_feature_options { OPT_PARKEDPLAY = 0 , OPT_PARKEDTRANSFERS , OPT_PARKEDREPARKING , OPT_PARKEDHANGUP , OPT_PARKEDRECORDING } |
enum | parking_lot_modes { PARKINGLOT_NORMAL = 0 , PARKINGLOT_DYNAMIC , PARKINGLOT_DISABLED } |
Functions | |
struct ast_bridge * | bridge_parking_new (struct parking_lot *bridge_lot) |
Create a new parking bridge. More... | |
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. More... | |
int | create_parked_subscription (struct ast_channel *chan, const char *parkee_uuid, int hangup_after) |
Create a parking announcement subscription. More... | |
const char * | find_channel_parking_lot_name (struct ast_channel *chan) |
Find parking lot name from channel. More... | |
void | flatten_dial_string (char *dialstring) |
Flattens a dial string so that it can be written to/found from PBX extensions. More... | |
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. More... | |
struct ao2_container * | get_parking_lot_container (void) |
Get a pointer to the parking lot container for purposes such as iteration. More... | |
int | load_parking_applications (void) |
Register parking applications. More... | |
int | load_parking_bridge_features (void) |
Register bridge features for parking. More... | |
int | load_parking_devstate (void) |
Register Parking devstate handler. More... | |
int | load_parking_manager (void) |
Register manager actions and setup subscriptions for stasis events. More... | |
int | load_parking_tests (void) |
Register parking unit tests. More... | |
int | load_parking_ui (void) |
Register CLI commands. More... | |
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, setting up a park common datastore so that the parking bridge will have access to necessary parking information when joining, and applying various bridge roles to the channel. More... | |
void | park_common_datastore_free (struct park_common_datastore *datastore) |
Free a park common datastore struct. More... | |
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. More... | |
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. More... | |
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. More... | |
struct parking_lot * | parking_create_dynamic_lot (const char *name, struct ast_channel *chan) |
Create a dynamic parking lot. More... | |
int | parking_dynamic_lots_enabled (void) |
Check global configuration to see if dynamic parking is enabled. More... | |
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 configuration and return a reference return a reference to it. Otherwise, create a parking lot struct based on a parking lot configuration and return a reference to the new one. More... | |
int | parking_lot_cfg_create_extensions (struct parking_lot_cfg *lot_cfg) |
Add extensions for a parking lot configuration. More... | |
void | parking_lot_cfg_remove_extensions (struct parking_lot_cfg *lot_cfg) |
Remove extensions belonging to a parking lot configuration. More... | |
struct parking_lot * | parking_lot_find_by_name (const char *lot_name) |
Find a parking lot based on its name. More... | |
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. More... | |
int | parking_lot_get_space (struct parking_lot *lot, int target_override) |
Get an available parking space within a parking lot. More... | |
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. More... | |
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 configuration currently claims it. More... | |
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. More... | |
void | parking_notify_metermaids (int exten, const char *context, enum ast_device_state state) |
Notify metermaids that we've changed an extension. More... | |
void | parking_set_duration (struct ast_bridge_features *features, struct parked_user *user) |
Setup timeout interval feature on an ast_bridge_features for parking. More... | |
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. More... | |
void | publish_parked_call_failure (struct ast_channel *parkee) |
Publish a stasis parked call message for the channel indicating failure to park. More... | |
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 optionally hangs up the call afterwards based on the payload in playfile. More... | |
void | unload_parking_applications (void) |
Unregister parking applications. More... | |
void | unload_parking_bridge_features (void) |
Unregister features registered by load_parking_bridge_features. More... | |
void | unload_parking_devstate (void) |
Unregister Parking devstate handler. More... | |
void | unload_parking_manager (void) |
Unregister manager actions and remove subscriptions for stasis events. More... | |
void | unload_parking_tests (void) |
Unregister parking unit tests. More... | |
void | unload_parking_ui (void) |
Unregister CLI commands. More... | |
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 afterwards. More... | |
Call Parking Resource Internal API.
Definition in file res_parking.h.
#define BASE_REGISTRAR "res_parking" |
Definition at line 36 of file res_parking.h.
#define DEFAULT_PARKING_EXTEN "700" |
Definition at line 35 of file res_parking.h.
#define DEFAULT_PARKING_LOT "default" |
Definition at line 34 of file res_parking.h.
#define PARK_DIAL_CONTEXT "park-dial" |
Definition at line 37 of file res_parking.h.
#define PARKED_CALL_APPLICATION "ParkedCall" |
Definition at line 38 of file res_parking.h.
enum park_call_resolution |
Definition at line 40 of file res_parking.h.
Enumerator | |
---|---|
OPT_PARKEDPLAY | |
OPT_PARKEDTRANSFERS | |
OPT_PARKEDREPARKING | |
OPT_PARKEDHANGUP | |
OPT_PARKEDRECORDING |
Definition at line 48 of file res_parking.h.
enum parking_lot_modes |
Definition at line 56 of file res_parking.h.
struct ast_bridge * bridge_parking_new | ( | struct parking_lot * | bridge_lot | ) |
Create a new parking bridge.
bridge_lot | Parking lot which the new bridge should be based on |
NULL | if the bridge can not be created |
Definition at line 450 of file parking_bridge.c.
References AST_BRIDGE_CAPABILITY_HOLDING, AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM, AST_BRIDGE_FLAG_MERGE_INHIBIT_TO, AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM, ast_bridge_parking_init(), ast_bridge_parking_v_table, bridge_alloc(), bridge_base_init(), bridge_register(), parking_lot::name, and NULL.
Referenced by parking_lot_get_bridge().
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.
pu | Parked user who is entering/reentering the PBX |
lot | Parking lot the user was removed from. |
0 | Position set successfully |
-1 | Failed to set the position |
Definition at line 263 of file parking_controller.c.
References ast_async_goto(), ast_channel_name(), ast_exists_extension(), ast_log, ast_strdupa, ast_verb, parking_lot::cfg, parked_user::chan, parking_lot_cfg::comebackcontext, parking_lot_cfg::comebacktoorigin, flatten_dial_string(), LOG_ERROR, NULL, PARK_DIAL_CONTEXT, and parked_user::parker_dial_string.
Referenced by parking_duration_callback().
int create_parked_subscription | ( | struct ast_channel * | chan, |
const char * | parkee_uuid, | ||
int | hangup_after | ||
) |
Create a parking announcement subscription.
chan | Channel that will receive the announcement |
parkee_uuid | Unique ID of the channel being parked |
hangup_after | if non-zero, have the channel hangup after hearing the announcement |
0 | on success |
-1 | on failure |
Definition at line 233 of file parking_bridge_features.c.
References create_parked_subscription_full(), parked_subscription_data::hangup_after, NULL, and parked_subscription_data::parkee_uuid.
Referenced by manager_park(), and manager_park_bridged().
const char * find_channel_parking_lot_name | ( | struct ast_channel * | chan | ) |
Find parking lot name from channel.
chan | The channel we want the parking lot name for |
Definition at line 608 of file res_parking.c.
References ast_channel_parkinglot(), ast_strlen_zero(), DEFAULT_PARKING_LOT, name, and pbx_builtin_getvar_helper().
Referenced by park_common_setup2(), parked_call_app_exec(), and parking_park_call().
void flatten_dial_string | ( | char * | dialstring | ) |
Flattens a dial string so that it can be written to/found from PBX extensions.
dialstring | unflattened dial string. This will be flattened in place. |
Definition at line 251 of file parking_controller.c.
Referenced by comeback_goto(), and parking_duration_callback().
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.
parkee | The channel entering parking with the datastore we are checking |
NULL | if the park_common_datastore could not be copied off of the channel. |
Definition at line 441 of file parking_applications.c.
References ast_assert, ast_calloc, ast_channel_datastore_find(), ast_strdup, park_common_datastore::comeback_override, ast_datastore::data, lock, NULL, park_common_datastore_free(), park_common_info, park_common_datastore::parker_dial_string, park_common_datastore::parker_uuid, park_common_datastore::randomize, SCOPED_CHANNELLOCK, park_common_datastore::silence_announce, and park_common_datastore::time_limit.
Referenced by bridge_parking_push().
struct ao2_container * get_parking_lot_container | ( | void | ) |
Get a pointer to the parking lot container for purposes such as iteration.
Definition at line 597 of file res_parking.c.
References parking_lot_container.
Referenced by cli_display_parking_lot_list(), complete_parking_lot(), manager_parking_lot_list(), manager_parking_status_all_lots(), and metermaidstate().
int load_parking_applications | ( | void | ) |
Register parking applications.
0 | if successful |
-1 | on failure |
Definition at line 1008 of file parking_applications.c.
References ast_register_application_xml, park_and_announce_app_exec(), PARK_AND_ANNOUNCE_APPLICATION, park_app_exec(), PARK_APPLICATION, parked_call_app_exec(), and PARKED_CALL_APPLICATION.
Referenced by load_module().
int load_parking_bridge_features | ( | void | ) |
Register bridge features for parking.
0 | on success |
-1 | on failure |
Definition at line 800 of file parking_bridge_features.c.
References AST_BRIDGE_BUILTIN_PARKCALL, ast_bridge_features_register(), ast_custom_function_register, ast_parking_register_bridge_features(), feature_park_call(), getparkingslotchannel_function, ast_parking_bridge_feature_fn_table::module, NULL, and parking_provider.
Referenced by load_module().
int load_parking_devstate | ( | void | ) |
Register Parking devstate handler.
Definition at line 121 of file parking_devicestate.c.
References ast_devstate_prov_add(), and metermaidstate().
Referenced by load_module().
int load_parking_manager | ( | void | ) |
Register manager actions and setup subscriptions for stasis events.
Definition at line 704 of file parking_manager.c.
References ast_manager_register_xml, EVENT_FLAG_CALL, manager_park(), manager_parking_lot_list(), manager_parking_status(), and parking_manager_enable_stasis().
Referenced by load_module().
int load_parking_tests | ( | void | ) |
Register parking unit tests.
0 | on success |
nonzero | on failure |
Definition at line 851 of file parking_tests.c.
References AST_TEST_REGISTER.
Referenced by load_module().
int load_parking_ui | ( | void | ) |
Register CLI commands.
0 | if successful |
-1 | on failure |
Definition at line 198 of file parking_ui.c.
References ARRAY_LEN, ast_cli_register_multiple, and cli_parking_lot.
Referenced by load_module().
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, setting up a park common datastore so that the parking bridge will have access to necessary parking information when joining, and applying various bridge roles to the channel.
parkee | The channel being prepared for parking |
parker | The channel initiating the park; may be the parkee as well. May be NULL. |
app_data | arguments supplied to the Park application. May be NULL. |
silence_announcements | optional pointer to an integer where we want to store the silence option flag this value should be initialized to 0 prior to calling park_common_setup. |
NULL | on failure |
Definition at line 545 of file parking_applications.c.
References ast_free, NULL, park_app_parse_data(), park_common_setup2(), and RAII_VAR.
Referenced by park_and_announce_app_exec(), park_app_exec(), and parking_park_bridge_channel().
void park_common_datastore_free | ( | struct park_common_datastore * | datastore | ) |
Free a park common datastore struct.
datastore | The park_common_datastore being free'd. (NULL tolerant) |
Definition at line 335 of file parking_applications.c.
References ast_free, park_common_datastore::comeback_override, park_common_datastore::parker_dial_string, and park_common_datastore::parker_uuid.
Referenced by bridge_parking_push(), get_park_common_datastore_copy(), and park_common_datastore_destroy().
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.
Definition at line 538 of file parking_applications.c.
References NULL, and park_common_setup2().
Referenced by manager_park_unbridged().
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.
chan | Which channel's feature set is being modified |
lot | parking lot which establishes the features used |
recipient_mode | AST_FEATURE_FLAG_BYCALLER if the user is the retriever AST_FEATURE_FLAG_BYCALLEE if the user is the parkee |
Definition at line 217 of file parking_controller.c.
References ast_bridge_features_ds_get(), ast_bridge_features_ds_set(), ast_channel_lock, ast_channel_unlock, AST_FEATURE_AUTOMIXMON, AST_FEATURE_DISCONNECT, AST_FEATURE_PARKCALL, AST_FEATURE_REDIRECT, ast_set_flag, parking_lot::cfg, parking_lot_cfg::parkedcallhangup, parking_lot_cfg::parkedcallrecording, parking_lot_cfg::parkedcallreparking, and parking_lot_cfg::parkedcalltransfers.
Referenced by bridge_parking_pull(), and parked_call_app_exec().
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.
chan | Entering channel |
lot | The parking lot the channel will be entering |
force_ringing | Use ringing instead of music on hold |
0 | on success |
non-zero | on failure |
Definition at line 57 of file parking_controller.c.
References ast_channel_add_bridge_role(), ast_channel_set_bridge_role_option(), ast_strlen_zero(), parking_lot::cfg, and parking_lot_cfg::mohclass.
Referenced by bridge_parking_push(), and park_common_setup2().
struct parking_lot * parking_create_dynamic_lot | ( | const char * | name, |
struct ast_channel * | chan | ||
) |
Create a dynamic parking lot.
name | Dynamic parking lot name to create |
chan | Channel parkee to get dynamic parking lot parameters from |
NULL | on error |
Definition at line 1060 of file res_parking.c.
References create_dynamic_lot_full(), and name.
Referenced by park_common_setup2(), and parking_park_call().
int parking_dynamic_lots_enabled | ( | void | ) |
Check global configuration to see if dynamic parking is enabled.
1 | if dynamic parking is enabled |
0 | if dynamic parking is disabled |
Definition at line 929 of file res_parking.c.
References ao2_cleanup, ao2_global_obj_ref, globals, and RAII_VAR.
Referenced by cli_display_parking_global(), and create_dynamic_lot_full().
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 configuration and return a reference return a reference to it. Otherwise, create a parking lot struct based on a parking lot configuration and return a reference to the new one.
cfg | The configuration being used as a reference to build the parking lot from. |
dynamic | non-zero if creating a dynamic parking lot with this. Don't replace existing parking lots. Ever. |
NULL | if it was not found and could not be allocated |
Definition at line 869 of file res_parking.c.
References alloc_new_parking_lot(), ao2_cleanup, ao2_link, ao2_ref, ast_log, parking_lot::cfg, parking_lot::disable_mark, LOG_ERROR, parking_lot::mode, parking_lot_cfg::name, named_item_find(), NULL, parking_lot_container, PARKINGLOT_DYNAMIC, and PARKINGLOT_NORMAL.
Referenced by create_dynamic_lot_full(), and generate_or_link_lots_to_configs().
int parking_lot_cfg_create_extensions | ( | struct parking_lot_cfg * | lot_cfg | ) |
Add extensions for a parking lot configuration.
lot_cfg | parking lot configuration to generate extensions for |
0 | on success |
non-zero | on failure |
Definition at line 759 of file res_parking.c.
References ast_context_find_or_create(), ast_free, ast_get_extension_registrar(), ast_log, AST_MAX_EXTENSION, ast_str_buffer(), ast_str_create, ast_str_set(), ast_string_field_build, ast_strlen_zero(), ast_unlock_context(), ast_unlock_contexts(), ast_wrlock_context(), ast_wrlock_contexts(), BASE_REGISTRAR, E_MATCH, extension_is_compatible(), LOG_ERROR, parking_lot_cfg::name, NULL, PARK_APPLICATION, parking_lot_cfg::parkaddhints, PARKED_CALL_APPLICATION, parking_lot_cfg::parkext, parking_lot_cfg::parkext_exclusive, parking_add_extension(), parking_lot_cfg::parking_con, parking_lot_cfg::parking_start, pbx_find_extension(), PRIORITY_HINT, RAII_VAR, registrar, parking_lot_cfg::registrar, and pbx_find_info::stacklen.
Referenced by configure_parking_extensions(), and create_dynamic_lot_full().
void parking_lot_cfg_remove_extensions | ( | struct parking_lot_cfg * | lot_cfg | ) |
Remove extensions belonging to a parking lot configuration.
lot_cfg | parking lot configuratin to remove extensions from |
Definition at line 664 of file res_parking.c.
References ast_context_destroy(), ast_string_field_set, ast_strlen_zero(), NULL, registrar, and parking_lot_cfg::registrar.
Referenced by parking_lot_cfg_destructor(), remove_all_configured_parking_lot_extensions(), and remove_pending_parking_lot_extensions().
struct parking_lot * parking_lot_find_by_name | ( | const char * | lot_name | ) |
Find a parking lot based on its name.
lot_name | Name of the parking lot sought |
NULL | if no parking lot with the name specified exists |
Definition at line 602 of file res_parking.c.
References named_item_find(), and parking_lot_container.
Referenced by cli_display_parking_lot(), create_dynamic_lot_full(), func_get_parkingslot_channel(), manager_parking_status_single_lot(), park_common_setup2(), parked_call_app_exec(), and parking_park_call().
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.
lot | Which parking lot we need the bridge from. This parking lot must be locked before calling this function. |
NULL | if it didn't already have a bridge and one couldn't be created |
Definition at line 36 of file parking_controller.c.
References ao2_ref, bridge_parking_new(), NULL, and parking_lot::parking_bridge.
Referenced by park_common_setup2().
int parking_lot_get_space | ( | struct parking_lot * | lot, |
int | target_override | ||
) |
Get an available parking space within a parking lot.
lot | Which parking lot we are getting a space from |
target_override | If there is a specific slot we want, provide it here and we'll start from that position |
-1 | if No slot can be found |
Definition at line 96 of file parking_controller.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_log, parking_lot::cfg, LOG_WARNING, parked_user::lot, parking_lot::next_space, parking_lot::parked_users, parking_lot_cfg::parkfindnext, parking_lot_cfg::parking_start, parking_lot_cfg::parking_stop, and user.
Referenced by generate_parked_user().
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.
lot | Parking lot being pulled from |
target | If < 0 search for the first occupied space in the parking lot If >= 0 Only pull from the indicated target |
NULL | if no parked user could be pulled from the requested parking lot at the requested parking space |
Definition at line 168 of file parking_controller.c.
References ao2_callback, parked_user::lot, NULL, parking_lot::parked_users, retrieve_parked_user_targeted(), and user.
Referenced by func_get_parkingslot_channel().
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 configuration currently claims it.
lot | Which parking lot is being checked for elimination |
0 | if the parking lot was removed |
-1 | if the parking lot wasn't removed. |
Definition at line 400 of file res_parking.c.
References ao2_container_count(), ao2_unlink, parking_lot::mode, parking_lot::parked_users, parking_lot_container, and PARKINGLOT_DISABLED.
Referenced by parking_lot_disable(), parking_lot_retrieve_parked_user(), and unpark_parked_user().
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.
lot | Parking lot being pulled from |
target | If < 0 search for the first occupied space in the parking lot If >= 0 Only pull from the indicated target |
NULL | if no parked user could be pulled from the requested parking lot at the requested parking space |
Definition at line 185 of file parking_controller.c.
References ao2_callback, ao2_cleanup, ao2_lock, ao2_ref, ao2_unlink, ao2_unlock, parked_user::lot, NULL, PARK_ANSWERED, PARK_UNSET, parking_lot::parked_users, parking_lot_remove_if_unused(), RAII_VAR, retrieve_parked_user_targeted(), and user.
Referenced by parked_call_app_exec().
void parking_notify_metermaids | ( | int | exten, |
const char * | context, | ||
enum ast_device_state | state | ||
) |
Notify metermaids that we've changed an extension.
exten | Extension of the call parked/unparked |
context | Context of the call parked/unparked |
state | new device state |
Definition at line 108 of file parking_devicestate.c.
References ast_debug, ast_devstate2str(), AST_DEVSTATE_CACHABLE, ast_devstate_changed(), voicemailpwcheck::context, and parking_lot_extension_inuse_search::exten.
Referenced by bridge_parking_pull(), and bridge_parking_push().
void parking_set_duration | ( | struct ast_bridge_features * | features, |
struct parked_user * | user | ||
) |
Setup timeout interval feature on an ast_bridge_features for parking.
features | The ast_bridge_features we are establishing the interval hook on |
user | The parked_user receiving the timeout duration limits |
Definition at line 703 of file parking_bridge_features.c.
References __ao2_cleanup(), ao2_ref, AST_BRIDGE_HOOK_REMOVE_ON_PULL, ast_bridge_interval_hook(), ast_log, ast_remaining_ms(), LOG_ERROR, and parking_duration_callback().
Referenced by bridge_parking_push().
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.
pu | pointer to a parked_user that we are generating the message for |
event_type | What parked call event type is provoking this message |
Definition at line 627 of file parking_manager.c.
References ao2_cleanup, ast_parked_call_type(), ast_parking_topic(), NULL, parked_call_payload_from_parked_user(), RAII_VAR, stasis_message_create(), and stasis_publish().
Referenced by bridge_parking_pull(), and bridge_parking_push().
void publish_parked_call_failure | ( | struct ast_channel * | parkee | ) |
Publish a stasis parked call message for the channel indicating failure to park.
parkee | channel belonging to the failed parkee |
Definition at line 605 of file parking_manager.c.
References ao2_cleanup, ast_parked_call_type(), ast_parking_topic(), NULL, parked_call_payload_from_failure(), RAII_VAR, stasis_message_create(), and stasis_publish().
Referenced by bridge_parking_push(), park_app_exec(), and parking_park_bridge_channel().
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 optionally hangs up the call afterwards based on the payload in playfile.
Definition at line 681 of file parking_bridge_features.c.
References ast_assert, ast_bridge_channel_leave_bridge(), AST_CAUSE_NORMAL_CLEARING, ast_channel_language(), ast_say_digits(), BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, and ast_bridge_channel::chan.
Referenced by bridge_parking_push(), and parker_parked_call_message_response().
void unload_parking_applications | ( | void | ) |
Unregister parking applications.
Definition at line 1025 of file parking_applications.c.
References ast_unregister_application(), PARK_AND_ANNOUNCE_APPLICATION, PARK_APPLICATION, and PARKED_CALL_APPLICATION.
Referenced by unload_module().
void unload_parking_bridge_features | ( | void | ) |
Unregister features registered by load_parking_bridge_features.
Definition at line 793 of file parking_bridge_features.c.
References AST_BRIDGE_BUILTIN_PARKCALL, ast_bridge_features_unregister(), ast_custom_function_unregister(), ast_parking_unregister_bridge_features(), getparkingslotchannel_function, ast_parking_bridge_feature_fn_table::module_name, and parking_provider.
Referenced by unload_module().
void unload_parking_devstate | ( | void | ) |
Unregister Parking devstate handler.
Definition at line 116 of file parking_devicestate.c.
References ast_devstate_prov_del().
Referenced by unload_module().
void unload_parking_manager | ( | void | ) |
Unregister manager actions and remove subscriptions for stasis events.
Definition at line 720 of file parking_manager.c.
References ast_manager_unregister(), and parking_manager_disable_stasis().
Referenced by unload_module().
void unload_parking_tests | ( | void | ) |
Unregister parking unit tests.
Definition at line 838 of file parking_tests.c.
References AST_TEST_UNREGISTER.
Referenced by unload_module().
void unload_parking_ui | ( | void | ) |
Unregister CLI commands.
Definition at line 203 of file parking_ui.c.
References ARRAY_LEN, ast_cli_unregister_multiple(), and cli_parking_lot.
Referenced by unload_module().
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 afterwards.
user | The parked user being pulled. |
0 | on success |
-1 | if the user didn't have its parking lot set |
Definition at line 85 of file parking_controller.c.
References ao2_unlink, parked_user::lot, parking_lot::parked_users, and parking_lot_remove_if_unused().
Referenced by bridge_parking_pull().