Asterisk - The Open Source Telephony Project
18.5.0
|
Call Completion Supplementary Services implementation. More...
#include "asterisk.h"
#include "asterisk/astobj2.h"
#include "asterisk/strings.h"
#include "asterisk/ccss.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/utils.h"
#include "asterisk/taskprocessor.h"
#include "asterisk/devicestate.h"
#include "asterisk/module.h"
#include "asterisk/app.h"
#include "asterisk/cli.h"
#include "asterisk/manager.h"
#include "asterisk/causes.h"
#include "asterisk/stasis_system.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Data Structures | |
struct | ast_cc_config_params |
struct | ast_cc_monitor_failure_data |
struct | cc_agent_backend |
struct | cc_agent_backends |
struct | cc_callback_helper |
struct | cc_control_payload |
The payload for an AST_CONTROL_CC frame. More... | |
struct | cc_core_instance |
struct | cc_generic_agent_pvt |
struct | cc_monitor_backend |
struct | cc_monitor_backends |
struct | cc_monitor_tree |
The "tree" of interfaces that is dialed. More... | |
struct | cc_recall_ds_data |
struct | cc_state_change_args |
struct | cc_status_response_args |
struct | count_agents_cb_data |
struct | count_monitors_cb_data |
struct | dialed_cc_interfaces |
struct | extension_child_dialstring |
Data regarding an extension monitor's child's dialstrings. More... | |
struct | extension_monitor_pvt |
Private data for an extension monitor. More... | |
struct | generic_monitor_instance |
struct | generic_monitor_instance_list |
struct | generic_monitor_pvt |
private data for generic device monitor More... | |
Macros | |
#define | CC_ACTIVE_DEVSTATE_DEFAULT AST_DEVICE_INUSE |
#define | CC_AVAILABLE_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define | CC_CALLEE_READY_DEVSTATE_DEFAULT AST_DEVICE_RINGING |
#define | CC_CALLER_BUSY_DEVSTATE_DEFAULT AST_DEVICE_ONHOLD |
#define | CC_CALLER_OFFERED_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define | CC_CALLER_REQUESTED_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define | CC_COMPLETE_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define | CC_FAILED_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define | CC_MAX_AGENTS_DEFAULT 5 |
#define | CC_MAX_MONITORS_DEFAULT 5 |
#define | CC_OFFER_TIMER_DEFAULT 20 /* Seconds */ |
#define | CC_RECALL_TIMER_DEFAULT 20 /* Seconds */ |
#define | CC_RECALLING_DEVSTATE_DEFAULT AST_DEVICE_RINGING |
#define | CCBS_AVAILABLE_TIMER_DEFAULT 4800 /* Seconds */ |
#define | CCNR_AVAILABLE_TIMER_DEFAULT 7200 /* Seconds */ |
#define | GLOBAL_CC_MAX_REQUESTS_DEFAULT 20 |
Enumerations | |
enum | cc_state { CC_AVAILABLE, CC_CALLER_OFFERED, CC_CALLER_REQUESTED, CC_ACTIVE, CC_CALLEE_READY, CC_CALLER_BUSY, CC_RECALLING, CC_COMPLETE, CC_FAILED } |
The states used in the CCSS core state machine. More... | |
enum | match_flags { MATCH_NO_REQUEST = (1 << 0), MATCH_REQUEST = (1 << 1) } |
Functions | |
struct ast_cc_config_params * | __ast_cc_config_params_init (const char *file, int line, const char *function) |
Allocate and initialize an ast_cc_config_params structure. More... | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static void | agent_destroy (void *data) |
static const char * | agent_policy_to_str (enum ast_cc_agent_policies policy) |
int | ast_cc_agent_accept_request (int core_id, const char *const debug,...) |
Accept inbound CC request. More... | |
struct ast_cc_agent * | ast_cc_agent_callback (int flags, ao2_callback_fn *function, void *args, const char *const type) |
Call a callback on all agents of a specific type. More... | |
int | ast_cc_agent_caller_available (int core_id, const char *const debug,...) |
Indicate that a previously unavailable caller has become available. More... | |
int | ast_cc_agent_caller_busy (int core_id, const char *debug,...) |
Indicate that the caller is busy. More... | |
int | ast_cc_agent_recalling (int core_id, const char *const debug,...) |
Tell the CC core that a caller is currently recalling. More... | |
int | ast_cc_agent_register (const struct ast_cc_agent_callbacks *callbacks) |
Register a set of agent callbacks with the core. More... | |
int | ast_cc_agent_set_interfaces_chanvar (struct ast_channel *chan) |
Set the first level CC_INTERFACES channel variable for a channel. More... | |
int | ast_cc_agent_status_response (int core_id, enum ast_device_state devstate) |
Response with a caller's current status. More... | |
void | ast_cc_agent_unregister (const struct ast_cc_agent_callbacks *callbacks) |
Unregister a set of agent callbacks with the core. More... | |
int | ast_cc_available_timer_expire (const void *data) |
Scheduler callback for available timer expiration. More... | |
int | ast_cc_build_frame (struct ast_channel *chan, struct ast_cc_config_params *cc_params, const char *monitor_type, const char *const device_name, const char *const dialstring, enum ast_cc_service_type service, void *private_data, struct ast_frame *frame) |
Create a CC Control frame. More... | |
void | ast_cc_busy_interface (struct ast_channel *inbound, struct ast_cc_config_params *cc_params, const char *monitor_type, const char *const device_name, const char *const dialstring, void *private_data) |
Callback made from ast_cc_callback for certain channel types. More... | |
void | ast_cc_call_failed (struct ast_channel *incoming, struct ast_channel *outgoing, const char *const dialstring) |
Make CCBS available in the case that ast_call fails. More... | |
int | ast_cc_call_init (struct ast_channel *chan, int *ignore_cc) |
Start the CC process on a call. More... | |
int | ast_cc_callback (struct ast_channel *inbound, const char *const tech, const char *const dest, ast_cc_callback_fn callback) |
Run a callback for potential matching destinations. More... | |
int | ast_cc_completed (struct ast_channel *chan, const char *const debug,...) |
Indicate recall has been acknowledged. More... | |
void | ast_cc_config_params_destroy (struct ast_cc_config_params *params) |
Free memory from CCSS configuration params. More... | |
void | ast_cc_copy_config_params (struct ast_cc_config_params *dest, const struct ast_cc_config_params *src) |
copy CCSS configuration parameters from one structure to another More... | |
void | ast_cc_default_config_params (struct ast_cc_config_params *params) |
Set the specified CC config params to default values. More... | |
void | ast_cc_extension_monitor_add_dialstring (struct ast_channel *incoming, const char *const dialstring, const char *const device_name) |
Add a child dialstring to an extension monitor. More... | |
int | ast_cc_failed (int core_id, const char *const debug,...) |
Indicate failure has occurred. More... | |
int | ast_cc_get_current_core_id (struct ast_channel *chan) |
Get the core id for the current call. More... | |
struct ast_cc_monitor * | ast_cc_get_monitor_by_recall_core_id (const int core_id, const char *const device_name) |
Get the associated monitor given the device name and core_id. More... | |
int | ast_cc_get_param (struct ast_cc_config_params *params, const char *const name, char *buf, size_t buf_len) |
get a CCSS configuration parameter, given its name More... | |
int | ast_cc_is_config_param (const char *const name) |
Is this a CCSS configuration parameter? More... | |
int | ast_cc_is_recall (struct ast_channel *chan, int *core_id, const char *const monitor_type) |
Decide if a call to a particular channel is a CC recall. More... | |
int | ast_cc_monitor_callee_available (const int core_id, const char *const debug,...) |
Alert the core that a device being monitored has become available. More... | |
int | ast_cc_monitor_count (const char *const name, const char *const type) |
Return the number of outstanding CC requests to a specific device. More... | |
int | ast_cc_monitor_failed (int core_id, const char *const monitor_name, const char *const debug,...) |
Indicate that a failure has occurred on a specific monitor. More... | |
int | ast_cc_monitor_party_b_free (int core_id) |
Alert a caller that though the callee has become free, the caller himself is not and may not call back. More... | |
int | ast_cc_monitor_register (const struct ast_cc_monitor_callbacks *callbacks) |
Register a set of monitor callbacks with the core. More... | |
int | ast_cc_monitor_request_acked (int core_id, const char *const debug,...) |
Indicate that an outbound entity has accepted our CC request. More... | |
int | ast_cc_monitor_status_request (int core_id) |
Request the status of a caller or callers. More... | |
int | ast_cc_monitor_stop_ringing (int core_id) |
Alert a caller to stop ringing. More... | |
void | ast_cc_monitor_unregister (const struct ast_cc_monitor_callbacks *callbacks) |
Unregister a set of monitor callbacks with the core. More... | |
int | ast_cc_offer (struct ast_channel *caller_chan) |
Offer CC to a caller. More... | |
int | ast_cc_request_is_within_limits (void) |
Check if the incoming CC request is within the bounds set by the cc_max_requests configuration option. More... | |
int | ast_cc_set_param (struct ast_cc_config_params *params, const char *const name, const char *const value) |
set a CCSS configuration parameter, given its name More... | |
const char * | ast_get_cc_agent_dialstring (struct ast_cc_config_params *config) |
Get the cc_agent_dialstring. More... | |
enum ast_cc_agent_policies | ast_get_cc_agent_policy (struct ast_cc_config_params *config) |
Get the cc_agent_policy. More... | |
const char * | ast_get_cc_callback_macro (struct ast_cc_config_params *config) |
Get the name of the callback_macro. More... | |
const char * | ast_get_cc_callback_sub (struct ast_cc_config_params *config) |
Get the name of the callback subroutine. More... | |
unsigned int | ast_get_cc_max_agents (struct ast_cc_config_params *config) |
Get the cc_max_agents. More... | |
unsigned int | ast_get_cc_max_monitors (struct ast_cc_config_params *config) |
Get the cc_max_monitors. More... | |
enum ast_cc_monitor_policies | ast_get_cc_monitor_policy (struct ast_cc_config_params *config) |
Get the cc_monitor_policy. More... | |
unsigned int | ast_get_cc_offer_timer (struct ast_cc_config_params *config) |
Get the cc_offer_timer. More... | |
unsigned int | ast_get_cc_recall_timer (struct ast_cc_config_params *config) |
Get the cc_recall_timer. More... | |
unsigned int | ast_get_ccbs_available_timer (struct ast_cc_config_params *config) |
Get the ccbs_available_timer. More... | |
unsigned int | ast_get_ccnr_available_timer (struct ast_cc_config_params *config) |
Get the ccnr_available_timer. More... | |
void | ast_handle_cc_control_frame (struct ast_channel *inbound, struct ast_channel *outbound, void *frame_data) |
Properly react to a CC control frame. More... | |
void | ast_ignore_cc (struct ast_channel *chan) |
Mark the channel to ignore further CC activity. More... | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
int | ast_queue_cc_frame (struct ast_channel *chan, const char *monitor_type, const char *const dialstring, enum ast_cc_service_type service, void *private_data) |
Queue an AST_CONTROL_CC frame. More... | |
void | ast_set_cc_agent_dialstring (struct ast_cc_config_params *config, const char *const value) |
Set the cc_agent_dialstring. More... | |
int | ast_set_cc_agent_policy (struct ast_cc_config_params *config, enum ast_cc_agent_policies value) |
Set the cc_agent_policy. More... | |
void | ast_set_cc_callback_macro (struct ast_cc_config_params *config, const char *const value) |
Set the callback_macro name. More... | |
void | ast_set_cc_callback_sub (struct ast_cc_config_params *config, const char *const value) |
Set the callback subroutine name. More... | |
int | ast_set_cc_interfaces_chanvar (struct ast_channel *chan, const char *const extension) |
Set the CC_INTERFACES channel variable for a channel using an. More... | |
void | ast_set_cc_max_agents (struct ast_cc_config_params *config, unsigned int value) |
Set the cc_max_agents. More... | |
void | ast_set_cc_max_monitors (struct ast_cc_config_params *config, unsigned int value) |
Set the cc_max_monitors. More... | |
int | ast_set_cc_monitor_policy (struct ast_cc_config_params *config, enum ast_cc_monitor_policies value) |
Set the cc_monitor_policy. More... | |
void | ast_set_cc_offer_timer (struct ast_cc_config_params *config, unsigned int value) |
Set the cc_offer_timer. More... | |
void | ast_set_cc_recall_timer (struct ast_cc_config_params *config, unsigned int value) |
Set the cc_recall_timer. More... | |
void | ast_set_ccbs_available_timer (struct ast_cc_config_params *config, unsigned int value) |
Set the ccbs_available_timer. More... | |
void | ast_set_ccnr_available_timer (struct ast_cc_config_params *config, unsigned int value) |
Set the ccnr_available_timer. More... | |
int | ast_setup_cc_recall_datastore (struct ast_channel *chan, const int core_id) |
Set up a CC recall datastore on a channel. More... | |
static void | build_cc_interfaces_chanvar (struct ast_cc_monitor *starting_point, struct ast_str **str) |
static void | call_destructor_with_no_monitor (const char *const monitor_type, void *private_data) |
static void | cancel_available_timer (struct cc_core_instance *core_instance) |
static int | cc_active (struct cc_core_instance *core_instance, struct cc_state_change_args *args, enum cc_state previous_state) |
static int | cc_agent_callback_helper (void *obj, void *args, int flags) |
static struct ast_cc_agent * | cc_agent_init (struct ast_channel *caller_chan, const char *const caller_name, const int core_id, struct cc_monitor_tree *interface_tree) |
static int | cc_available (struct cc_core_instance *core_instance, struct cc_state_change_args *args, enum cc_state previous_state) |
static int | cc_build_payload (struct ast_channel *chan, struct ast_cc_config_params *cc_params, const char *monitor_type, const char *const device_name, const char *dialstring, enum ast_cc_service_type service, void *private_data, struct cc_control_payload *payload) |
static int | cc_callee_ready (struct cc_core_instance *core_instance, struct cc_state_change_args *args, enum cc_state previous_state) |
static int | cc_caller_busy (struct cc_core_instance *core_instance, struct cc_state_change_args *args, enum cc_state previous_state) |
static int | cc_caller_offered (struct cc_core_instance *core_instance, struct cc_state_change_args *args, enum cc_state previous_state) |
static int | cc_caller_requested (struct cc_core_instance *core_instance, struct cc_state_change_args *args, enum cc_state previous_state) |
static int | cc_cli_output_status (void *data) |
static void | cc_cli_print_monitor_stats (struct ast_cc_monitor *monitor, int fd, int parent_id) |
static int | cc_complete (struct cc_core_instance *core_instance, struct cc_state_change_args *args, enum cc_state previous_state) |
static struct cc_core_instance * | cc_core_init_instance (struct ast_channel *caller_chan, struct cc_monitor_tree *called_tree, const int core_id, struct cc_control_payload *cc_data) |
static int | cc_core_instance_cmp_fn (void *obj, void *arg, int flags) |
static void | cc_core_instance_destructor (void *data) |
static int | cc_core_instance_hash_fn (const void *obj, const int flags) |
static struct ast_cc_monitor * | cc_device_monitor_init (const char *const device_name, const char *const dialstring, const struct cc_control_payload *cc_data, int core_id) |
static int | cc_do_state_change (void *datap) |
static void | cc_extension_monitor_change_is_valid (struct cc_core_instance *core_instance, unsigned int parent_id, const char *const device_name, int is_valid) |
static void | cc_extension_monitor_destructor (void *private_data) |
static struct ast_cc_monitor * | cc_extension_monitor_init (const char *const exten, const char *const context, const unsigned int parent_id) |
static int | cc_failed (struct cc_core_instance *core_instance, struct cc_state_change_args *args, enum cc_state previous_state) |
static void | cc_generic_agent_destructor (struct ast_cc_agent *agent) |
static int | cc_generic_agent_init (struct ast_cc_agent *agent, struct ast_channel *chan) |
static int | cc_generic_agent_recall (struct ast_cc_agent *agent) |
static void | cc_generic_agent_respond (struct ast_cc_agent *agent, enum ast_cc_agent_response_reason reason) |
static int | cc_generic_agent_start_monitoring (struct ast_cc_agent *agent) |
static int | cc_generic_agent_start_offer_timer (struct ast_cc_agent *agent) |
static int | cc_generic_agent_status_request (struct ast_cc_agent *agent) |
static int | cc_generic_agent_stop_offer_timer (struct ast_cc_agent *agent) |
static int | cc_generic_agent_stop_ringing (struct ast_cc_agent *agent) |
static int | cc_generic_is_device_available (enum ast_device_state state) |
static int | cc_generic_monitor_cancel_available_timer (struct ast_cc_monitor *monitor, int *sched_id) |
static void | cc_generic_monitor_destructor (void *private_data) |
static int | cc_generic_monitor_request_cc (struct ast_cc_monitor *monitor, int *available_timer_id) |
static int | cc_generic_monitor_suspend (struct ast_cc_monitor *monitor) |
static int | cc_generic_monitor_unsuspend (struct ast_cc_monitor *monitor) |
static void | cc_interface_destroy (void *data) |
static void | cc_interface_tree_destroy (void *data) |
static int | cc_interfaces_datastore_init (struct ast_channel *chan) |
static void | cc_monitor_destroy (void *data) |
static int | cc_monitor_failed (void *data) |
static int | cc_offer (const int core_id, const char *const debug,...) |
static int | cc_party_b_free (void *data) |
static int | cc_publish (struct stasis_message_type *message_type, int core_id, struct ast_json *extras) |
static void | cc_publish_available (int core_id, const char *callee, const char *service) |
static void | cc_publish_callerrecalling (int core_id, const char *caller) |
static void | cc_publish_callerstartmonitoring (int core_id, const char *caller) |
static void | cc_publish_callerstopmonitoring (int core_id, const char *caller) |
static void | cc_publish_failure (int core_id, const char *caller, const char *reason) |
static void | cc_publish_monitorfailed (int core_id, const char *callee) |
static void | cc_publish_offertimerstart (int core_id, const char *caller, unsigned int expires) |
static void | cc_publish_recallcomplete (int core_id, const char *caller) |
static void | cc_publish_requestacknowledged (int core_id, const char *caller) |
static void | cc_publish_requested (int core_id, const char *caller, const char *callee) |
static void | cc_recall_ds_destroy (void *data) |
static void * | cc_recall_ds_duplicate (void *data) |
static int | cc_recalling (struct cc_core_instance *core_instance, struct cc_state_change_args *args, enum cc_state previous_state) |
static void * | cc_ref (void *obj, const char *debug) |
static int | cc_request_state_change (enum cc_state state, const int core_id, const char *debug, va_list ap) |
static const char * | cc_service_to_string (enum ast_cc_service_type service) |
static enum ast_device_state | cc_state_to_devstate (enum cc_state state) |
static const char * | cc_state_to_string (enum cc_state state) |
static int | cc_status_request (void *data) |
static int | cc_status_response (void *data) |
static int | cc_stop_ringing (void *data) |
static void | cc_unique_append (struct ast_str **str, const char *dialstring) |
static void * | cc_unref (void *obj, const char *debug) |
static int | cccancel_exec (struct ast_channel *chan, const char *data) |
static int | ccreq_exec (struct ast_channel *chan, const char *data) |
static enum ast_device_state | ccss_device_state (const char *device_name) |
static void | ccss_notify_device_state_change (const char *device, enum cc_state state) |
static void | check_callback_sanity (const struct ast_cc_agent_callbacks *callbacks) |
static char * | complete_core_id (const char *word) |
static long | count_agents (const char *const caller, const int core_id_exception) |
static int | count_agents_cb (void *obj, void *arg, void *data, int flags) |
static int | count_monitors_cb (void *obj, void *arg, int flags) |
static struct generic_monitor_instance_list * | create_new_generic_list (struct ast_cc_monitor *monitor) |
static void | dialed_cc_interfaces_destroy (void *data) |
static void * | dialed_cc_interfaces_duplicate (void *data) |
static struct extension_monitor_pvt * | extension_monitor_pvt_init (void) |
static const struct ast_cc_agent_callbacks * | find_agent_callbacks (struct ast_channel *chan) |
static struct cc_core_instance * | find_cc_core_instance (const int core_id) |
static struct generic_monitor_instance_list * | find_generic_monitor_instance_list (const char *const device_name) |
static const struct ast_cc_monitor_callbacks * | find_monitor_callbacks (const char *const type) |
static void | generic_agent_devstate_cb (void *userdata, struct stasis_subscription *sub, struct stasis_message *msg) |
static void | generic_monitor_devstate_cb (void *userdata, struct stasis_subscription *sub, struct stasis_message *msg) |
static int | generic_monitor_devstate_tp_cb (void *data) |
static void | generic_monitor_instance_list_destructor (void *obj) |
static void * | generic_recall (void *data) |
static char * | handle_cc_kill (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cc_status (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | has_device_monitors (struct cc_core_instance *core_instance) |
check if the core instance has any device monitors More... | |
static void | initialize_cc_devstate_map (void) |
static void | initialize_cc_devstate_map_helper (struct ast_config *cc_config, enum cc_state state, const char *cc_setting) |
static void | initialize_cc_max_requests (void) |
static int | is_state_change_valid (enum cc_state current_state, const enum cc_state new_state, struct ast_cc_agent *agent) |
static int | kill_cores (void *obj, void *arg, int flags) |
static void | kill_duplicate_offers (char *caller) |
static int | load_module (void) |
static int | match_agent (void *obj, void *arg, void *data, int flags) |
static const char * | monitor_policy_to_str (enum ast_cc_monitor_policies policy) |
static int | offer_timer_expire (const void *data) |
static int | print_stats_cb (void *obj, void *arg, int flags) |
static void | request_cc (struct cc_core_instance *core_instance) |
static enum ast_cc_agent_policies | str_to_agent_policy (const char *const value) |
static enum ast_cc_monitor_policies | str_to_monitor_policy (const char *const value) |
static void | suspend (struct cc_core_instance *core_instance) |
static int | unload_module (void) |
static void | unsuspend (struct cc_core_instance *core_instance) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "Call Completion Supplementary Services" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
struct cc_agent_backends | cc_agent_backends = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static struct ast_cli_entry | cc_cli [] |
static struct ao2_container * | cc_core_instances |
static const int | CC_CORE_INSTANCES_BUCKETS = 17 |
static struct ast_taskprocessor * | cc_core_taskprocessor |
static const struct ast_cc_config_params | cc_default_params |
static int | cc_logger_level |
static const char * | CC_LOGGER_LEVEL_NAME = "CC" |
struct cc_monitor_backends | cc_monitor_backends = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static int | cc_request_count |
static struct ast_sched_context * | cc_sched_context |
struct { | |
enum ast_cc_service_type service | |
const char * service_string | |
} | cc_service_to_string_map [] |
static enum ast_device_state | cc_state_to_devstate_map [] |
struct { | |
enum cc_state state | |
const char * state_string | |
} | cc_state_to_string_map [] |
static const char * | cccancel_app = "CallCompletionCancel" |
static const char * | ccreq_app = "CallCompletionRequest" |
static int | core_id_counter |
static int | dialed_cc_interface_counter |
static const struct ast_datastore_info | dialed_cc_interfaces_info |
static struct ast_cc_agent_callbacks | generic_agent_callbacks |
static struct ast_cc_monitor_callbacks | generic_monitor_cbs |
struct ao2_container * | generic_monitors |
static unsigned int | global_cc_max_requests |
static const struct ast_datastore_info | recall_ds_info |
static int(*const | state_change_funcs [])(struct cc_core_instance *, struct cc_state_change_args *, enum cc_state previous_state) |
Call Completion Supplementary Services implementation.
Definition in file ccss.c.
#define CC_ACTIVE_DEVSTATE_DEFAULT AST_DEVICE_INUSE |
#define CC_AVAILABLE_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define CC_CALLEE_READY_DEVSTATE_DEFAULT AST_DEVICE_RINGING |
#define CC_CALLER_BUSY_DEVSTATE_DEFAULT AST_DEVICE_ONHOLD |
#define CC_CALLER_OFFERED_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define CC_CALLER_REQUESTED_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define CC_COMPLETE_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define CC_FAILED_DEVSTATE_DEFAULT AST_DEVICE_NOT_INUSE |
#define CC_RECALLING_DEVSTATE_DEFAULT AST_DEVICE_RINGING |
#define GLOBAL_CC_MAX_REQUESTS_DEFAULT 20 |
Definition at line 660 of file ccss.c.
Referenced by initialize_cc_max_requests().
enum cc_state |
The states used in the CCSS core state machine.
Definition at line 181 of file ccss.c.
enum match_flags |
Enumerator | |
---|---|
MATCH_NO_REQUEST | |
MATCH_REQUEST |
Definition at line 469 of file ccss.c.
struct ast_cc_config_params* __ast_cc_config_params_init | ( | const char * | file, |
int | line, | ||
const char * | function | ||
) |
Allocate and initialize an ast_cc_config_params structure.
NULL | Unable to allocate the structure |
non-NULL | A pointer to the newly allocated and initialized structure |
Definition at line 681 of file ccss.c.
References __ast_malloc(), ast_cc_default_config_params(), and NULL.
|
static |
Definition at line 2544 of file ccss.c.
References ast_cc_config_params_destroy(), ast_cc_agent::callbacks, ast_cc_agent::cc_params, and ast_cc_agent_callbacks::destructor.
Referenced by cc_agent_init().
|
static |
Definition at line 728 of file ccss.c.
References AST_CC_AGENT_GENERIC, AST_CC_AGENT_NATIVE, and AST_CC_AGENT_NEVER.
Referenced by ast_cc_get_param().
int ast_cc_agent_accept_request | ( | int | core_id, |
const char *const | debug, | ||
... | |||
) |
Accept inbound CC request.
When a caller requests CC, this function should be called to let the core know that the request has been accepted.
core_id | core_id of the CC transaction |
debug | optional string to print for debugging purposes |
0 | Success |
-1 | Failure |
Definition at line 3776 of file ccss.c.
References CC_CALLER_REQUESTED, and cc_request_state_change().
Referenced by ccreq_exec(), and handle_cc_subscribe().
struct ast_cc_agent* ast_cc_agent_callback | ( | int | flags, |
ao2_callback_fn * | function, | ||
void * | arg, | ||
const char *const | type | ||
) |
Call a callback on all agents of a specific type.
Since the container of CC core instances is private, and so are the items which the container contains, we have to provide an ao2_callback-like method so that a specific agent may be found or so that an operation can be made on all agents of a particular type. The first three arguments should be familiar to anyone who has used ao2_callback. The final argument is the type of agent you wish to have the callback called on.
flags | astobj2 search flags |
function | an ao2 callback function to call |
arg | the argument to the callback function |
type | The type of agents to call the callback on |
Definition at line 456 of file ccss.c.
References cc_core_instance::agent, ao2_t_callback, args, cc_agent_callback_helper(), cc_ref(), cc_unref(), cc_callback_helper::function, and NULL.
Referenced by find_sip_cc_agent_by_notify_uri(), find_sip_cc_agent_by_original_callid(), and find_sip_cc_agent_by_subscribe_uri().
int ast_cc_agent_caller_available | ( | int | core_id, |
const char *const | debug, | ||
... | |||
) |
Indicate that a previously unavailable caller has become available.
If a monitor is suspended due to a caller becoming unavailable, then this function should be called to indicate that the caller has become available.
core_id | core_id of the CC transaction |
debug | optional string to print for debugging purposes |
0 | Success |
-1 | Failure |
Definition at line 3820 of file ccss.c.
References CC_ACTIVE, and cc_request_state_change().
Referenced by cc_esc_publish_handler(), and generic_agent_devstate_cb().
int ast_cc_agent_caller_busy | ( | int | core_id, |
const char *const | debug, | ||
... | |||
) |
Indicate that the caller is busy.
When the callee makes it known that he is available, the core will let the caller's channel driver know that it may attempt to let the caller know to attempt a recall. If the channel driver can detect, though, that the caller is busy, then the channel driver should call this function to let the CC core know.
core_id | core_id of the CC transaction |
debug | optional string to print for debugging purposes |
0 | Success |
-1 | Failure |
Definition at line 3809 of file ccss.c.
References CC_CALLER_BUSY, and cc_request_state_change().
Referenced by cc_esc_publish_handler(), cc_generic_agent_recall(), and sip_cc_agent_recall().
int ast_cc_agent_recalling | ( | int | core_id, |
const char *const | debug, | ||
... | |||
) |
Tell the CC core that a caller is currently recalling.
The main purpose of this is so that the core can alert the monitor to stop its available timer since the caller has begun its recall phase.
core_id | core_id of the CC transaction |
debug | optional string to print for debugging purposes |
0 | Success |
-1 | Failure |
Definition at line 3831 of file ccss.c.
References CC_RECALLING, and cc_request_state_change().
Referenced by generic_recall(), and get_destination().
int ast_cc_agent_register | ( | const struct ast_cc_agent_callbacks * | callbacks | ) |
Register a set of agent callbacks with the core.
This is made so that at agent creation time, the proper callbacks may be installed and the proper .init callback may be called for the monitor to establish private data.
callbacks | The callbacks used by the agent implementation |
0 | Successfully registered |
-1 | Failure to register |
Definition at line 1239 of file ccss.c.
References ast_calloc, AST_RWLIST_INSERT_TAIL, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, cc_agent_backend::callbacks, and cc_agent_backend::next.
Referenced by load_module().
int ast_cc_agent_set_interfaces_chanvar | ( | struct ast_channel * | chan | ) |
Set the first level CC_INTERFACES channel variable for a channel.
The CC_INTERFACES channel variable will have the interfaces that should be called back for a specific PBX instance.
chan | The channel to set the CC_INTERFACES variable on |
Definition at line 3631 of file ccss.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_free, AST_LIST_FIRST, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log_dynamic_level, ast_str_buffer(), ast_str_create, build_cc_interfaces_chanvar(), cc_logger_level, cc_recall_ds_data::core_id, ast_datastore::data, cc_recall_ds_data::interface_tree, monitor, NULL, pbx_builtin_setvar_helper(), and str.
Referenced by generic_recall(), and handle_request_invite().
int ast_cc_agent_status_response | ( | int | core_id, |
enum ast_device_state | devstate | ||
) |
Response with a caller's current status.
When an ISDN PTMP monitor requests the caller's status, the agent must respond to the request using this function. For simplicity it is recommended that the devstate parameter be one of AST_DEVICE_INUSE or AST_DEVICE_NOT_INUSE.
core_id | The core ID of the CC transaction |
devstate | The current state of the caller to which the agent pertains |
0 | Successfully responded with our status |
-1 | Failed to respond with our status |
Definition at line 4093 of file ccss.c.
References args, ast_calloc, ast_free, ast_taskprocessor_push(), cc_status_response(), cc_unref(), cc_status_response_args::core_instance, cc_status_response_args::devstate, and find_cc_core_instance().
Referenced by cc_generic_agent_status_request(), and sip_cc_agent_status_request().
void ast_cc_agent_unregister | ( | const struct ast_cc_agent_callbacks * | callbacks | ) |
Unregister a set of agent callbacks with the core.
If a module which makes use of a CC agent is unloaded, then it may unregister its agent callbacks with the core.
callbacks | The callbacks used by the agent implementation |
0 | Successfully unregistered |
-1 | Failure to unregister |
Definition at line 1254 of file ccss.c.
References ast_free, AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, cc_agent_backend::callbacks, and cc_agent_backend::next.
Referenced by __unload_module(), and unload_module().
int ast_cc_available_timer_expire | ( | const void * | data | ) |
Scheduler callback for available timer expiration.
data | A reference to the CC monitor on which the timer was running. |
Definition at line 1509 of file ccss.c.
References ast_cc_monitor_failed(), ast_cc_monitor::available_timer_id, cc_unref(), ast_cc_monitor::core_id, ast_cc_interface::device_name, and ast_cc_monitor::interface.
Referenced by cc_generic_monitor_request_cc(), and sip_cc_monitor_request_cc().
int ast_cc_build_frame | ( | struct ast_channel * | chan, |
struct ast_cc_config_params * | cc_params, | ||
const char * | monitor_type, | ||
const char *const | device_name, | ||
const char *const | dialstring, | ||
enum ast_cc_service_type | service, | ||
void * | private_data, | ||
struct ast_frame * | frame | ||
) |
Create a CC Control frame.
chan_dahdi is weird. It doesn't seem to actually queue frames when it needs to tell an application something. Instead it wakes up, tells the application that it has data ready, and then based on set flags, creates the proper frame type. For chan_dahdi, we provide this function. It provides us the data we need, and we'll make its frame for it.
chan | A channel involved in the call. What we want is on a datastore on both incoming and outgoing so either may be provided | |
cc_params | The CC configuration parameters for the outbound target | |
monitor_type | The type of monitor to use when CC is requested | |
device_name | The name of the outbound target device. | |
dialstring | The dial string used when calling this specific interface | |
service | What kind of CC service is being offered. (CCBS/CCNR/etc...) | |
private_data | If a native monitor is being used, and some channel-driver-specific private data has been allocated, then this parameter should contain a pointer to that data. If using a generic monitor, this parameter should remain NULL. Note that if this function should fail at some point, it is the responsibility of the caller to free the private data upon return. | |
[out] | frame | The frame we will be returning to the caller. It is vital that ast_frame_free be called on this frame since the payload will be allocated on the heap. |
-1 | Failure. At some point there was a failure. Do not attempt to use the frame in this case. |
0 | Success |
Definition at line 4176 of file ccss.c.
References ast_calloc, AST_CONTROL_CC, AST_FRAME_CONTROL, ast_free, AST_MALLOCD_DATA, cc_build_payload(), ast_frame::data, ast_frame::datalen, ast_frame::frametype, ast_frame_subclass::integer, ast_frame::mallocd, ast_frame::ptr, and ast_frame::subclass.
Referenced by ast_queue_cc_frame().
void ast_cc_busy_interface | ( | struct ast_channel * | inbound, |
struct ast_cc_config_params * | cc_params, | ||
const char * | monitor_type, | ||
const char *const | device_name, | ||
const char *const | dialstring, | ||
void * | private_data | ||
) |
Callback made from ast_cc_callback for certain channel types.
inbound | Incoming asterisk channel. |
cc_params | The CC configuration parameters for the outbound target |
monitor_type | The type of monitor to use when CC is requested |
device_name | The name of the outbound target device. |
dialstring | The dial string used when calling this specific interface |
private_data | If a native monitor is being used, and some channel-driver-specific private data has been allocated, then this parameter should contain a pointer to that data. If using a generic monitor, this parameter should remain NULL. Note that if this function should fail at some point, it is the responsibility of the caller to free the private data upon return. |
For channel types that fail ast_request when the device is busy, we call into the channel driver with ast_cc_callback. This is the callback that is called in that case for each device found which could have been returned by ast_request.
This function creates a CC control frame payload, simulating the act of reading it from the nonexistent outgoing channel's frame queue. We then handle this simulated frame just as we would a normal CC frame which had actually been queued by the channel driver.
Definition at line 4232 of file ccss.c.
References AST_CC_CCBS, ast_handle_cc_control_frame(), call_destructor_with_no_monitor(), cc_build_payload(), and NULL.
Referenced by dial_exec_full().
void ast_cc_call_failed | ( | struct ast_channel * | incoming, |
struct ast_channel * | outgoing, | ||
const char *const | dialstring | ||
) |
Make CCBS available in the case that ast_call fails.
One caveat is that this may only be used if generic monitoring is being used. The reason is that since Asterisk determined that the device was busy without actually placing a call to it, the far end will have no idea what call we are requesting call completion for if we were to send a call completion request.
Definition at line 4199 of file ccss.c.
References AST_CAUSE_BUSY, AST_CAUSE_CONGESTION, AST_CC_CCBS, AST_CC_GENERIC_MONITOR_TYPE, AST_CC_MONITOR_GENERIC, ast_channel_get_cc_config_params(), ast_channel_get_device_name(), ast_channel_hangupcause(), AST_CHANNEL_NAME, ast_get_cc_monitor_policy(), ast_handle_cc_control_frame(), cc_build_payload(), cc_control_payload::device_name, and NULL.
Referenced by dial_exec_full().
int ast_cc_call_init | ( | struct ast_channel * | chan, |
int * | ignore_cc | ||
) |
Start the CC process on a call.
Whenever a CC-capable application, such as Dial, wishes to engage in CC activity, it initiates the process by calling this function. If the CC core should discover that a previous application has called ast_ignore_cc on this channel or a "parent" channel, then the value of the ignore_cc integer passed in will be set nonzero.
The ignore_cc parameter is a convenience parameter. It can save an application the trouble of trying to call CC APIs when it knows that it should just ignore further attempts at CC actions.
chan | The inbound channel calling the CC-capable application. | |
[out] | ignore_cc | Will be set non-zero if no further CC actions need to be taken |
0 | Success |
-1 | Failure |
Definition at line 2409 of file ccss.c.
References AST_CC_AGENT_NEVER, ast_channel_context(), ast_channel_datastore_find(), ast_channel_exten(), ast_channel_get_cc_config_params(), ast_channel_lock, ast_channel_macrocontext(), ast_channel_macroexten(), ast_channel_name(), ast_channel_unlock, ast_get_cc_agent_policy(), AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log_dynamic_level, cc_extension_monitor_init(), cc_interfaces_datastore_init(), cc_logger_level, cc_ref(), cc_unref(), ast_cc_monitor::core_id, dialed_cc_interfaces::core_id, ast_datastore::data, dialed_cc_interfaces::dial_parent_id, ast_cc_monitor::id, dialed_cc_interfaces::ignore, dialed_cc_interfaces::interface_tree, interfaces, monitor, NULL, and S_OR.
Referenced by dial_exec_full().
int ast_cc_callback | ( | struct ast_channel * | inbound, |
const char *const | tech, | ||
const char *const | dest, | ||
ast_cc_callback_fn | callback | ||
) |
Run a callback for potential matching destinations.
inbound | |
tech | Channel technology to use |
dest | Channel/group/peer or whatever the specific technology uses |
callback | Function to call when a target is reached |
Always | 0, I guess. |
Definition at line 4244 of file ccss.c.
References ast_get_channel_tech(), and ast_channel_tech::cc_callback.
Referenced by dial_exec_full().
int ast_cc_completed | ( | struct ast_channel * | chan, |
const char *const | debug, | ||
... | |||
) |
Indicate recall has been acknowledged.
When we receive confirmation that an endpoint has responded to our CC recall, we call this function.
chan | The inbound channel making the CC recall |
debug | optional string to print for debugging purposes |
0 | Success |
-1 | Failure |
Definition at line 3842 of file ccss.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, CC_COMPLETE, cc_request_state_change(), cc_recall_ds_data::core_id, ast_datastore::data, cc_recall_ds_data::ignore, cc_recall_ds_data::nested, and NULL.
Referenced by wait_for_answer().
void ast_cc_config_params_destroy | ( | struct ast_cc_config_params * | params | ) |
Free memory from CCSS configuration params.
params | Pointer to structure whose memory we need to free |
void |
Definition at line 693 of file ccss.c.
References ast_free.
Referenced by agent_destroy(), ast_channel_cc_params_init(), cc_interface_destroy(), channel_cc_params_destroy(), dahdi_create_channel_range(), destroy_dahdi_pvt(), process_dahdi(), setup_dahdi(), sip_destroy_peer(), and sip_pvt_dtor().
void ast_cc_copy_config_params | ( | struct ast_cc_config_params * | dest, |
const struct ast_cc_config_params * | src | ||
) |
copy CCSS configuration parameters from one structure to another
For now, this is a simple memcpy, but this function is necessary since the size of an ast_cc_config_params structure is unknown outside of main/ccss.c. Also, this allows for easier expansion of the function in case it becomes more complex than just a memcpy.
src | The structure from which data is copied |
dest | The structure to which data is copied |
Definition at line 861 of file ccss.c.
Referenced by ast_channel_cc_params_init(), cc_agent_init(), cc_build_payload(), cc_device_monitor_init(), channel_cc_params_copy(), check_peer_ok(), create_addr_from_peer(), dahdi_new(), deep_copy_dahdi_chan_conf(), duplicate_pseudo(), and mkintf().
void ast_cc_default_config_params | ( | struct ast_cc_config_params * | params | ) |
Set the specified CC config params to default values.
This is just like ast_cc_copy_config_params() and could be used in place of it if you need to set the config params to defaults instead. You are simply "copying" defaults into the destination.
params | CC config params to set to default values. |
Definition at line 676 of file ccss.c.
References cc_default_params.
Referenced by __ast_cc_config_params_init().
void ast_cc_extension_monitor_add_dialstring | ( | struct ast_channel * | incoming, |
const char *const | dialstring, | ||
const char *const | device_name | ||
) |
Add a child dialstring to an extension monitor.
Whenever we request a channel, the parent extension monitor needs to store the dialstring of the device requested. The reason is so that we can call the device back during the recall even if we are not monitoring the device.
incoming | The caller's channel |
dialstring | The dialstring used when requesting the outbound channel |
device_name | The device name associated with the requested outbound channel |
void |
Definition at line 2005 of file ccss.c.
References ast_calloc, ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_copy_string(), AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, extension_monitor_pvt::child_dialstrings, ast_datastore::data, extension_child_dialstring::device_name, dialed_cc_interfaces::dial_parent_id, ast_cc_monitor::id, id, dialed_cc_interfaces::interface_tree, extension_child_dialstring::is_valid, monitor, NULL, extension_child_dialstring::original_dialstring, and ast_cc_monitor::private_data.
Referenced by dial_exec_full().
int ast_cc_failed | ( | int | core_id, |
const char *const | debug, | ||
... | |||
) |
Indicate failure has occurred.
If at any point a failure occurs, this is the function to call so that the core can initiate cleanup procedures.
core_id | core_id of the CC transaction |
debug | optional string to print for debugging purposes |
0 | Success |
-1 | Failure |
Definition at line 3879 of file ccss.c.
References CC_FAILED, and cc_request_state_change().
Referenced by cancel_available_timer(), cc_caller_offered(), cc_caller_requested(), cc_monitor_failed(), cccancel_exec(), ccreq_exec(), generic_recall(), handle_cc_subscribe(), kill_cores(), offer_timer_expire(), request_cc(), sip_offer_timer_expire(), suspend(), unsuspend(), and wait_for_answer().
int ast_cc_get_current_core_id | ( | struct ast_channel * | chan | ) |
Get the core id for the current call.
The main use of this function is for channel drivers who queue an AST_CONTROL_CC frame. A channel driver may call this function in order to get the core_id for what may become a CC request. This way, when monitor functions are called which use a core_id as a means of identification, the channel driver will have saved this information.
The channel given to this function may be an inbound or outbound channel. Both will have the necessary info on it.
chan | The channel from which to get the core_id. |
core_id | on success |
-1 | Failure |
Definition at line 2487 of file ccss.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, dialed_cc_interfaces::core_id, ast_datastore::data, dialed_cc_interfaces::ignore, and NULL.
Referenced by sip_handle_cc().
struct ast_cc_monitor* ast_cc_get_monitor_by_recall_core_id | ( | const int | core_id, |
const char *const | device_name | ||
) |
Get the associated monitor given the device name and core_id.
The function ast_cc_is_recall is helpful for determining if a call to a specific channel is a recall. However, once you have determined that this is a recall, you will most likely need access to the private data within the associated monitor. This function is what one uses to get that monitor.
core_id | The core ID to which this recall corresponds. This likely will have been obtained using the ast_cc_is_recall function |
device_name | Which device to find the monitor for. |
NULL | Appropriate monitor does not exist |
non-NULL | The monitor to use for this recall |
Definition at line 3519 of file ccss.c.
References AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, cc_ref(), cc_unref(), ast_cc_interface::device_name, find_cc_core_instance(), ast_cc_monitor::interface, cc_core_instance::monitors, ast_cc_monitor::next, and NULL.
Referenced by sip_call().
int ast_cc_get_param | ( | struct ast_cc_config_params * | params, |
const char *const | name, | ||
char * | buf, | ||
size_t | buf_len | ||
) |
get a CCSS configuration parameter, given its name
params | The CCSS configuration from which to get the value |
name | The name of the CCSS parameter we want |
buf | A preallocated buffer to hold the value |
buf_len | The size of buf |
0 | Success |
-1 | Failure |
Definition at line 759 of file ccss.c.
References agent_policy_to_str(), ast_copy_string(), ast_get_cc_agent_dialstring(), ast_get_cc_agent_policy(), ast_get_cc_callback_macro(), ast_get_cc_callback_sub(), ast_get_cc_max_agents(), ast_get_cc_max_monitors(), ast_get_cc_monitor_policy(), ast_get_cc_offer_timer(), ast_get_cc_recall_timer(), ast_get_ccbs_available_timer(), ast_get_ccnr_available_timer(), ast_log, LOG_WARNING, monitor_policy_to_str(), NULL, and value.
Referenced by acf_cc_read().
int ast_cc_is_config_param | ( | const char *const | name | ) |
Is this a CCSS configuration parameter?
name | Name of configuration option being parsed. |
1 | Yes, this is a CCSS configuration parameter. |
0 | No, this is not a CCSS configuration parameter. |
Definition at line 846 of file ccss.c.
Referenced by build_peer(), and process_dahdi().
int ast_cc_is_recall | ( | struct ast_channel * | chan, |
int * | core_id, | ||
const char *const | monitor_type | ||
) |
Decide if a call to a particular channel is a CC recall.
When a CC recall happens, it is important on the called side to know that the call is a CC recall and not a normal call. This function will determine first if the call in question is a CC recall. Then it will determine based on the chan parameter if the channel is being called is being recalled.
As a quick example, let's say a call is placed to SIP/1000 and SIP/1000 is currently on the phone. The caller requests CCBS. SIP/1000 finishes his call, and so the caller attempts to recall. Now, the dialplan administrator has set up this second call so that not only is SIP/1000 called, but also SIP/2000 is called. If SIP/1000's channel were passed to this function, the return value would be non-zero, but if SIP/2000's channel were passed into this function, then the return would be 0 since SIP/2000 was not one of the original devices dialed.
chan | The channel to check | |
[out] | core_id | If this is a valid CC recall, the core_id of the failed call will be placed in this output parameter |
monitor_type | Clarify which type of monitor type we are looking for if this is happening on a called channel. For incoming channels, this parameter is not used. |
0 | Either this is not a recall or it is but this channel is not part of the recall |
non-zero | This is a recall and the channel in question is directly involved. |
Definition at line 3438 of file ccss.c.
References ast_assert, ast_channel_datastore_find(), ast_channel_get_device_name(), ast_channel_lock, AST_CHANNEL_NAME, ast_channel_unlock, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_strlen_zero, cc_recall_ds_data::core_id, ast_datastore::data, ast_cc_interface::device_name, cc_recall_ds_data::ignore, ast_cc_monitor::interface, cc_recall_ds_data::interface_tree, ast_cc_interface::monitor_type, cc_recall_ds_data::nested, ast_cc_monitor::next, and NULL.
Referenced by cc_core_init_instance(), sip_call(), and wait_for_answer().
int ast_cc_monitor_callee_available | ( | const int | core_id, |
const char *const | debug, | ||
... | |||
) |
Alert the core that a device being monitored has become available.
0 | Request successfully queued |
-1 | Request could not be queued |
Definition at line 3798 of file ccss.c.
References CC_CALLEE_READY, and cc_request_state_change().
Referenced by cc_generic_monitor_destructor(), cc_generic_monitor_suspend(), cc_generic_monitor_unsuspend(), generic_monitor_devstate_tp_cb(), and handle_cc_notify().
int ast_cc_monitor_count | ( | const char *const | name, |
const char *const | type | ||
) |
Return the number of outstanding CC requests to a specific device.
name | The name of the monitored device |
type | The type of the monitored device (e.g. "generic") |
Definition at line 4368 of file ccss.c.
References ao2_t_callback, ast_log_dynamic_level, cc_logger_level, count_monitors_cb_data::count, count_monitors_cb(), count_monitors_cb_data::device_name, name, OBJ_NODATA, and type.
Referenced by ast_queue_cc_frame().
int ast_cc_monitor_failed | ( | int | core_id, |
const char *const | monitor_name, | ||
const char *const | debug, | ||
... | |||
) |
Indicate that a failure has occurred on a specific monitor.
If a monitor should detect that a failure has occurred when communicating with its endpoint, then ast_cc_monitor_failed should be called. The big difference between ast_cc_monitor_failed and ast_cc_failed is that ast_cc_failed indicates a global failure for a CC transaction, where as ast_cc_monitor_failed is localized to a particular monitor. When ast_cc_failed is called, the entire CC transaction is torn down. When ast_cc_monitor_failed is called, only the monitor on which the failure occurred is pruned from the tree of monitors.
If there are no more devices left to monitor when this function is called, then the core will fail the CC transaction globally.
core_id | The core ID for the CC transaction |
monitor_name | The name of the monitor on which the failure occurred |
debug | A debug message to print to the CC log |
Definition at line 3941 of file ccss.c.
References ast_calloc, ast_free, ast_strdup, ast_taskprocessor_push(), ast_vasprintf, cc_monitor_failed(), ast_cc_monitor_failure_data::core_id, ast_cc_monitor_failure_data::debug, and ast_cc_monitor_failure_data::device_name.
Referenced by ast_cc_available_timer_expire(), cc_handle_publish_error(), and handle_response_subscribe().
int ast_cc_monitor_party_b_free | ( | int | core_id | ) |
Alert a caller that though the callee has become free, the caller himself is not and may not call back.
When an ISDN PTMP monitor senses that his monitored party has become available, he will request the status of the called party. If he determines that the caller is currently not available, then he will call this function so that an appropriate message is sent to the caller.
Yes, you just read that correctly. The callee asks the caller what his current status is, and if the caller is currently unavailable, the monitor must send him a message anyway. WTF?
This function results in the agent's party_b_free callback being called. It is most likely that you will not need to actually implement the party_b_free callback in an agent because it is not likely that you will need to or even want to send a caller a message indicating the callee's status if the caller himself is not also free.
core_id | The core ID of the CC transaction |
0 | Successfully alerted the core that party B is free |
-1 | Could not alert the core that party B is free |
Definition at line 4051 of file ccss.c.
References ast_taskprocessor_push(), cc_party_b_free(), cc_unref(), and find_cc_core_instance().
int ast_cc_monitor_register | ( | const struct ast_cc_monitor_callbacks * | callbacks | ) |
Register a set of monitor callbacks with the core.
This is made so that at monitor creation time, the proper callbacks may be installed and the proper .init callback may be called for the monitor to establish private data.
callbacks | The callbacks used by the monitor implementation |
0 | Successfully registered |
-1 | Failure to register |
Definition at line 1184 of file ccss.c.
References ast_calloc, AST_RWLIST_INSERT_TAIL, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, cc_monitor_backend::callbacks, and cc_monitor_backend::next.
Referenced by load_module().
int ast_cc_monitor_request_acked | ( | int | core_id, |
const char *const | debug, | ||
... | |||
) |
Indicate that an outbound entity has accepted our CC request.
When we receive confirmation that an outbound device has accepted the CC request we sent it, this function must be called.
core_id | core_id of the CC transaction |
debug | optional string to print for debugging purposes |
0 | Success |
-1 | Failure |
Definition at line 3787 of file ccss.c.
References CC_ACTIVE, and cc_request_state_change().
Referenced by cc_generic_monitor_request_cc(), cc_stop_ringing(), and handle_cc_notify().
int ast_cc_monitor_status_request | ( | int | core_id | ) |
Request the status of a caller or callers.
The following are all functions which are required due to the unique case where Asterisk is acting as the NT side of an ISDN PTMP connection to the caller and as the TE side of an ISDN PTMP connection to the callee. In such a case, there are several times where the PTMP monitor needs information from the agent in order to formulate the appropriate messages to send.
When an ISDN PTMP monitor senses that the callee has become available, it needs to know the current status of the caller in order to determine the appropriate response to send to the caller. In order to do this, the monitor calls this function. Responses will arrive asynchronously.
core_id | The core ID of the CC transaction |
0 | Successfully requested status |
-1 | Failed to request status |
Definition at line 3986 of file ccss.c.
References ast_taskprocessor_push(), cc_status_request(), cc_unref(), and find_cc_core_instance().
int ast_cc_monitor_stop_ringing | ( | int | core_id | ) |
Alert a caller to stop ringing.
When an ISDN PTMP monitor becomes available, it is assumed that the agent will then cause the caller's phone to ring. In some cases, this is literally what happens. In other cases, it may be that the caller gets a visible indication on his phone that he may attempt to recall the callee. If multiple callers are recalled (since it may be possible to have a group of callers configured as a single party A), and one of those callers picks up his phone, then the ISDN PTMP monitor will alert the other callers to stop ringing. The agent's stop_ringing callback will be called, and it is up to the agent's driver to send an appropriate message to make his caller stop ringing.
core_id | The core ID of the CC transaction |
0 | Successfully requested for the phone to stop ringing |
-1 | Could not request for the phone to stop ringing |
Definition at line 4023 of file ccss.c.
References ast_taskprocessor_push(), cc_stop_ringing(), cc_unref(), and find_cc_core_instance().
void ast_cc_monitor_unregister | ( | const struct ast_cc_monitor_callbacks * | callbacks | ) |
Unregister a set of monitor callbacks with the core.
If a module which makes use of a CC monitor is unloaded, then it may unregister its monitor callbacks with the core.
callbacks | The callbacks used by the monitor implementation |
0 | Successfully unregistered |
-1 | Failure to unregister |
Definition at line 1217 of file ccss.c.
References ast_free, AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, cc_monitor_backend::callbacks, and cc_monitor_backend::next.
Referenced by __unload_module(), and unload_module().
int ast_cc_offer | ( | struct ast_channel * | caller_chan | ) |
Offer CC to a caller.
This function is called from ast_hangup if the caller is eligible to be offered call completion service.
caller_chan | The calling channel |
-1 | Error |
0 | Success |
Definition at line 3751 of file ccss.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, cc_offer(), dialed_cc_interfaces::core_id, cc_recall_ds_data::core_id, ast_datastore::data, dialed_cc_interfaces::is_original_caller, and NULL.
Referenced by ast_hangup().
int ast_cc_request_is_within_limits | ( | void | ) |
Check if the incoming CC request is within the bounds set by the cc_max_requests configuration option.
It is recommended that an entity which receives an incoming CC request calls this function before calling ast_cc_agent_accept_request. This way, immediate feedback can be given to the caller about why his request was rejected.
If this is not called and a state change to CC_CALLER_REQUESTED is made, then the core will still not allow for the request to succeed. However, if done this way, it may not be obvious to the requestor why the request failed.
0 | Not within the limits. Fail. |
non-zero | Within the limits. Success. |
Definition at line 2482 of file ccss.c.
References cc_request_count, and global_cc_max_requests.
Referenced by cc_caller_requested(), cc_interfaces_datastore_init(), and ccreq_exec().
int ast_cc_set_param | ( | struct ast_cc_config_params * | params, |
const char *const | name, | ||
const char * | value | ||
) |
set a CCSS configuration parameter, given its name
params | The parameter structure to set the value on |
name | The name of the cc parameter |
value | The value of the parameter |
0 | Success |
-1 | Failure |
Definition at line 804 of file ccss.c.
References ast_log, ast_set_cc_agent_dialstring(), ast_set_cc_agent_policy(), ast_set_cc_callback_macro(), ast_set_cc_callback_sub(), ast_set_cc_max_agents(), ast_set_cc_max_monitors(), ast_set_cc_monitor_policy(), ast_set_cc_offer_timer(), ast_set_cc_recall_timer(), ast_set_ccbs_available_timer(), ast_set_ccnr_available_timer(), LOG_WARNING, str_to_agent_policy(), and str_to_monitor_policy().
Referenced by acf_cc_write(), build_peer(), and process_dahdi().
const char* ast_get_cc_agent_dialstring | ( | struct ast_cc_config_params * | config | ) |
Get the cc_agent_dialstring.
config | The configuration to retrieve the cc_agent_dialstring from |
Definition at line 960 of file ccss.c.
References ast_cc_config_params::cc_agent_dialstring.
Referenced by ast_cc_get_param().
enum ast_cc_agent_policies ast_get_cc_agent_policy | ( | struct ast_cc_config_params * | config | ) |
Get the cc_agent_policy.
config | The configuration to retrieve the policy from |
Definition at line 866 of file ccss.c.
References ast_cc_config_params::cc_agent_policy.
Referenced by ast_cc_call_init(), ast_cc_get_param(), build_peer(), cc_core_init_instance(), and find_agent_callbacks().
const char* ast_get_cc_callback_macro | ( | struct ast_cc_config_params * | config | ) |
Get the name of the callback_macro.
config | The configuration to retrieve the callback_macro from |
Definition at line 994 of file ccss.c.
References ast_cc_config_params::cc_callback_macro.
Referenced by ast_cc_get_param(), and generic_recall().
const char* ast_get_cc_callback_sub | ( | struct ast_cc_config_params * | config | ) |
Get the name of the callback subroutine.
config | The configuration to retrieve the callback_sub from |
Definition at line 999 of file ccss.c.
References ast_cc_config_params::cc_callback_sub.
Referenced by ast_cc_get_param(), and generic_recall().
unsigned int ast_get_cc_max_agents | ( | struct ast_cc_config_params * | config | ) |
Get the cc_max_agents.
config | The configuration to retrieve the cc_max_agents from |
Definition at line 974 of file ccss.c.
References ast_cc_config_params::cc_max_agents.
Referenced by ast_cc_get_param(), and cc_core_init_instance().
unsigned int ast_get_cc_max_monitors | ( | struct ast_cc_config_params * | config | ) |
Get the cc_max_monitors.
config | The configuration to retrieve the cc_max_monitors from |
Definition at line 984 of file ccss.c.
References ast_cc_config_params::cc_max_monitors.
Referenced by ast_cc_get_param(), and ast_queue_cc_frame().
enum ast_cc_monitor_policies ast_get_cc_monitor_policy | ( | struct ast_cc_config_params * | config | ) |
Get the cc_monitor_policy.
config | The configuration to retrieve the cc_monitor_policy from |
Definition at line 883 of file ccss.c.
References ast_cc_config_params::cc_monitor_policy.
Referenced by analog_call(), ast_cc_call_failed(), ast_cc_get_param(), dahdi_cc_callback(), and sip_handle_cc().
unsigned int ast_get_cc_offer_timer | ( | struct ast_cc_config_params * | config | ) |
Get the cc_offer_timer.
config | The configuration to retrieve the cc_offer_timer from |
Definition at line 900 of file ccss.c.
References ast_cc_config_params::cc_offer_timer.
Referenced by ast_cc_get_param(), cc_generic_agent_start_offer_timer(), and sip_cc_agent_start_offer_timer().
unsigned int ast_get_cc_recall_timer | ( | struct ast_cc_config_params * | config | ) |
Get the cc_recall_timer.
config | The configuration to retrieve the cc_recall_timer from |
Definition at line 930 of file ccss.c.
References ast_cc_config_params::cc_recall_timer.
Referenced by ast_cc_get_param(), and generic_recall().
unsigned int ast_get_ccbs_available_timer | ( | struct ast_cc_config_params * | config | ) |
Get the ccbs_available_timer.
config | The configuration to retrieve the ccbs_available_timer from |
Definition at line 945 of file ccss.c.
References ast_cc_config_params::ccbs_available_timer.
Referenced by ast_cc_get_param(), cc_generic_monitor_request_cc(), and sip_cc_monitor_request_cc().
unsigned int ast_get_ccnr_available_timer | ( | struct ast_cc_config_params * | config | ) |
Get the ccnr_available_timer.
config | The configuration to retrieve the ccnr_available_timer from |
Definition at line 915 of file ccss.c.
References ast_cc_config_params::ccnr_available_timer.
Referenced by ast_cc_get_param(), cc_generic_monitor_request_cc(), and sip_cc_monitor_request_cc().
void ast_handle_cc_control_frame | ( | struct ast_channel * | inbound, |
struct ast_channel * | outbound, | ||
void * | frame_data | ||
) |
Properly react to a CC control frame.
Unless we are ignoring CC for some reason, we will always call this function when we read an AST_CONTROL_CC frame from an outbound channel.
This function will call cc_device_monitor_init to create the new cc_monitor for the device from which we read the frame. In addition, the new device will be added to the monitor tree on the dialed_cc_interfaces datastore on the inbound channel.
If this is the first AST_CONTROL_CC frame that we have handled for this call, then we will also initialize the CC core for this call.
Definition at line 2316 of file ccss.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, AST_CONTROL_CC, ast_indicate_data(), AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_log_dynamic_level, call_destructor_with_no_monitor(), cc_core_init_instance(), cc_device_monitor_init(), cc_extension_monitor_change_is_valid(), cc_logger_level, cc_publish_available(), cc_ref(), cc_service_to_string(), cc_unref(), cc_core_instance::core_id, dialed_cc_interfaces::core_id, ast_datastore::data, cc_control_payload::device_name, ast_cc_interface::device_name, cc_control_payload::dialstring, ast_cc_monitor::dialstring, find_cc_core_instance(), dialed_cc_interfaces::ignore, ast_cc_monitor::interface, dialed_cc_interfaces::interface_tree, dialed_cc_interfaces::is_original_caller, LOG_WARNING, monitor, cc_control_payload::monitor_type, NULL, ast_cc_monitor::parent_id, cc_control_payload::private_data, and cc_control_payload::service.
Referenced by ast_cc_busy_interface(), ast_cc_call_failed(), and wait_for_answer().
void ast_ignore_cc | ( | struct ast_channel * | chan | ) |
Mark the channel to ignore further CC activity.
When a CC-capable application, such as Dial, has finished with all CC processing for a channel and knows that any further CC processing should be ignored, this function should be called.
chan | The channel for which further CC processing should be ignored. |
void |
Definition at line 3720 of file ccss.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_datastore::data, dialed_cc_interfaces::ignore, cc_recall_ds_data::ignore, and NULL.
Referenced by dial_exec_full(), and do_forward().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
int ast_queue_cc_frame | ( | struct ast_channel * | chan, |
const char *const | monitor_type, | ||
const char *const | dialstring, | ||
enum ast_cc_service_type | service, | ||
void * | private_data | ||
) |
Queue an AST_CONTROL_CC frame.
chan | The channel onto which to queue the frame |
monitor_type | The type of monitor to use when CC is requested |
dialstring | The dial string used to call the device |
service | The type of CC service the device is willing to offer |
private_data | If a native monitor is being used, and some channel-driver-specific private data has been allocated, then this parameter should contain a pointer to that data. If using a generic monitor, this parameter should remain NULL. Note that if this function should fail at some point, it is the responsibility of the caller to free the private data upon return. |
0 | Success |
-1 | Error |
Definition at line 4149 of file ccss.c.
References ast_cc_build_frame(), ast_cc_monitor_count(), ast_channel_get_cc_config_params(), ast_channel_get_device_name(), AST_CHANNEL_NAME, ast_frfree, ast_get_cc_max_monitors(), ast_log, ast_queue_frame(), LOG_NOTICE, and retval.
Referenced by analog_call(), and sip_handle_cc().
void ast_set_cc_agent_dialstring | ( | struct ast_cc_config_params * | config, |
const char *const | value | ||
) |
Set the cc_agent_dialstring.
config | The configuration to set the cc_agent_dialstring on |
value | The new cc_agent_dialstring we want to change to |
void |
Definition at line 965 of file ccss.c.
References ast_copy_string(), ast_strlen_zero, and ast_cc_config_params::cc_agent_dialstring.
Referenced by ast_cc_set_param().
int ast_set_cc_agent_policy | ( | struct ast_cc_config_params * | config, |
enum ast_cc_agent_policies | value | ||
) |
Set the cc_agent_policy.
config | The configuration to set the cc_agent_policy on |
value | The new cc_agent_policy we want to change to |
0 | Success |
-1 | Failure (likely due to bad input) |
Definition at line 871 of file ccss.c.
References AST_CC_AGENT_GENERIC, ast_cc_config_params::cc_agent_policy, and value.
Referenced by ast_cc_set_param(), and build_peer().
void ast_set_cc_callback_macro | ( | struct ast_cc_config_params * | config, |
const char *const | value | ||
) |
Set the callback_macro name.
config | The configuration to set the callback_macro on |
value | The new callback macro we want to change to |
void |
Definition at line 1004 of file ccss.c.
References ast_copy_string(), ast_log, ast_strlen_zero, ast_cc_config_params::cc_callback_macro, and LOG_WARNING.
Referenced by ast_cc_set_param().
void ast_set_cc_callback_sub | ( | struct ast_cc_config_params * | config, |
const char *const | value | ||
) |
Set the callback subroutine name.
config | The configuration to set the callback_sub on |
value | The new callback subroutine we want to change to |
void |
Definition at line 1014 of file ccss.c.
References ast_copy_string(), ast_strlen_zero, and ast_cc_config_params::cc_callback_sub.
Referenced by ast_cc_set_param().
int ast_set_cc_interfaces_chanvar | ( | struct ast_channel * | chan, |
const char *const | extension | ||
) |
Set the CC_INTERFACES channel variable for a channel using an.
extension@contextas a starting point
The CC_INTERFACES channel variable will have the interfaces that should be called back for a specific PBX instance. This version of the function is used mainly by local channels, wherein we need to set CC_INTERFACES based on an extension and context that appear in the middle of the tree of dialed interfaces.
chan | The channel to set the CC_INTERFACES variable on |
extension | The name of the extension for which we're setting the variable. This should be in the form ofexten@context |
Definition at line 3668 of file ccss.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_free, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log_dynamic_level, ast_str_buffer(), ast_str_create, build_cc_interfaces_chanvar(), cc_logger_level, cc_recall_ds_data::core_id, ast_datastore::data, ast_cc_interface::device_name, ast_cc_monitor::interface, cc_recall_ds_data::interface_tree, NULL, pbx_builtin_setvar_helper(), and str.
Referenced by local_call().
void ast_set_cc_max_agents | ( | struct ast_cc_config_params * | config, |
unsigned int | value | ||
) |
Set the cc_max_agents.
config | The configuration to set the cc_max_agents on |
value | The new cc_max_agents we want to change to |
void |
Definition at line 979 of file ccss.c.
References ast_cc_config_params::cc_max_agents, and value.
Referenced by ast_cc_set_param().
void ast_set_cc_max_monitors | ( | struct ast_cc_config_params * | config, |
unsigned int | value | ||
) |
Set the cc_max_monitors.
config | The configuration to set the cc_max_monitors on |
value | The new cc_max_monitors we want to change to |
void |
Definition at line 989 of file ccss.c.
References ast_cc_config_params::cc_max_monitors, and value.
Referenced by ast_cc_set_param().
int ast_set_cc_monitor_policy | ( | struct ast_cc_config_params * | config, |
enum ast_cc_monitor_policies | value | ||
) |
Set the cc_monitor_policy.
config | The configuration to set the cc_monitor_policy on |
value | The new cc_monitor_policy we want to change to |
0 | Success |
-1 | Failure (likely due to bad input) |
Definition at line 888 of file ccss.c.
References AST_CC_MONITOR_ALWAYS, ast_cc_config_params::cc_monitor_policy, and value.
Referenced by ast_cc_set_param().
void ast_set_cc_offer_timer | ( | struct ast_cc_config_params * | config, |
unsigned int | value | ||
) |
Set the cc_offer_timer.
config | The configuration to set the cc_offer_timer on |
value | The new cc_offer_timer we want to change to |
void |
Definition at line 905 of file ccss.c.
References ast_log, ast_cc_config_params::cc_offer_timer, LOG_WARNING, and value.
Referenced by ast_cc_set_param().
void ast_set_cc_recall_timer | ( | struct ast_cc_config_params * | config, |
unsigned int | value | ||
) |
Set the cc_recall_timer.
config | The configuration to set the cc_recall_timer on |
value | The new cc_recall_timer we want to change to |
void |
Definition at line 935 of file ccss.c.
References ast_log, ast_cc_config_params::cc_recall_timer, LOG_WARNING, and value.
Referenced by ast_cc_set_param().
void ast_set_ccbs_available_timer | ( | struct ast_cc_config_params * | config, |
unsigned int | value | ||
) |
Set the ccbs_available_timer.
config | The configuration to set the ccbs_available_timer on |
value | The new ccbs_available_timer we want to change to |
void |
Definition at line 950 of file ccss.c.
References ast_log, ast_cc_config_params::ccbs_available_timer, LOG_WARNING, and value.
Referenced by ast_cc_set_param().
void ast_set_ccnr_available_timer | ( | struct ast_cc_config_params * | config, |
unsigned int | value | ||
) |
Set the ccnr_available_timer.
config | The configuration to set the ccnr_available_timer on |
value | The new ccnr_available_timer we want to change to |
void |
Definition at line 920 of file ccss.c.
References ast_log, ast_cc_config_params::ccnr_available_timer, LOG_WARNING, and value.
Referenced by ast_cc_set_param().
int ast_setup_cc_recall_datastore | ( | struct ast_channel * | chan, |
const int | core_id | ||
) |
Set up a CC recall datastore on a channel.
Implementers of protocol-specific CC agents will need to call this function in order for the channel to have the necessary interfaces to recall.
This function must be called by the implementer once it has been detected that an inbound call is a cc_recall. After allocating the channel, call this function, followed by ast_cc_set_cc_interfaces_chanvar. While it would be nice to be able to have the core do this automatically, it just cannot be done given the current architecture.
Definition at line 3405 of file ccss.c.
References ast_calloc, ast_channel_datastore_add(), ast_channel_lock, ast_channel_unlock, ast_datastore_alloc, ast_datastore_free(), ast_free, cc_ref(), cc_unref(), cc_core_instance::core_id, cc_recall_ds_data::core_id, ast_datastore::data, DATASTORE_INHERIT_FOREVER, find_cc_core_instance(), ast_datastore::inheritance, cc_recall_ds_data::interface_tree, cc_core_instance::monitors, and NULL.
Referenced by generic_recall(), and handle_request_invite().
|
static |
Definition at line 3588 of file ccss.c.
References AST_LIST_NEXT, AST_LIST_TRAVERSE, ast_log, ast_str_strlen(), ast_str_truncate(), cc_unique_append(), extension_monitor_pvt::child_dialstrings, ast_cc_interface::device_name, ast_cc_monitor::dialstring, ast_cc_monitor::id, ast_cc_monitor::interface, extension_child_dialstring::is_valid, LOG_ERROR, ast_cc_monitor::next, extension_child_dialstring::original_dialstring, ast_cc_monitor::parent_id, and ast_cc_monitor::private_data.
Referenced by ast_cc_agent_set_interfaces_chanvar(), and ast_set_cc_interfaces_chanvar().
|
static |
Definition at line 2216 of file ccss.c.
References ast_cc_monitor_callbacks::destructor, and find_monitor_callbacks().
Referenced by ast_cc_busy_interface(), and ast_handle_cc_control_frame().
|
static |
Definition at line 3226 of file ccss.c.
References AST_CC_DEVICE_MONITOR, ast_cc_failed(), AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_cc_monitor::available_timer_id, ast_cc_monitor::callbacks, ast_cc_monitor_callbacks::cancel_available_timer, cc_extension_monitor_change_is_valid(), cc_unref(), cc_core_instance::core_id, ast_cc_interface::device_name, has_device_monitors(), ast_cc_monitor::interface, ast_cc_interface::monitor_class, cc_core_instance::monitors, ast_cc_monitor::next, and ast_cc_monitor::parent_id.
Referenced by cc_recalling().
|
static |
Definition at line 3168 of file ccss.c.
References cc_core_instance::agent, AST_CC_AGENT_RESPONSE_SUCCESS, ast_cc_agent::callbacks, CC_CALLER_BUSY, CC_CALLER_REQUESTED, cc_publish_callerstopmonitoring(), cc_publish_requestacknowledged(), cc_core_instance::core_id, ast_cc_agent::device_name, ast_cc_agent_callbacks::respond, and unsuspend().
|
static |
Definition at line 444 of file ccss.c.
References cc_core_instance::agent, args, cc_callback_helper::args, ast_cc_agent::callbacks, cc_callback_helper::function, cc_callback_helper::type, and ast_cc_agent_callbacks::type.
Referenced by ast_cc_agent_callback().
|
static |
Definition at line 2554 of file ccss.c.
References agent_destroy(), ao2_t_alloc, ast_cc_config_params_init, ast_cc_copy_config_params(), ast_channel_get_cc_config_params(), ast_log_dynamic_level, ast_cc_agent::callbacks, cc_generic_agent_destructor(), cc_generic_agent_init(), cc_generic_agent_recall(), cc_generic_agent_respond(), cc_generic_agent_start_monitoring(), cc_generic_agent_start_offer_timer(), cc_generic_agent_status_request(), cc_generic_agent_stop_offer_timer(), cc_generic_agent_stop_ringing(), cc_logger_level, ast_cc_agent::cc_params, cc_unref(), check_callback_sanity(), ast_cc_agent::core_id, ast_cc_agent::device_name, find_agent_callbacks(), ast_cc_agent_callbacks::init, and NULL.
Referenced by cc_core_init_instance().
|
static |
|
static |
Definition at line 4121 of file ccss.c.
References ast_cc_copy_config_params(), ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_copy_string(), cc_control_payload::config_params, ast_datastore::data, cc_control_payload::device_name, dialed_cc_interfaces::dial_parent_id, cc_control_payload::dialstring, cc_control_payload::monitor_type, NULL, cc_control_payload::parent_interface_id, cc_control_payload::private_data, cc_control_payload::service, and service.
Referenced by ast_cc_build_frame(), ast_cc_busy_interface(), and ast_cc_call_failed().
|
static |
Definition at line 3187 of file ccss.c.
References cc_core_instance::agent, ast_cc_agent::callbacks, and ast_cc_agent_callbacks::callee_available.
|
static |
Definition at line 3215 of file ccss.c.
References cc_core_instance::agent, ast_cc_agent::callbacks, cc_publish_callerstartmonitoring(), cc_core_instance::core_id, ast_cc_agent::device_name, ast_cc_agent_callbacks::start_monitoring, and suspend().
|
static |
Definition at line 3064 of file ccss.c.
References cc_core_instance::agent, ast_cc_failed(), ast_log_dynamic_level, ast_cc_agent::callbacks, cc_logger_level, ast_cc_config_params::cc_offer_timer, ast_cc_agent::cc_params, cc_publish_offertimerstart(), cc_core_instance::core_id, ast_cc_agent::device_name, and ast_cc_agent_callbacks::start_offer_timer.
|
static |
Definition at line 3132 of file ccss.c.
References cc_core_instance::agent, AST_CC_AGENT_RESPONSE_FAILURE_TOO_MANY, ast_cc_failed(), ast_cc_request_is_within_limits(), ast_log, ast_cc_agent::callbacks, cc_core_instance::core_id, LOG_WARNING, request_cc(), ast_cc_agent_callbacks::respond, and ast_cc_agent_callbacks::stop_offer_timer.
|
static |
Definition at line 4494 of file ccss.c.
References ao2_container_count(), ao2_t_callback, ast_cli(), ast_free, OBJ_NODATA, and print_stats_cb().
Referenced by handle_cc_status().
|
static |
Definition at line 4461 of file ccss.c.
References AST_CC_DEVICE_MONITOR, ast_cli(), AST_LIST_NEXT, cc_service_to_string(), ast_cc_interface::device_name, ast_cc_monitor::id, ast_cc_monitor::interface, monitor, ast_cc_interface::monitor_class, ast_cc_monitor::next, ast_cc_monitor::parent_id, and ast_cc_monitor::service_offered.
Referenced by print_stats_cb().
|
static |
Definition at line 3257 of file ccss.c.
References cc_core_instance::agent, ao2_t_unlink, cc_publish_recallcomplete(), cc_core_instance::core_id, and ast_cc_agent::device_name.
|
static |
Definition at line 2940 of file ccss.c.
References cc_core_instance::agent, ao2_t_alloc, ao2_t_link, AST_CC_AGENT_GENERIC, ast_cc_is_recall(), ast_channel_get_cc_config_params(), ast_channel_get_device_name(), AST_CHANNEL_NAME, ast_get_cc_agent_policy(), ast_get_cc_max_agents(), ast_log_dynamic_level, cc_agent_init(), cc_core_instance_destructor(), cc_logger_level, cc_ref(), cc_unref(), cc_core_instance::core_id, count_agents(), kill_duplicate_offers(), cc_core_instance::monitors, and NULL.
Referenced by ast_handle_cc_control_frame().
|
static |
Definition at line 423 of file ccss.c.
References CMP_MATCH, CMP_STOP, and cc_core_instance::core_id.
Referenced by load_module().
|
static |
Definition at line 2928 of file ccss.c.
References cc_core_instance::agent, ast_log_dynamic_level, cc_logger_level, cc_unref(), cc_core_instance::core_id, and cc_core_instance::monitors.
Referenced by cc_core_init_instance().
|
static |
Definition at line 417 of file ccss.c.
References cc_core_instance::core_id.
Referenced by load_module().
|
static |
Definition at line 2250 of file ccss.c.
References ao2_t_alloc, ast_atomic_fetchadd_int(), ast_cc_config_params_init, ast_cc_copy_config_params(), AST_CC_DEVICE_MONITOR, ast_log_dynamic_level, ast_strdup, ast_cc_monitor::available_timer_id, ast_cc_monitor::callbacks, cc_interface_destroy(), cc_logger_level, cc_monitor_destroy(), cc_unref(), cc_control_payload::config_params, ast_cc_interface::config_params, ast_cc_monitor::core_id, ast_cc_interface::device_name, ast_cc_monitor::dialstring, find_monitor_callbacks(), ast_cc_monitor::id, ast_cc_monitor::interface, monitor, ast_cc_interface::monitor_class, cc_control_payload::monitor_type, ast_cc_interface::monitor_type, NULL, ast_cc_monitor::parent_id, cc_control_payload::parent_interface_id, cc_control_payload::private_data, ast_cc_monitor::private_data, cc_control_payload::service, and ast_cc_monitor::service_offered.
Referenced by ast_handle_cc_control_frame().
|
static |
Definition at line 3285 of file ccss.c.
References cc_core_instance::agent, args, AST_CC_AGENT_RESPONSE_FAILURE_INVALID, ast_free, ast_log_dynamic_level, ast_cc_agent::callbacks, CC_CALLER_REQUESTED, cc_logger_level, cc_state_to_string(), cc_unref(), ccss_notify_device_state_change(), cc_state_change_args::core_id, cc_state_change_args::core_instance, cc_core_instance::current_state, cc_state_change_args::debug, is_state_change_valid(), ast_cc_agent_callbacks::respond, cc_state_change_args::state, and state_change_funcs.
Referenced by cc_request_state_change().
|
static |
Definition at line 2050 of file ccss.c.
References AST_LIST_TRAVERSE, extension_monitor_pvt::child_dialstrings, extension_child_dialstring::device_name, ast_cc_monitor::id, extension_child_dialstring::is_valid, cc_core_instance::monitors, extension_child_dialstring::next, and ast_cc_monitor::private_data.
Referenced by ast_handle_cc_control_frame(), cancel_available_timer(), cc_monitor_failed(), request_cc(), suspend(), and unsuspend().
|
static |
Definition at line 1821 of file ccss.c.
References ast_free, AST_LIST_REMOVE_HEAD, extension_monitor_pvt::child_dialstrings, and extension_child_dialstring::next.
Referenced by cc_monitor_destroy().
|
static |
Definition at line 2089 of file ccss.c.
References ao2_t_alloc, ast_atomic_fetchadd_int(), AST_CC_EXTENSION_MONITOR, ast_log_dynamic_level, AST_MAX_EXTENSION, ast_str_alloca, ast_str_buffer(), ast_str_set(), ast_str_strlen(), cc_interface_destroy(), cc_logger_level, cc_monitor_destroy(), cc_unref(), ast_cc_interface::device_name, extension_monitor_pvt_init(), ast_cc_monitor::id, ast_cc_monitor::interface, monitor, ast_cc_interface::monitor_class, ast_cc_interface::monitor_type, NULL, ast_cc_monitor::parent_id, ast_cc_monitor::private_data, and str.
Referenced by ast_cc_call_init(), and cc_interfaces_datastore_init().
|
static |
Definition at line 3266 of file ccss.c.
References cc_core_instance::agent, ao2_t_unlink, cc_publish_failure(), cc_core_instance::core_id, cc_state_change_args::debug, and ast_cc_agent::device_name.
|
static |
Definition at line 2911 of file ccss.c.
References ast_free, cc_generic_agent_stop_offer_timer(), ast_cc_agent::private_data, stasis_unsubscribe(), and cc_generic_agent_pvt::sub.
Referenced by cc_agent_init().
|
static |
Definition at line 2669 of file ccss.c.
References ast_calloc, AST_CC_AGENT_SKIP_OFFER, ast_channel_caller(), ast_channel_context(), ast_channel_exten(), ast_channel_macrocontext(), ast_channel_macroexten(), ast_copy_string(), ast_set_flag, cc_generic_agent_pvt::cid_name, cc_generic_agent_pvt::cid_num, cc_generic_agent_pvt::context, cc_generic_agent_pvt::exten, name, cc_generic_agent_pvt::offer_timer_id, ast_cc_agent::private_data, and S_OR.
Referenced by cc_agent_init().
|
static |
Definition at line 2895 of file ccss.c.
References ast_cc_agent_caller_busy(), ast_pthread_create_detached_background, cc_generic_is_device_available(), ast_cc_agent::core_id, ast_cc_agent::device_name, generic_recall(), and NULL.
Referenced by cc_agent_init().
|
static |
Definition at line 2735 of file ccss.c.
Referenced by cc_agent_init().
|
static |
Definition at line 2791 of file ccss.c.
References ast_assert, ast_device_state_message_type(), ast_device_state_topic(), ast_str_alloca, ast_str_set(), cc_ref(), ast_cc_agent::device_name, generic_agent_devstate_cb(), NULL, ast_cc_agent::private_data, stasis_subscribe, stasis_subscription_accept_message_type(), stasis_subscription_change_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, stasis_subscription_set_filter(), str, and cc_generic_agent_pvt::sub.
Referenced by cc_agent_init().
|
static |
Definition at line 2703 of file ccss.c.
References ast_assert, ast_get_cc_offer_timer(), ast_log_dynamic_level, ast_sched_add(), cc_logger_level, ast_cc_agent::cc_params, cc_ref(), ast_cc_agent::core_id, NULL, offer_timer_expire(), cc_generic_agent_pvt::offer_timer_id, and ast_cc_agent::private_data.
Referenced by cc_agent_init().
|
static |
Definition at line 2743 of file ccss.c.
References ast_cc_agent_status_response(), ast_cc_agent::core_id, and ast_cc_agent::device_name.
Referenced by cc_agent_init().
|
static |
Definition at line 2722 of file ccss.c.
References ast_sched_del(), cc_unref(), cc_generic_agent_pvt::offer_timer_id, and ast_cc_agent::private_data.
Referenced by cc_agent_init(), and cc_generic_agent_destructor().
|
static |
Definition at line 2749 of file ccss.c.
References ast_channel_get_by_name_prefix(), ast_softhangup(), AST_SOFTHANGUP_EXPLICIT, and ast_cc_agent::device_name.
Referenced by cc_agent_init().
|
static |
Definition at line 1313 of file ccss.c.
References AST_DEVICE_NOT_INUSE, AST_DEVICE_UNKNOWN, cc_generic_monitor_cancel_available_timer(), cc_generic_monitor_destructor(), cc_generic_monitor_request_cc(), cc_generic_monitor_suspend(), cc_generic_monitor_unsuspend(), and monitor.
Referenced by cc_generic_agent_recall(), cc_generic_monitor_destructor(), cc_generic_monitor_suspend(), cc_generic_monitor_unsuspend(), generic_agent_devstate_cb(), and generic_monitor_devstate_tp_cb().
|
static |
Definition at line 1651 of file ccss.c.
References ast_assert, ast_log_dynamic_level, ast_sched_del(), cc_logger_level, cc_unref(), ast_cc_monitor::core_id, ast_cc_interface::device_name, ast_cc_monitor::interface, and NULL.
Referenced by cc_generic_is_device_available().
|
static |
Definition at line 1668 of file ccss.c.
References ao2_t_unlink, ast_cc_monitor_callee_available(), ast_free, AST_LIST_EMPTY, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log_dynamic_level, cc_generic_is_device_available(), cc_logger_level, cc_unref(), generic_monitor_instance::core_id, generic_monitor_pvt::core_id, generic_monitor_instance_list::current_state, generic_monitor_pvt::device_name, find_generic_monitor_instance_list(), generic_monitor_instance_list::fit_for_recall, generic_monitor_instance::is_suspended, generic_monitor_instance_list::list, generic_monitor_instance::monitoring, and generic_monitor_instance::next.
Referenced by cc_generic_is_device_available().
|
static |
Definition at line 1519 of file ccss.c.
References ast_calloc, ast_cc_available_timer_expire(), AST_CC_CCBS, AST_CC_CCNL, AST_CC_CCNR, ast_cc_monitor_request_acked(), ast_free, ast_get_ccbs_available_timer(), ast_get_ccnr_available_timer(), AST_LIST_INSERT_TAIL, ast_sched_add(), ast_strdup, cc_ref(), cc_unref(), ast_cc_interface::config_params, ast_cc_monitor::core_id, generic_monitor_instance::core_id, generic_monitor_pvt::core_id, create_new_generic_list(), ast_cc_interface::device_name, generic_monitor_pvt::device_name, find_generic_monitor_instance_list(), generic_monitor_instance_list::fit_for_recall, ast_cc_monitor::interface, generic_monitor_instance_list::list, generic_monitor_instance::monitoring, ast_cc_monitor::private_data, service, and ast_cc_monitor::service_offered.
Referenced by cc_generic_is_device_available().
|
static |
Definition at line 1582 of file ccss.c.
References ast_cc_monitor_callee_available(), AST_LIST_TRAVERSE, cc_generic_is_device_available(), cc_unref(), ast_cc_monitor::core_id, generic_monitor_instance::core_id, ast_cc_interface::device_name, find_generic_monitor_instance_list(), ast_cc_monitor::interface, generic_monitor_instance::is_suspended, generic_monitor_instance_list::list, and generic_monitor_instance::next.
Referenced by cc_generic_is_device_available().
|
static |
Definition at line 1623 of file ccss.c.
References ast_cc_monitor_callee_available(), AST_LIST_TRAVERSE, cc_generic_is_device_available(), cc_unref(), ast_cc_monitor::core_id, generic_monitor_instance::core_id, ast_cc_interface::device_name, find_generic_monitor_instance_list(), ast_cc_monitor::interface, generic_monitor_instance::is_suspended, generic_monitor_instance_list::list, and generic_monitor_instance::monitoring.
Referenced by cc_generic_is_device_available().
|
static |
Definition at line 1737 of file ccss.c.
References ast_cc_config_params_destroy(), ast_log_dynamic_level, and cc_logger_level.
Referenced by cc_device_monitor_init(), and cc_extension_monitor_init().
|
static |
Definition at line 1858 of file ccss.c.
References AST_LIST_HEAD_DESTROY, AST_LIST_REMOVE_HEAD, ast_cc_monitor::available_timer_id, ast_cc_monitor::callbacks, ast_cc_monitor_callbacks::cancel_available_timer, cc_unref(), monitor, and ast_cc_monitor::next.
Referenced by cc_interfaces_datastore_init().
|
static |
Definition at line 2138 of file ccss.c.
References ao2_t_alloc, ast_atomic_fetchadd_int(), ast_calloc, ast_cc_request_is_within_limits(), ast_channel_context(), ast_channel_datastore_add(), ast_channel_exten(), ast_channel_lock, ast_channel_macrocontext(), ast_channel_macroexten(), ast_channel_unlock, ast_datastore_alloc, ast_datastore_free(), ast_free, AST_LIST_HEAD_INIT, AST_LIST_INSERT_TAIL, cc_extension_monitor_init(), cc_interface_tree_destroy(), cc_ref(), cc_unref(), ast_cc_monitor::core_id, dialed_cc_interfaces::core_id, core_id_counter, ast_datastore::data, DATASTORE_INHERIT_FOREVER, dialed_cc_interfaces::dial_parent_id, ast_cc_monitor::id, ast_datastore::inheritance, dialed_cc_interfaces::interface_tree, interfaces, dialed_cc_interfaces::is_original_caller, monitor, ast_datastore::next, NULL, and S_OR.
Referenced by ast_cc_call_init().
|
static |
Definition at line 1837 of file ccss.c.
References AST_CC_EXTENSION_MONITOR, ast_free, ast_log_dynamic_level, ast_cc_monitor::callbacks, cc_extension_monitor_destructor(), cc_logger_level, cc_unref(), ast_cc_monitor::core_id, ast_cc_monitor_callbacks::destructor, ast_cc_interface::device_name, ast_cc_monitor::dialstring, ast_cc_monitor::interface, ast_cc_interface::monitor_class, and ast_cc_monitor::private_data.
Referenced by cc_device_monitor_init(), and cc_extension_monitor_init().
|
static |
Definition at line 3896 of file ccss.c.
References AST_CC_DEVICE_MONITOR, ast_cc_failed(), ast_free, AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_log_dynamic_level, ast_cc_monitor::available_timer_id, ast_cc_monitor::callbacks, ast_cc_monitor_callbacks::cancel_available_timer, cc_extension_monitor_change_is_valid(), cc_logger_level, cc_publish_monitorfailed(), cc_unref(), cc_core_instance::core_id, ast_cc_monitor::core_id, ast_cc_monitor_failure_data::core_id, ast_cc_monitor_failure_data::debug, ast_cc_interface::device_name, ast_cc_monitor_failure_data::device_name, find_cc_core_instance(), has_device_monitors(), ast_cc_monitor::interface, ast_cc_interface::monitor_class, cc_core_instance::monitors, ast_cc_monitor::next, and ast_cc_monitor::parent_id.
Referenced by ast_cc_monitor_failed().
|
static |
Definition at line 3740 of file ccss.c.
References CC_CALLER_OFFERED, and cc_request_state_change().
Referenced by ast_cc_offer().
|
static |
Definition at line 4039 of file ccss.c.
References cc_core_instance::agent, ast_cc_agent::callbacks, cc_unref(), and ast_cc_agent_callbacks::party_b_free.
Referenced by ast_cc_monitor_party_b_free().
|
static |
Definition at line 1023 of file ccss.c.
References ao2_ref, ast_json_object_update(), ast_json_pack(), ast_json_payload_create(), ast_json_unref(), ast_system_topic(), stasis_message_create(), and stasis_publish().
Referenced by cc_publish_available(), cc_publish_callerrecalling(), cc_publish_callerstartmonitoring(), cc_publish_callerstopmonitoring(), cc_publish_failure(), cc_publish_monitorfailed(), cc_publish_offertimerstart(), cc_publish_recallcomplete(), cc_publish_requestacknowledged(), and cc_publish_requested().
|
static |
Definition at line 1063 of file ccss.c.
References ast_cc_available_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by ast_handle_cc_control_frame().
|
static |
Definition at line 1132 of file ccss.c.
References ast_cc_callerrecalling_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by cc_recalling().
|
static |
Definition at line 1121 of file ccss.c.
References ast_cc_callerstartmonitoring_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by cc_caller_busy().
|
static |
Definition at line 1110 of file ccss.c.
References ast_cc_callerstopmonitoring_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by cc_active().
|
static |
Definition at line 1154 of file ccss.c.
References ast_cc_failure_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by cc_failed().
|
static |
Definition at line 1166 of file ccss.c.
References ast_cc_monitorfailed_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by cc_monitor_failed().
|
static |
Definition at line 1075 of file ccss.c.
References ast_cc_offertimerstart_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by cc_caller_offered().
|
static |
Definition at line 1143 of file ccss.c.
References ast_cc_recallcomplete_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by cc_complete().
|
static |
Definition at line 1099 of file ccss.c.
References ast_cc_requestacknowledged_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by cc_active().
|
static |
Definition at line 1087 of file ccss.c.
References ast_cc_requested_type(), ast_json_pack(), ast_json_unref(), and cc_publish().
Referenced by request_cc().
|
static |
Definition at line 3392 of file ccss.c.
References ast_free, cc_unref(), and cc_recall_ds_data::interface_tree.
|
static |
Definition at line 3378 of file ccss.c.
References ast_calloc, cc_ref(), cc_recall_ds_data::core_id, cc_recall_ds_data::interface_tree, cc_recall_ds_data::nested, and NULL.
|
static |
Definition at line 3248 of file ccss.c.
References cc_core_instance::agent, cancel_available_timer(), cc_publish_callerrecalling(), cc_core_instance::core_id, and ast_cc_agent::device_name.
|
inlinestatic |
Definition at line 143 of file ccss.c.
References ao2_t_ref.
Referenced by ast_cc_agent_callback(), ast_cc_call_init(), ast_cc_get_monitor_by_recall_core_id(), ast_handle_cc_control_frame(), ast_setup_cc_recall_datastore(), cc_core_init_instance(), cc_generic_agent_start_monitoring(), cc_generic_agent_start_offer_timer(), cc_generic_monitor_request_cc(), cc_interfaces_datastore_init(), cc_recall_ds_duplicate(), and dialed_cc_interfaces_duplicate().
|
static |
Definition at line 3328 of file ccss.c.
References args, ast_calloc, ast_free, ast_log_dynamic_level, ast_taskprocessor_push(), cc_do_state_change(), cc_logger_level, cc_unref(), cc_state_change_args::core_id, cc_state_change_args::core_instance, cc_state_change_args::debug, dummy(), find_cc_core_instance(), state, and cc_state_change_args::state.
Referenced by ast_cc_agent_accept_request(), ast_cc_agent_caller_available(), ast_cc_agent_caller_busy(), ast_cc_agent_recalling(), ast_cc_completed(), ast_cc_failed(), ast_cc_monitor_callee_available(), ast_cc_monitor_request_acked(), and cc_offer().
|
static |
Definition at line 412 of file ccss.c.
References cc_service_to_string_map, and service.
Referenced by ast_handle_cc_control_frame(), and cc_cli_print_monitor_stats().
|
static |
Definition at line 584 of file ccss.c.
References state.
Referenced by ccss_device_state(), and ccss_notify_device_state_change().
|
static |
Definition at line 407 of file ccss.c.
References cc_state_to_string_map, and state.
Referenced by cc_do_state_change(), ccss_device_state(), ccss_notify_device_state_change(), and print_stats_cb().
|
static |
Definition at line 3976 of file ccss.c.
References cc_core_instance::agent, ast_cc_agent::callbacks, cc_unref(), and ast_cc_agent_callbacks::status_request.
Referenced by ast_cc_monitor_status_request().
|
static |
Definition at line 4072 of file ccss.c.
References args, AST_CC_DEVICE_MONITOR, ast_free, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_cc_monitor::callbacks, cc_unref(), cc_status_response_args::core_instance, cc_status_response_args::devstate, ast_cc_monitor::interface, ast_cc_interface::monitor_class, cc_core_instance::monitors, ast_cc_monitor::next, and ast_cc_monitor_callbacks::status_response.
Referenced by ast_cc_agent_status_response().
|
static |
Definition at line 4002 of file ccss.c.
References cc_core_instance::agent, ast_cc_monitor_request_acked(), ast_cc_agent::callbacks, cc_unref(), cc_core_instance::core_id, ast_cc_agent::device_name, and ast_cc_agent_callbacks::stop_ringing.
Referenced by ast_cc_monitor_stop_ringing().
|
static |
Definition at line 3558 of file ccss.c.
References AST_CHANNEL_NAME, ast_str_append(), ast_str_buffer(), and ast_strlen_zero.
Referenced by build_cc_interfaces_chanvar().
|
inlinestatic |
Definition at line 149 of file ccss.c.
References ao2_t_ref, and NULL.
Referenced by ast_cc_agent_callback(), ast_cc_agent_status_response(), ast_cc_available_timer_expire(), ast_cc_call_init(), ast_cc_get_monitor_by_recall_core_id(), ast_cc_monitor_party_b_free(), ast_cc_monitor_status_request(), ast_cc_monitor_stop_ringing(), ast_handle_cc_control_frame(), ast_setup_cc_recall_datastore(), cancel_available_timer(), cc_agent_init(), cc_core_init_instance(), cc_core_instance_destructor(), cc_device_monitor_init(), cc_do_state_change(), cc_extension_monitor_init(), cc_generic_agent_stop_offer_timer(), cc_generic_monitor_cancel_available_timer(), cc_generic_monitor_destructor(), cc_generic_monitor_request_cc(), cc_generic_monitor_suspend(), cc_generic_monitor_unsuspend(), cc_interface_tree_destroy(), cc_interfaces_datastore_init(), cc_monitor_destroy(), cc_monitor_failed(), cc_party_b_free(), cc_recall_ds_destroy(), cc_request_state_change(), cc_status_request(), cc_status_response(), cc_stop_ringing(), cccancel_exec(), ccreq_exec(), ccss_device_state(), complete_core_id(), create_new_generic_list(), dialed_cc_interfaces_destroy(), generic_agent_devstate_cb(), generic_monitor_devstate_tp_cb(), offer_timer_expire(), request_cc(), suspend(), and unsuspend().
|
static |
Definition at line 4308 of file ccss.c.
References cc_core_instance::agent, ao2_t_callback_data, ast_cc_failed(), ast_channel_get_device_name(), AST_CHANNEL_NAME, ast_log, ast_log_dynamic_level, ast_cc_agent::callbacks, cc_logger_level, cc_unref(), cc_core_instance::core_id, LOG_WARNING, match_agent(), MATCH_REQUEST, pbx_builtin_setvar_helper(), and ast_cc_agent_callbacks::type.
Referenced by load_module().
|
static |
Definition at line 4257 of file ccss.c.
References cc_core_instance::agent, ao2_t_callback_data, ast_cc_agent_accept_request(), ast_cc_failed(), ast_cc_request_is_within_limits(), ast_channel_get_device_name(), AST_CHANNEL_NAME, ast_log_dynamic_level, ast_cc_agent::callbacks, cc_logger_level, cc_unref(), cc_core_instance::core_id, match_agent(), MATCH_NO_REQUEST, pbx_builtin_setvar_helper(), and ast_cc_agent_callbacks::type.
Referenced by load_module().
|
static |
Definition at line 600 of file ccss.c.
References cc_core_instance::agent, ao2_t_callback_data, ast_log_dynamic_level, ast_cc_agent::callbacks, CC_FAILED, cc_logger_level, cc_state_to_devstate(), cc_state_to_string(), cc_unref(), cc_core_instance::core_id, cc_core_instance::current_state, match_agent(), MATCH_NO_REQUEST, and ast_cc_agent_callbacks::type.
Referenced by load_module().
|
static |
Definition at line 641 of file ccss.c.
References ast_devstate2str(), AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_log_dynamic_level, cc_logger_level, cc_state_to_devstate(), and cc_state_to_string().
Referenced by cc_do_state_change().
|
static |
Definition at line 2532 of file ccss.c.
References ast_assert, ast_cc_agent_callbacks::callee_available, ast_cc_agent_callbacks::destructor, ast_cc_agent_callbacks::init, NULL, ast_cc_agent_callbacks::respond, ast_cc_agent_callbacks::start_monitoring, ast_cc_agent_callbacks::start_offer_timer, ast_cc_agent_callbacks::status_request, and ast_cc_agent_callbacks::stop_offer_timer.
Referenced by cc_agent_init().
|
static |
Definition at line 4555 of file ccss.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_t_iterator_next, ast_cli_completion_add(), ast_strdup, cc_unref(), cc_core_instance::core_id, and NULL.
Referenced by handle_cc_kill().
|
static |
Definition at line 2506 of file ccss.c.
References ao2_t_callback_data, ast_log_dynamic_level, cc_logger_level, count_agents_cb_data::core_id_exception, count_agents_cb_data::count, count_agents_cb(), and OBJ_NODATA.
Referenced by cc_core_init_instance().
|
static |
Definition at line 530 of file ccss.c.
References cc_core_instance::agent, ast_log_dynamic_level, CC_CALLER_REQUESTED, cc_logger_level, cc_core_instance::core_id, count_agents_cb_data::core_id_exception, count_agents_cb_data::count, cc_core_instance::current_state, ast_cc_agent::device_name, and name.
Referenced by count_agents().
|
static |
Definition at line 4348 of file ccss.c.
References AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, count_monitors_cb_data::count, ast_cc_interface::device_name, count_monitors_cb_data::device_name, ast_cc_monitor::interface, ast_cc_interface::monitor_type, count_monitors_cb_data::monitor_type, cc_core_instance::monitors, and ast_cc_monitor::next.
Referenced by ast_cc_monitor_count().
|
static |
Definition at line 1409 of file ccss.c.
References ao2_t_alloc, ao2_t_link, ast_device_state_message_type(), ast_device_state_topic(), ast_strdup, ast_tech_to_upper(), cc_unref(), generic_monitor_instance_list::current_state, ast_cc_interface::device_name, generic_monitor_instance_list::device_name, generic_monitor_instance_list_destructor(), ast_cc_monitor::interface, NULL, stasis_subscribe, stasis_subscription_accept_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, stasis_subscription_set_filter(), and generic_monitor_instance_list::sub.
Referenced by cc_generic_monitor_request_cc().
|
static |
Definition at line 1944 of file ccss.c.
References ast_free, cc_unref(), and dialed_cc_interfaces::interface_tree.
|
static |
Definition at line 1964 of file ccss.c.
References ast_calloc, cc_ref(), dialed_cc_interfaces::core_id, dialed_cc_interfaces::dial_parent_id, dialed_cc_interfaces::ignore, dialed_cc_interfaces::interface_tree, dialed_cc_interfaces::is_original_caller, and NULL.
|
static |
Definition at line 1995 of file ccss.c.
References ast_calloc, AST_LIST_HEAD_INIT_NOLOCK, extension_monitor_pvt::child_dialstrings, and NULL.
Referenced by cc_extension_monitor_init().
|
static |
Definition at line 1269 of file ccss.c.
References AST_CC_AGENT_GENERIC, AST_CC_AGENT_NATIVE, ast_channel_get_cc_agent_type(), ast_channel_get_cc_config_params(), ast_copy_string(), ast_get_cc_agent_policy(), ast_log_dynamic_level, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, cc_agent_backend::callbacks, cc_logger_level, NULL, type, and ast_cc_agent_callbacks::type.
Referenced by cc_agent_init().
|
static |
Definition at line 431 of file ccss.c.
References ao2_t_find, cc_core_instance::core_id, and OBJ_POINTER.
Referenced by ast_cc_agent_status_response(), ast_cc_get_monitor_by_recall_core_id(), ast_cc_monitor_party_b_free(), ast_cc_monitor_status_request(), ast_cc_monitor_stop_ringing(), ast_handle_cc_control_frame(), ast_setup_cc_recall_datastore(), cc_monitor_failed(), and cc_request_state_change().
|
static |
Definition at line 1386 of file ccss.c.
References ao2_t_find, ast_strdupa, ast_tech_to_upper(), generic_monitor_instance_list::device_name, and OBJ_POINTER.
Referenced by cc_generic_monitor_destructor(), cc_generic_monitor_request_cc(), cc_generic_monitor_suspend(), cc_generic_monitor_unsuspend(), and generic_monitor_devstate_tp_cb().
|
static |
Definition at line 1200 of file ccss.c.
References ast_log_dynamic_level, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, cc_monitor_backend::callbacks, cc_logger_level, NULL, and ast_cc_monitor_callbacks::type.
Referenced by call_destructor_with_no_monitor(), and cc_device_monitor_init().
|
static |
Definition at line 2761 of file ccss.c.
References ast_cc_agent_caller_available(), ast_device_state_message_type(), cc_generic_is_device_available(), cc_unref(), ast_cc_agent::core_id, ast_cc_agent::device_name, ast_device_state_message::eid, ast_cc_agent::private_data, stasis_message_data(), stasis_message_type(), stasis_subscription_final_message(), stasis_unsubscribe(), ast_device_state_message::state, and cc_generic_agent_pvt::sub.
Referenced by cc_generic_agent_start_monitoring().
|
static |
Definition at line 1484 of file ccss.c.
References ao2_cleanup, ao2_t_ref, ast_device_state_message_type(), ast_taskprocessor_push(), ast_device_state_message::eid, generic_monitor_devstate_tp_cb(), stasis_message_data(), and stasis_message_type().
Referenced by generic_monitor_instance_list_destructor().
|
static |
Definition at line 1443 of file ccss.c.
References ao2_cleanup, ast_cc_monitor_callee_available(), AST_DEVICE_BUSY, AST_DEVICE_INUSE, AST_DEVICE_UNAVAILABLE, AST_LIST_TRAVERSE, cc_generic_is_device_available(), cc_unref(), generic_monitor_instance::core_id, generic_monitor_instance_list::current_state, find_generic_monitor_instance_list(), generic_monitor_instance_list::fit_for_recall, generic_monitor_instance::is_suspended, generic_monitor_instance_list::list, generic_monitor_instance::monitoring, generic_monitor_instance::next, and RAII_VAR.
Referenced by generic_monitor_devstate_cb().
|
static |
Definition at line 1396 of file ccss.c.
References ast_free, AST_LIST_REMOVE_HEAD, generic_monitor_instance_list::device_name, generic_monitor_devstate_cb(), generic_monitor_instance_list::list, generic_monitor_instance::next, stasis_unsubscribe(), sub, and generic_monitor_instance_list::sub.
Referenced by create_new_generic_list().
|
static |
Definition at line 2816 of file ccss.c.
References ao2_ref, ast_app_exec_macro(), ast_app_exec_sub(), ast_cc_agent_recalling(), ast_cc_agent_set_interfaces_chanvar(), ast_cc_failed(), ast_channel_context_set(), ast_channel_exten_set(), ast_channel_priority_set(), ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_slin, ast_get_cc_callback_macro(), ast_get_cc_callback_sub(), ast_get_cc_recall_timer(), ast_hangup(), ast_log_dynamic_level, ast_pbx_start(), ast_request_and_dial(), ast_setup_cc_recall_datastore(), ast_strlen_zero, cc_logger_level, cc_generic_agent_pvt::cid_name, cc_generic_agent_pvt::cid_num, cc_generic_agent_pvt::context, cc_generic_agent_pvt::exten, NULL, pbx_builtin_setvar_helper(), ast_cc_agent::private_data, and S_OR.
Referenced by cc_generic_agent_recall().
|
static |
Definition at line 4577 of file ccss.c.
References ao2_t_callback, ast_cli_args::argc, ast_cli_args::argv, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_core_id(), cc_core_instance::core_id, errno, kill_cores(), NULL, OBJ_NODATA, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 4511 of file ccss.c.
References ast_cli_args::argc, ast_free, ast_malloc, ast_taskprocessor_push(), cc_cli_output_status(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, NULL, and ast_cli_entry::usage.
|
static |
check if the core instance has any device monitors
In any case where we end up removing a device monitor from the list of device monitors, it is important to see what the state of the list is afterwards. If we find that we only have extension monitors left, then no devices are actually being monitored. In such a case, we need to declare that CC has failed for this call. This function helps those cases to determine if they should declare failure.
core_instance | The core instance we are checking for the existence of device monitors |
0 | No device monitors exist on this core_instance |
1 | There is still at least 1 device monitor remaining |
Definition at line 3093 of file ccss.c.
References AST_CC_DEVICE_MONITOR, AST_LIST_TRAVERSE, ast_cc_monitor::interface, ast_cc_interface::monitor_class, cc_core_instance::monitors, and ast_cc_monitor::next.
Referenced by cancel_available_timer(), cc_monitor_failed(), request_cc(), suspend(), and unsuspend().
|
static |
Definition at line 4436 of file ccss.c.
References ast_config_destroy(), ast_config_load2(), ast_log, CC_ACTIVE, CC_AVAILABLE, CC_CALLEE_READY, CC_CALLER_BUSY, CC_CALLER_OFFERED, CC_CALLER_REQUESTED, CC_COMPLETE, CC_FAILED, CC_RECALLING, CONFIG_STATUS_FILEINVALID, initialize_cc_devstate_map_helper(), and LOG_WARNING.
Referenced by load_module().
|
static |
Definition at line 4412 of file ccss.c.
References AST_DEVICE_UNKNOWN, ast_devstate_val(), ast_variable_retrieve(), and state.
Referenced by initialize_cc_devstate_map().
|
static |
Definition at line 4377 of file ccss.c.
References ast_config_destroy(), ast_config_load2(), ast_log, ast_strlen_zero, ast_variable_retrieve(), CONFIG_STATUS_FILEINVALID, global_cc_max_requests, GLOBAL_CC_MAX_REQUESTS_DEFAULT, and LOG_WARNING.
Referenced by load_module().
|
static |
Definition at line 3001 of file ccss.c.
References AST_CC_AGENT_SKIP_OFFER, ast_log_dynamic_level, ast_test_flag, CC_ACTIVE, CC_AVAILABLE, CC_CALLEE_READY, CC_CALLER_BUSY, CC_CALLER_OFFERED, CC_CALLER_REQUESTED, CC_COMPLETE, CC_FAILED, cc_logger_level, CC_RECALLING, and ast_cc_agent::core_id.
Referenced by cc_do_state_change().
|
static |
Definition at line 4544 of file ccss.c.
References ast_cc_failed(), and cc_core_instance::core_id.
Referenced by handle_cc_kill().
|
static |
Definition at line 2515 of file ccss.c.
References ao2_iterator_destroy(), ao2_t_callback_data, match_agent(), MATCH_NO_REQUEST, OBJ_MULTIPLE, and OBJ_UNLINK.
Referenced by cc_core_init_instance().
|
static |
Definition at line 4653 of file ccss.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_t_container_alloc_hash, ARRAY_LEN, ast_cc_agent_register(), ast_cc_monitor_register(), ast_cli_register_multiple, ast_devstate_prov_add(), ast_logger_register_level(), AST_MODFLAG_GLOBAL_SYMBOLS, AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CORE, AST_MODULE_INFO(), AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_CORE, ast_register_application2(), ast_sched_context_create(), ast_sched_start_thread(), ast_taskprocessor_get(), ASTERISK_GPL_KEY, cc_core_instance_cmp_fn(), cc_core_instance_hash_fn(), CC_CORE_INSTANCES_BUCKETS, cc_logger_level, CC_LOGGER_LEVEL_NAME, cccancel_exec(), ccreq_exec(), ccss_device_state(), initialize_cc_devstate_map(), initialize_cc_max_requests(), NULL, TPS_REF_DEFAULT, and unload_module().
|
static |
Definition at line 492 of file ccss.c.
References cc_core_instance::agent, CC_CALLER_REQUESTED, CMP_MATCH, CMP_STOP, cc_core_instance::current_state, ast_cc_agent::device_name, MATCH_NO_REQUEST, MATCH_REQUEST, and name.
Referenced by cccancel_exec(), ccreq_exec(), ccss_device_state(), and kill_duplicate_offers().
|
static |
Definition at line 743 of file ccss.c.
References AST_CC_MONITOR_ALWAYS, AST_CC_MONITOR_GENERIC, AST_CC_MONITOR_NATIVE, and AST_CC_MONITOR_NEVER.
Referenced by ast_cc_get_param().
|
static |
Definition at line 2691 of file ccss.c.
References ast_cc_failed(), ast_log_dynamic_level, cc_logger_level, cc_unref(), ast_cc_agent::core_id, ast_cc_agent::device_name, cc_generic_agent_pvt::offer_timer_id, and ast_cc_agent::private_data.
Referenced by cc_generic_agent_start_offer_timer().
|
static |
Definition at line 4481 of file ccss.c.
References cc_core_instance::agent, ast_cli(), AST_LIST_FIRST, AST_LIST_LOCK, AST_LIST_UNLOCK, cc_cli_print_monitor_stats(), cc_state_to_string(), cc_core_instance::core_id, cc_core_instance::current_state, ast_cc_agent::device_name, and cc_core_instance::monitors.
Referenced by cc_cli_output_status().
|
static |
Definition at line 3108 of file ccss.c.
References cc_core_instance::agent, AST_CC_DEVICE_MONITOR, ast_cc_failed(), AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_cc_monitor::available_timer_id, ast_cc_monitor::callbacks, cc_extension_monitor_change_is_valid(), cc_publish_requested(), cc_unref(), cc_core_instance::core_id, ast_cc_interface::device_name, ast_cc_agent::device_name, has_device_monitors(), ast_cc_monitor::interface, ast_cc_interface::monitor_class, cc_core_instance::monitors, ast_cc_monitor::next, ast_cc_monitor::parent_id, and ast_cc_monitor_callbacks::request_cc.
Referenced by cc_caller_requested().
|
static |
Definition at line 698 of file ccss.c.
References AST_CC_AGENT_GENERIC, AST_CC_AGENT_NATIVE, AST_CC_AGENT_NEVER, ast_log, and LOG_WARNING.
Referenced by ast_cc_set_param().
|
static |
Definition at line 712 of file ccss.c.
References AST_CC_MONITOR_ALWAYS, AST_CC_MONITOR_GENERIC, AST_CC_MONITOR_NATIVE, AST_CC_MONITOR_NEVER, ast_log, and LOG_WARNING.
Referenced by ast_cc_set_param().
|
static |
Definition at line 3193 of file ccss.c.
References AST_CC_DEVICE_MONITOR, ast_cc_failed(), AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_cc_monitor::callbacks, cc_extension_monitor_change_is_valid(), cc_unref(), cc_core_instance::core_id, ast_cc_interface::device_name, has_device_monitors(), ast_cc_monitor::interface, ast_cc_interface::monitor_class, cc_core_instance::monitors, ast_cc_monitor::next, ast_cc_monitor::parent_id, and ast_cc_monitor_callbacks::suspend.
Referenced by cc_caller_busy(), handle_bridge_technology_suspend(), and handle_controlstreamfile().
|
static |
Definition at line 4623 of file ccss.c.
References ao2_t_ref, ARRAY_LEN, ast_cc_agent_unregister(), ast_cc_monitor_unregister(), ast_cli_unregister_multiple(), ast_devstate_prov_del(), ast_logger_unregister_level(), ast_sched_context_destroy(), ast_taskprocessor_unreference(), ast_unregister_application(), CC_LOGGER_LEVEL_NAME, and NULL.
Referenced by load_module().
|
static |
Definition at line 3146 of file ccss.c.
References AST_CC_DEVICE_MONITOR, ast_cc_failed(), AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_cc_monitor::callbacks, cc_extension_monitor_change_is_valid(), cc_unref(), cc_core_instance::core_id, ast_cc_interface::device_name, has_device_monitors(), ast_cc_monitor::interface, ast_cc_interface::monitor_class, cc_core_instance::monitors, ast_cc_monitor::next, ast_cc_monitor::parent_id, and ast_cc_monitor_callbacks::unsuspend.
Referenced by cc_active().
|
static |
|
static |
struct cc_agent_backends cc_agent_backends = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
|
static |
|
static |
|
static |
Definition at line 326 of file ccss.c.
Referenced by load_module().
|
static |
|
static |
Definition at line 662 of file ccss.c.
Referenced by ast_cc_default_config_params().
|
static |
Logger level registered by the CC core.
Definition at line 133 of file ccss.c.
Referenced by ast_cc_agent_set_interfaces_chanvar(), ast_cc_call_init(), ast_cc_monitor_count(), ast_handle_cc_control_frame(), ast_set_cc_interfaces_chanvar(), cc_agent_init(), cc_caller_offered(), cc_core_init_instance(), cc_core_instance_destructor(), cc_device_monitor_init(), cc_do_state_change(), cc_extension_monitor_init(), cc_generic_agent_start_offer_timer(), cc_generic_monitor_cancel_available_timer(), cc_generic_monitor_destructor(), cc_interface_destroy(), cc_monitor_destroy(), cc_monitor_failed(), cc_request_state_change(), cccancel_exec(), ccreq_exec(), ccss_device_state(), ccss_notify_device_state_change(), count_agents(), count_agents_cb(), find_agent_callbacks(), find_monitor_callbacks(), generic_recall(), is_state_change_valid(), load_module(), and offer_timer_expire().
|
static |
Name printed on all CC log messages.
Definition at line 129 of file ccss.c.
Referenced by load_module(), and unload_module().
struct cc_monitor_backends cc_monitor_backends = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
|
static |
The current number of CC requests in the system
Definition at line 141 of file ccss.c.
Referenced by ast_cc_request_is_within_limits().
|
static |
The ast_sched_context used for all generic CC timeouts
const { ... } cc_service_to_string_map[] |
Referenced by cc_service_to_string().
|
static |
const { ... } cc_state_to_string_map[] |
Referenced by cc_state_to_string().
|
static |
Counter used to create core IDs for CC calls. Each new core ID is created by atomically adding 1 to the core_id_counter
Definition at line 120 of file ccss.c.
Referenced by cc_interfaces_datastore_init().
|
static |
|
static |
|
static |
|
static |
struct ao2_container* generic_monitors |
|
static |
Parsed configuration value for cc_max_requests
Definition at line 137 of file ccss.c.
Referenced by ast_cc_request_is_within_limits(), and initialize_cc_max_requests().
|
static |
enum ast_cc_service_type service |
Definition at line 383 of file ccss.c.
Referenced by cc_build_payload(), cc_generic_monitor_request_cc(), and cc_service_to_string().
Definition at line 393 of file ccss.c.
Referenced by cc_request_state_change(), cc_state_to_devstate(), cc_state_to_string(), and initialize_cc_devstate_map_helper().
|
static |
Definition at line 3273 of file ccss.c.
Referenced by cc_do_state_change().