Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Call Parking API. More...
Go to the source code of this file.
Data Structures | |
struct | ast_parked_call_payload |
A parked call message payload. More... | |
struct | ast_parking_bridge_feature_fn_table |
A function table providing parking functionality to the Bridging API Bridging API and other consumers. More... | |
Macros | |
#define | DEFAULT_PARKINGLOT "default" |
The default parking lot. More... | |
#define | PARK_APPLICATION "Park" |
The default parking application that Asterisk expects. More... | |
#define | PARKING_MODULE_VERSION 1 |
Enumerations | |
enum | ast_parked_call_event_type { PARKED_CALL = 0 , PARKED_CALL_TIMEOUT , PARKED_CALL_GIVEUP , PARKED_CALL_UNPARKED , PARKED_CALL_FAILED , PARKED_CALL_SWAP } |
Defines the type of parked call message being published. More... | |
Functions | |
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... | |
struct stasis_message_type * | ast_parked_call_type (void) |
accessor for the parked call stasis message type 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... | |
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... | |
Call Parking API.
Definition in file parking.h.
#define DEFAULT_PARKINGLOT "default" |
#define PARK_APPLICATION "Park" |
Defines the type of parked call message being published.
Enumerator | |
---|---|
PARKED_CALL | |
PARKED_CALL_TIMEOUT | |
PARKED_CALL_GIVEUP | |
PARKED_CALL_UNPARKED | |
PARKED_CALL_FAILED | |
PARKED_CALL_SWAP |
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_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().