Asterisk - The Open Source Telephony Project
21.4.1
|
Parking Bridge DTMF and Interval features. More...
#include "asterisk.h"
#include "res_parking.h"
#include "asterisk/utils.h"
#include "asterisk/astobj2.h"
#include "asterisk/logger.h"
#include "asterisk/pbx.h"
#include "asterisk/app.h"
#include "asterisk/bridge.h"
#include "asterisk/bridge_internal.h"
#include "asterisk/bridge_channel.h"
#include "asterisk/bridge_features.h"
#include "asterisk/conversions.h"
#include "asterisk/features.h"
#include "asterisk/say.h"
#include "asterisk/datastore.h"
#include "asterisk/stasis.h"
#include "asterisk/module.h"
#include "asterisk/core_local.h"
#include "asterisk/causes.h"
Go to the source code of this file.
Data Structures | |
struct | parked_subscription_data |
struct | parked_subscription_datastore |
Functions | |
int | create_parked_subscription (struct ast_channel *chan, const char *parkee_uuid, int hangup_after) |
Create a parking announcement subscription. More... | |
static int | create_parked_subscription_full (struct ast_channel *chan, const char *parkee_uuid, int hangup_after, struct transfer_channel_data *parked_channel_data) |
static int | feature_park_call (struct ast_bridge_channel *bridge_channel, void *hook_pvt) |
static int | func_get_parkingslot_channel (struct ast_channel *chan, const char *function, char *data, char *buf, size_t len) |
Dial plan function to get the parking lot channel of an occupied parking lot. | |
int | load_parking_bridge_features (void) |
Register bridge features for parking. More... | |
static struct ast_channel * | park_local_transfer (struct ast_channel *parker, const char *context, const char *exten, struct transfer_channel_data *parked_channel_data) |
static void | parked_subscription_datastore_destroy (void *data) |
static void | parker_parked_call_message_response (struct ast_parked_call_payload *message, struct parked_subscription_data *data, struct stasis_subscription *sub) |
static void | parker_update_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static int | parking_blind_transfer_park (struct ast_bridge_channel *bridge_channel, const char *context, const char *exten, transfer_channel_cb parked_channel_cb, struct transfer_channel_data *parked_channel_data) |
static int | parking_duration_callback (struct ast_bridge_channel *bridge_channel, void *hook_pvt) |
static int | parking_is_exten_park (const char *context, const char *exten) |
static int | parking_park_bridge_channel (struct ast_bridge_channel *bridge_channel, const char *uuid_parkee, const char *uuid_parker, const char *app_data) |
static int | parking_park_call (struct ast_bridge_channel *parker, char *exten, size_t length) |
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... | |
static void | parking_timeout_set_caller_features (struct ast_channel *chan, struct parking_lot_cfg *cfg) |
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_bridge_features (void) |
Unregister features registered by load_parking_bridge_features. More... | |
static void | wipe_subscription_datastore (struct ast_channel *chan) |
Variables | |
static struct ast_custom_function | getparkingslotchannel_function |
static const struct ast_datastore_info | parked_subscription_info |
struct ast_parking_bridge_feature_fn_table | parking_provider |
Parking Bridge DTMF and Interval features.
Definition in file parking_bridge_features.c.
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.
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(), and ast_parking_bridge_feature_fn_table::module.
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_remaining_ms(), parked_user::start, and parked_user::time_limit.
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_bridge_channel_leave_bridge(), ast_say_digits(), BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, and ast_bridge_channel::chan.
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(), and ast_parking_bridge_feature_fn_table::module_name.
|
static |
Definition at line 779 of file parking_bridge_features.c.
|
static |
Definition at line 86 of file parking_bridge_features.c.