Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Parking Core. More...
#include "asterisk.h"
#include "asterisk/_private.h"
#include "asterisk/astobj2.h"
#include "asterisk/pbx.h"
#include "asterisk/bridge.h"
#include "asterisk/parking.h"
#include "asterisk/channel.h"
#include "asterisk/module.h"
Go to the source code of this file.
Functions | |
static | AO2_GLOBAL_OBJ_STATIC (parking_provider) |
The container for the parking provider. More... | |
struct ast_parked_call_payload * | ast_parked_call_payload_create (enum ast_parked_call_event_type event_type, struct ast_channel_snapshot *parkee_snapshot, const char *parker_dial_string, struct ast_channel_snapshot *retriever_snapshot, const char *parkinglot, unsigned int parkingspace, unsigned long int timeout, unsigned long int duration) |
Constructor for parked_call_payload objects. More... | |
int | ast_parking_blind_transfer_park (struct ast_bridge_channel *parker, const char *context, const char *exten, transfer_channel_cb parked_channel_cb, struct transfer_channel_data *parked_channel_data) |
Perform a blind transfer to a parking extension. More... | |
int | ast_parking_is_exten_park (const char *context, const char *exten) |
Determine if the context/exten is a "parking" extension. More... | |
int | ast_parking_park_bridge_channel (struct ast_bridge_channel *parkee, const char *parkee_uuid, const char *parker_uuid, const char *app_data) |
Perform a direct park on a channel in a bridge. More... | |
int | ast_parking_park_call (struct ast_bridge_channel *parker, char *exten, size_t length) |
Park the bridge and/or callers that this channel is in. More... | |
int | ast_parking_provider_registered (void) |
Check whether a parking provider is registered. More... | |
int | ast_parking_register_bridge_features (struct ast_parking_bridge_feature_fn_table *fn_table) |
Register a parking provider. More... | |
int | ast_parking_stasis_init (void) |
initializes the rtp engine arrays More... | |
struct stasis_topic * | ast_parking_topic (void) |
accessor for the parking stasis topic More... | |
int | ast_parking_unregister_bridge_features (const char *module_name) |
Unregister the current parking provider. More... | |
static void | parked_call_payload_destructor (void *obj) |
Destructor for parked_call_payload objects. More... | |
static void | parking_stasis_cleanup (void) |
STASIS_MESSAGE_TYPE_DEFN (ast_parked_call_type) | |
Message type for parked calls. More... | |
Variables | |
static struct stasis_topic * | parking_topic |
Topic for parking lots. More... | |
Parking Core.
Definition in file parking.c.
|
static |
The container for the parking provider.
struct ast_parked_call_payload * ast_parked_call_payload_create | ( | enum ast_parked_call_event_type | event_type, |
struct ast_channel_snapshot * | parkee_snapshot, | ||
const char * | parker_dial_string, | ||
struct ast_channel_snapshot * | retriever_snapshot, | ||
const char * | parkinglot, | ||
unsigned int | parkingspace, | ||
unsigned long int | timeout, | ||
unsigned long int | duration | ||
) |
Constructor for parked_call_payload objects.
event_type | What kind of parked call event is happening |
parkee_snapshot | channel snapshot of the parkee |
parker_dial_string | dialstring used when the call times out |
retriever_snapshot | channel snapshot of the retriever (NULL allowed) |
parkinglot | name of the parking lot where the parked call is parked |
parkingspace | what numerical parking space the parked call is parked in |
timeout | how long the parked call can remain at the point this snapshot is created before timing out |
duration | how long the parked call has currently been parked |
NULL | if the parked call payload can't be allocated |
Definition at line 82 of file parking.c.
References ao2_alloc, ao2_cleanup, ao2_ref, ast_string_field_init, ast_string_field_set, ast_parked_call_payload::duration, ast_parked_call_payload::event_type, NULL, parked_call_payload_destructor(), ast_parked_call_payload::parker_dial_string, ast_parked_call_payload::parkinglot, ast_parked_call_payload::parkingspace, RAII_VAR, and ast_parked_call_payload::timeout.
Referenced by parked_call_payload_from_failure(), and parked_call_payload_from_parked_user().
int ast_parking_blind_transfer_park | ( | struct ast_bridge_channel * | parker, |
const char * | context, | ||
const char * | exten, | ||
transfer_channel_cb | parked_channel_cb, | ||
struct transfer_channel_data * | parked_channel_data | ||
) |
Perform a blind transfer to a parking extension.
parker | The ast_bridge_channel object that is initiating the parking |
context | The context to blind transfer to |
exten | The extension to blind transfer to |
parked_channel_cb | Execute the following function on the channel that gets parked |
parked_channel_data | Data for the parked_channel_cb |
parker
is in has more than one other occupant, the entire bridge will be parked using a Local channel0 | on success |
non-zero | on error |
Definition at line 143 of file parking.c.
References ao2_cleanup, ao2_global_obj_ref, voicemailpwcheck::context, parking_provider, RAII_VAR, SCOPED_MODULE_USE, and table.
Referenced by __analog_ss_thread(), analog_ss_thread(), and try_parking().
int ast_parking_is_exten_park | ( | const char * | context, |
const char * | exten | ||
) |
Determine if the context/exten is a "parking" extension.
0 | if the extension is not a parking extension |
1 | if the extension is a parking extension |
Definition at line 179 of file parking.c.
References ao2_cleanup, ao2_global_obj_ref, voicemailpwcheck::context, parking_provider, RAII_VAR, SCOPED_MODULE_USE, and table.
Referenced by __analog_ss_thread(), and analog_ss_thread().
int ast_parking_park_bridge_channel | ( | struct ast_bridge_channel * | parkee, |
const char * | parkee_uuid, | ||
const char * | parker_uuid, | ||
const char * | app_data | ||
) |
Perform a direct park on a channel in a bridge.
parkee | The channel in the bridge to be parked. |
parkee_uuid | The UUID of the channel being packed. |
parker_uuid | The UUID of the channel performing the park. |
app_data | Data to pass to the Park application |
0 | on success |
non-zero | on error |
Definition at line 126 of file parking.c.
References ao2_cleanup, ao2_global_obj_ref, ast_parked_call_payload::parkee, parking_provider, RAII_VAR, SCOPED_MODULE_USE, and table.
Referenced by bridge_channel_park().
int ast_parking_park_call | ( | struct ast_bridge_channel * | parker, |
char * | exten, | ||
size_t | length | ||
) |
Park the bridge and/or callers that this channel is in.
parker | The bridge_channel parking the bridge | |
[out] | exten | Optional. The parking exten to access the parking lot. |
length | Optional. If exten is specified, the size of the buffer. |
0 | on success |
non-zero | on error |
Definition at line 162 of file parking.c.
References ao2_cleanup, ao2_global_obj_ref, parking_provider, RAII_VAR, SCOPED_MODULE_USE, and table.
int ast_parking_provider_registered | ( | void | ) |
Check whether a parking provider is registered.
0 | if there is no parking provider regsistered |
1 | if there is a parking provider regsistered |
Definition at line 241 of file parking.c.
References ao2_cleanup, ao2_global_obj_ref, parking_provider, RAII_VAR, and table.
Referenced by __analog_ss_thread(), analog_ss_thread(), bridge_channel_park(), and try_parking().
int ast_parking_register_bridge_features | ( | struct ast_parking_bridge_feature_fn_table * | fn_table | ) |
Register a parking provider.
fn_table | The ast_parking_bridge_feature_fn_table to register |
0 | on success |
-1 | on error |
Definition at line 196 of file parking.c.
References ao2_alloc, ao2_cleanup, ao2_global_obj_ref, ao2_global_obj_replace_unref, ast_log, AST_LOG_WARNING, ast_parking_bridge_feature_fn_table::module_version, NULL, PARKING_MODULE_VERSION, parking_provider, and RAII_VAR.
Referenced by load_parking_bridge_features().
int ast_parking_stasis_init | ( | void | ) |
initializes the rtp engine arrays
Definition at line 53 of file parking.c.
References ast_parked_call_type(), ast_register_cleanup(), parking_stasis_cleanup(), parking_topic, STASIS_MESSAGE_TYPE_INIT, and stasis_topic_create().
Referenced by asterisk_daemon().
int ast_parking_unregister_bridge_features | ( | const char * | module_name | ) |
Unregister the current parking provider.
module_name | The module name of the provider to unregister |
0 | if the parking provider module_name was unregsistered |
-1 | on error |
Definition at line 223 of file parking.c.
References ao2_cleanup, ao2_global_obj_ref, ao2_global_obj_release, ast_log, AST_LOG_WARNING, parking_provider, and RAII_VAR.
Referenced by unload_parking_bridge_features().
|
static |
Destructor for parked_call_payload objects.
Definition at line 73 of file parking.c.
References ao2_cleanup, ast_string_field_free_memory, ast_parked_call_payload::parkee, and ast_parked_call_payload::retriever.
Referenced by ast_parked_call_payload_create().
|
static |
Definition at line 46 of file parking.c.
References ao2_cleanup, ast_parked_call_type(), NULL, parking_topic, and STASIS_MESSAGE_TYPE_CLEANUP.
Referenced by ast_parking_stasis_init().
STASIS_MESSAGE_TYPE_DEFN | ( | ast_parked_call_type | ) |
Message type for parked calls.
|
static |
Topic for parking lots.
Definition at line 41 of file parking.c.
Referenced by ast_parking_stasis_init(), ast_parking_topic(), and parking_stasis_cleanup().