| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
Shared Line Appearances. More...
#include "asterisk.h"#include "asterisk/lock.h"#include "asterisk/file.h"#include "asterisk/channel.h"#include "asterisk/pbx.h"#include "asterisk/module.h"#include "asterisk/config.h"#include "asterisk/app.h"#include "asterisk/cli.h"#include "asterisk/utils.h"#include "asterisk/astobj2.h"#include "asterisk/devicestate.h"#include "asterisk/dial.h"#include "asterisk/causes.h"#include "asterisk/format_compatibility.h"
Go to the source code of this file.
| Data Structures | |
| struct | dial_trunk_args | 
| struct | run_station_args | 
| struct | sla_event | 
| struct | sla_failed_station | 
| A station that failed to be dialed.  More... | |
| struct | sla_framehook_data | 
| Framehook to support HOLD within the conference.  More... | |
| struct | sla_ringing_station | 
| A station that is ringing.  More... | |
| struct | sla_ringing_trunk | 
| A trunk that is ringing.  More... | |
| struct | sla_station | 
| struct | sla_station_ref | 
| A reference to a station.  More... | |
| struct | sla_trunk | 
| struct | sla_trunk_ref | 
| A station's reference to a trunk.  More... | |
| Macros | |
| #define | MAX_CONFNUM 80 | 
| #define | S(e) case e: return # e; | 
| #define | SLA_CONFIG_FILE "sla.conf" | 
| Enumerations | |
| enum | { CONFFLAG_QUIET = (1 << 0) , CONFFLAG_MOH = (1 << 1) , CONFFLAG_MARKEDEXIT = (1 << 2) , CONFFLAG_MARKEDUSER = (1 << 3) , CONFFLAG_PASS_DTMF = (1 << 4) , CONFFLAG_SLA_STATION = (1 << 5) , CONFFLAG_SLA_TRUNK = (1 << 6) } | 
| enum | { SLA_TRUNK_OPT_MOH = (1 << 0) } | 
| enum | { SLA_TRUNK_OPT_ARG_MOH_CLASS = 0 , SLA_TRUNK_OPT_ARG_ARRAY_SIZE = 1 } | 
| enum | sla_event_type { SLA_EVENT_HOLD , SLA_EVENT_DIAL_STATE , SLA_EVENT_RINGING_TRUNK } | 
| Event types that can be queued up for the SLA thread.  More... | |
| enum | sla_hold_access { SLA_HOLD_OPEN , SLA_HOLD_PRIVATE } | 
| enum | sla_station_hangup { SLA_STATION_HANGUP_NORMAL , SLA_STATION_HANGUP_TIMEOUT } | 
| enum | sla_trunk_state { SLA_TRUNK_STATE_IDLE , SLA_TRUNK_STATE_RINGING , SLA_TRUNK_STATE_UP , SLA_TRUNK_STATE_ONHOLD , SLA_TRUNK_STATE_ONHOLD_BYME } | 
| enum | sla_which_trunk_refs { ALL_TRUNK_REFS , INACTIVE_TRUNK_REFS } | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| static void | answer_trunk_chan (struct ast_channel *chan) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| static int | attach_framehook (struct ast_channel *chan, const char *confname) | 
| static int | conf_kick_all (struct ast_channel *chan, const char *confname) | 
| static int | conf_run (struct ast_channel *chan, const char *confname, struct ast_flags *confflags, char *optargs[]) | 
| static struct sla_trunk_ref * | create_trunk_ref (struct sla_trunk *trunk) | 
| static void * | dial_trunk (void *data) | 
| static int | load_config (int reload) | 
| static int | load_module (void) | 
| Load the module. | |
| static struct sla_ringing_trunk * | queue_ringing_trunk (struct sla_trunk *trunk) | 
| static int | reload (void) | 
| static int | remove_framehook (struct ast_channel *chan) | 
| static void * | run_station (void *data) | 
| static void | sla_add_trunk_to_station (struct sla_station *station, struct ast_variable *var) | 
| static int | sla_build_station (struct ast_config *cfg, const char *cat) | 
| static int | sla_build_trunk (struct ast_config *cfg, const char *cat) | 
| static int | sla_calc_station_delays (unsigned int *timeout) | 
| Calculate the ring delay for a station. | |
| static int | sla_calc_station_timeouts (unsigned int *timeout) | 
| Process station ring timeouts. | |
| static int | sla_calc_trunk_timeouts (unsigned int *timeout) | 
| Process trunk ring timeouts. | |
| static void | sla_change_trunk_state (const struct sla_trunk *trunk, enum sla_trunk_state state, enum sla_which_trunk_refs inactive_only, const struct sla_trunk_ref *exclude) | 
| static int | sla_check_device (const char *device) | 
| static int | sla_check_failed_station (const struct sla_station *station) | 
| Check to see if this station has failed to be dialed in the past minute. | |
| static int | sla_check_inuse_station (const struct sla_station *station) | 
| Check to see if a station is in use. | |
| static int | sla_check_ringing_station (const struct sla_station *station) | 
| Check to see if this station is already ringing. | |
| static int | sla_check_station_delay (struct sla_station *station, struct sla_ringing_trunk *ringing_trunk) | 
| Calculate the ring delay for a given ringing trunk on a station. | |
| static int | sla_check_station_hold_access (const struct sla_trunk *trunk, const struct sla_station *station) | 
| static int | sla_check_timed_out_station (const struct sla_ringing_trunk *ringing_trunk, const struct sla_station *station) | 
| Check to see if dialing this station already timed out for this ringing trunk. | |
| static struct sla_trunk_ref * | sla_choose_idle_trunk (const struct sla_station *station) | 
| For a given station, choose the highest priority idle trunk. | |
| static struct sla_ringing_trunk * | sla_choose_ringing_trunk (struct sla_station *station, struct sla_trunk_ref **trunk_ref, int rm) | 
| Choose the highest priority ringing trunk for a station. | |
| static struct sla_failed_station * | sla_create_failed_station (struct sla_station *station) | 
| static struct sla_ringing_station * | sla_create_ringing_station (struct sla_station *station) | 
| static struct sla_station_ref * | sla_create_station_ref (struct sla_station *station) | 
| static void | sla_destroy (void) | 
| static void | sla_dial_state_callback (struct ast_dial *dial) | 
| static void | sla_event_destroy (struct sla_event *event) | 
| static void | sla_failed_station_destroy (struct sla_failed_station *failed_station) | 
| static struct sla_station * | sla_find_station (const char *name) | 
| static struct sla_trunk * | sla_find_trunk (const char *name) | 
| static struct sla_trunk_ref * | sla_find_trunk_ref (const struct sla_station *station, const struct sla_trunk *trunk) | 
| static struct sla_trunk_ref * | sla_find_trunk_ref_byname (const struct sla_station *station, const char *name) | 
| Find a trunk reference on a station by name. | |
| static struct ast_frame * | sla_framehook (struct ast_channel *chan, struct ast_frame *f, enum ast_framehook_event event, void *data) | 
| static int | sla_framehook_consume (void *data, enum ast_frame_type type) | 
| Callback function which informs upstream if we are consuming a frame of a specific type. | |
| static void | sla_handle_dial_state_event (void) | 
| static void | sla_handle_hold_event (struct sla_event *event) | 
| static void | sla_handle_ringing_trunk_event (void) | 
| static void | sla_hangup_stations (void) | 
| static const char * | sla_hold_str (unsigned int hold_access) | 
| static int | sla_in_use (void) | 
| static int | sla_load_config (int reload) | 
| static int | sla_process_timers (struct timespec *ts) | 
| Calculate the time until the next known event. | |
| static void | sla_queue_event (enum sla_event_type type) | 
| static void | sla_queue_event_conf (enum sla_event_type type, struct ast_channel *chan, const char *confname) | 
| Queue a SLA event from the conference. | |
| static void | sla_queue_event_full (enum sla_event_type type, struct sla_trunk_ref *trunk_ref, struct sla_station *station, int lock) | 
| static void | sla_queue_event_nolock (enum sla_event_type type) | 
| static int | sla_ring_station (struct sla_ringing_trunk *ringing_trunk, struct sla_station *station) | 
| Ring a station. | |
| static void | sla_ring_stations (void) | 
| Ring stations based on current set of ringing trunks. | |
| static void | sla_ringing_station_destroy (struct sla_ringing_station *ringing_station) | 
| static void | sla_ringing_trunk_destroy (struct sla_ringing_trunk *ringing_trunk) | 
| static char * | sla_show_stations (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) | 
| static char * | sla_show_trunks (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) | 
| static enum ast_device_state | sla_state (const char *data) | 
| static enum ast_device_state | sla_state_to_devstate (enum sla_trunk_state state) | 
| static int | sla_station_cmp (void *obj, void *arg, int flags) | 
| static void | sla_station_destructor (void *obj) | 
| static int | sla_station_exec (struct ast_channel *chan, const char *data) | 
| static int | sla_station_is_marked (void *obj, void *arg, int flags) | 
| static int | sla_station_mark (void *obj, void *arg, int flags) | 
| static void | sla_station_ref_destructor (void *obj) | 
| static int | sla_station_release_refs (void *obj, void *arg, int flags) | 
| static void | sla_stop_ringing_station (struct sla_ringing_station *ringing_station, enum sla_station_hangup hangup) | 
| static void | sla_stop_ringing_trunk (struct sla_ringing_trunk *ringing_trunk) | 
| static void * | sla_thread (void *data) | 
| static int | sla_trunk_cmp (void *obj, void *arg, int flags) | 
| static void | sla_trunk_destructor (void *obj) | 
| static int | sla_trunk_exec (struct ast_channel *chan, const char *data) | 
| static int | sla_trunk_is_marked (void *obj, void *arg, int flags) | 
| static int | sla_trunk_mark (void *obj, void *arg, int flags) | 
| static void | sla_trunk_ref_destructor (void *obj) | 
| static int | sla_trunk_release_refs (void *obj, void *arg, int flags) | 
| static const char * | trunkstate2str (enum sla_trunk_state state) | 
| static int | unload_module (void) | 
Shared Line Appearances.
Definition in file app_sla.c.
| #define S | ( | e | ) | case e: return # e; | 
| anonymous enum | 
Definition at line 136 of file app_sla.c.
| anonymous enum | 
| Enumerator | |
|---|---|
| SLA_TRUNK_OPT_MOH | |
| anonymous enum | 
| Enumerator | |
|---|---|
| SLA_TRUNK_OPT_ARG_MOH_CLASS | |
| SLA_TRUNK_OPT_ARG_ARRAY_SIZE | |
| enum sla_event_type | 
Event types that can be queued up for the SLA thread.
| Enumerator | |
|---|---|
| SLA_EVENT_HOLD | A station has put the call on hold | 
| SLA_EVENT_DIAL_STATE | The state of a dial has changed | 
| SLA_EVENT_RINGING_TRUNK | The state of a ringing trunk has changed | 
Definition at line 284 of file app_sla.c.
| enum sla_hold_access | 
Definition at line 177 of file app_sla.c.
| enum sla_station_hangup | 
| enum sla_trunk_state | 
| Enumerator | |
|---|---|
| SLA_TRUNK_STATE_IDLE | |
| SLA_TRUNK_STATE_RINGING | |
| SLA_TRUNK_STATE_UP | |
| SLA_TRUNK_STATE_ONHOLD | |
| SLA_TRUNK_STATE_ONHOLD_BYME | |
| enum sla_which_trunk_refs | 
| Enumerator | |
|---|---|
| ALL_TRUNK_REFS | |
| INACTIVE_TRUNK_REFS | |
| 
 | static | 
Definition at line 917 of file app_sla.c.
References ast_indicate(), ast_raw_answer(), and sla_trunk_ref::chan.
Referenced by run_station(), sla_handle_dial_state_event(), and sla_station_exec().
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
| 
 | static | 
Definition at line 666 of file app_sla.c.
References ast_calloc, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_channel_name(), ast_datastore_alloc, ast_datastore_free(), ast_framehook_attach(), AST_FRAMEHOOK_INTERFACE_VERSION, ast_free, ast_log, AST_LOG_WARNING, ast_strdup, ast_datastore::data, ast_framehook_interface::data, NULL, SCOPED_CHANNELLOCK, sla_framehook(), sla_framehook_consume(), sla_framehook_datastore, and ast_framehook_interface::version.
Referenced by conf_run().
| 
 | static | 
Definition at line 958 of file app_sla.c.
References ast_channel_unref, ast_debug, ast_dummy_channel_alloc, ast_log, ast_pbx_exec_application(), sla_trunk_ref::chan, and LOG_WARNING.
Referenced by run_station(), sla_station_exec(), and sla_stop_ringing_trunk().
| 
 | static | 
Definition at line 923 of file app_sla.c.
References ast_channel_name(), ast_debug, ast_func_write(), ast_log, ast_pbx_exec_application(), ast_strlen_zero(), ast_test_flag, attach_framehook(), sla_trunk_ref::chan, CONFFLAG_MARKEDEXIT, CONFFLAG_MARKEDUSER, CONFFLAG_MOH, CONFFLAG_PASS_DTMF, CONFFLAG_QUIET, CONFFLAG_SLA_STATION, LOG_ERROR, remove_framehook(), and SLA_TRUNK_OPT_ARG_MOH_CLASS.
Referenced by dial_trunk(), run_station(), sla_station_exec(), and sla_trunk_exec().
| 
 | static | 
Definition at line 2112 of file app_sla.c.
References ao2_alloc, ao2_ref, NULL, sla_trunk_ref_destructor(), and sla_trunk_ref::trunk.
Referenced by sla_add_trunk_to_station().
| 
 | static | 
Definition at line 1800 of file app_sla.c.
References ALL_TRUNK_REFS, ao2_cleanup, args, ast_channel_caller(), ast_channel_caller_set(), ast_channel_name(), ast_cond_signal, AST_CONTROL_PROGRESS, AST_CONTROL_RINGING, ast_debug, AST_DEVICE_NOT_INUSE, ast_dial_answered(), ast_dial_append(), ast_dial_create(), ast_dial_destroy(), ast_dial_join(), AST_DIAL_RESULT_ANSWERED, AST_DIAL_RESULT_FAILED, AST_DIAL_RESULT_HANGUP, AST_DIAL_RESULT_INVALID, AST_DIAL_RESULT_PROCEEDING, AST_DIAL_RESULT_PROGRESS, AST_DIAL_RESULT_RINGING, AST_DIAL_RESULT_TIMEOUT, AST_DIAL_RESULT_TRYING, AST_DIAL_RESULT_UNANSWERED, ast_dial_run(), ast_dial_state(), ast_frfree, ast_indicate(), ast_mutex_lock, ast_mutex_unlock, ast_party_caller_free(), ast_party_caller_init(), ast_read(), ast_set_flag, ast_strdupa, ast_waitfor(), conf_run(), CONFFLAG_MARKEDEXIT, CONFFLAG_MARKEDUSER, CONFFLAG_PASS_DTMF, CONFFLAG_QUIET, CONFFLAG_SLA_TRUNK, done, MAX_CONFNUM, NULL, RAII_VAR, sla, sla_change_trunk_state(), SLA_TRUNK_STATE_IDLE, and strsep().
Referenced by sla_station_exec().
| 
 | static | 
| 
 | static | 
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 2855 of file app_sla.c.
References ARRAY_LEN, ast_cli_register_multiple, ast_devstate_prov_add(), ast_register_application_xml, cli_sla, load_config(), sla_state(), sla_station_exec(), sla_trunk_exec(), slastation_app, and slatrunk_app.
| 
 | static | 
Definition at line 2126 of file app_sla.c.
References ALL_TRUNK_REFS, ao2_ref, ast_calloc, AST_LIST_INSERT_HEAD, ast_mutex_lock, ast_mutex_unlock, ast_tvnow(), sla_ringing_trunk::entry, NULL, sla_ringing_trunk::ring_begin, sla, sla_change_trunk_state(), SLA_EVENT_RINGING_TRUNK, sla_queue_event(), SLA_TRUNK_STATE_RINGING, and sla_ringing_trunk::trunk.
Referenced by sla_trunk_exec().
| 
 | static | 
Definition at line 2870 of file app_sla.c.
References load_config().
Referenced by load_config(), and sla_load_config().
| 
 | static | 
Definition at line 620 of file app_sla.c.
References ast_channel_datastore_find(), ast_channel_datastore_remove(), ast_channel_name(), ast_datastore_free(), ast_framehook_detach(), ast_free, ast_log, AST_LOG_WARNING, sla_framehook_data::confname, ast_datastore::data, sla_framehook_data::framehook_id, NULL, SCOPED_CHANNELLOCK, and sla_framehook_datastore.
Referenced by conf_run().
| 
 | static | 
Definition at line 981 of file app_sla.c.
References sla_trunk::active_stations, ALL_TRUNK_REFS, answer_trunk_chan(), ao2_cleanup, args, ast_atomic_dec_and_test(), ast_atomic_fetchadd_int(), ast_cond_signal, ast_debug, ast_dial_destroy(), ast_dial_join(), ast_free, ast_mutex_lock, ast_mutex_unlock, ast_set_flag, ast_str_buffer(), ast_str_create, ast_str_set(), sla_trunk_ref::chan, conf_kick_all(), conf_run(), CONFFLAG_MARKEDEXIT, CONFFLAG_PASS_DTMF, CONFFLAG_QUIET, CONFFLAG_SLA_STATION, sla_station::dial, sla_trunk::hold_stations, sla_station::name, sla_trunk::name, NULL, RAII_VAR, sla_change_trunk_state(), SLA_TRUNK_STATE_IDLE, SLA_TRUNK_STATE_ONHOLD_BYME, sla_trunk_ref::state, run_station_args::station, sla_trunk_ref::trunk, and run_station_args::trunk_ref.
Referenced by sla_handle_dial_state_event().
| 
 | static | 
Definition at line 2478 of file app_sla.c.
References ao2_cleanup, ao2_lock, ao2_ref, ao2_unlock, ast_atomic_fetchadd_int(), AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, ast_log, ast_strdupa, create_trunk_ref(), sla_station_ref::entry, LOG_ERROR, LOG_WARNING, sla_station_ref::mark, sla_trunk_ref::mark, name, sla_station::name, NULL, options, RAII_VAR, sla_trunk_ref::ring_delay, sla_trunk_ref::ring_timeout, sla_create_station_ref(), sla_find_trunk(), SLA_TRUNK_STATE_IDLE, sla_trunk_ref::state, sla_station_ref::station, strsep(), sla_trunk_ref::trunk, sla_station::trunks, value, and var.
Referenced by sla_build_station().
| 
 | static | 
Definition at line 2559 of file app_sla.c.
References ao2_alloc, ao2_cleanup, ao2_link, ao2_lock, ao2_unlock, ast_add_extension(), ast_context_find_or_create(), ast_free_ptr(), AST_LIST_TRAVERSE, ast_log, AST_MAX_EXTENSION, ast_strdup, ast_string_field_init, ast_string_field_set, ast_strlen_zero(), ast_variable_browse(), ast_variable_retrieve(), sla_trunk_ref::entry, LOG_ERROR, LOG_WARNING, name, sla_trunk::name, ast_variable::next, NULL, PRIORITY_HINT, RAII_VAR, sla_add_trunk_to_station(), SLA_CONFIG_FILE, sla_find_station(), SLA_HOLD_OPEN, SLA_HOLD_PRIVATE, sla_registrar, sla_station_destructor(), sla_stations, slastation_app, sla_station_ref::station, sla_trunk_ref::trunk, and var.
Referenced by sla_load_config().
| 
 | static | 
Definition at line 2396 of file app_sla.c.
References ao2_alloc, ao2_cleanup, ao2_link, ao2_lock, ao2_unlock, ast_add_extension(), ast_context_find_or_create(), ast_false(), ast_free_ptr(), ast_log, ast_strdup, ast_string_field_init, ast_string_field_set, ast_strlen_zero(), ast_variable_browse(), ast_variable_retrieve(), LOG_ERROR, LOG_WARNING, name, ast_variable::next, NULL, RAII_VAR, sla_check_device(), SLA_CONFIG_FILE, sla_find_trunk(), SLA_HOLD_OPEN, SLA_HOLD_PRIVATE, sla_registrar, sla_trunk_destructor(), sla_trunks, slatrunk_app, and var.
Referenced by sla_load_config().
| 
 | static | 
Calculate the ring delay for a station.
Definition at line 1631 of file app_sla.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, NULL, sla_check_inuse_station(), sla_check_ringing_station(), sla_check_station_delay(), sla_choose_ringing_trunk(), and sla_stations.
Referenced by sla_process_timers().
| 
 | static | 
Process station ring timeouts.
Definition at line 1539 of file app_sla.c.
References AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_tvdiff_ms(), ast_tvnow(), sla_station_ref::entry, sla_trunk_ref::entry, sla_ringing_station::entry, sla_ringing_trunk::ring_begin, sla_ringing_station::ring_begin, sla_station::ring_timeout, sla_trunk_ref::ring_timeout, sla, SLA_STATION_HANGUP_TIMEOUT, sla_stop_ringing_station(), sla_station_ref::station, sla_ringing_station::station, sla_ringing_trunk::timed_out_stations, sla_trunk_ref::trunk, sla_ringing_trunk::trunk, and sla_station::trunks.
Referenced by sla_process_timers().
| 
 | static | 
Process trunk ring timeouts.
Definition at line 1507 of file app_sla.c.
References AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_tvdiff_ms(), ast_tvnow(), sla_trunk::chan, sla_ringing_trunk::entry, pbx_builtin_setvar_helper(), sla_ringing_trunk::ring_begin, sla_trunk::ring_timeout, sla, sla_stop_ringing_trunk(), and sla_ringing_trunk::trunk.
Referenced by sla_process_timers().
| 
 | static | 
Definition at line 886 of file app_sla.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_lock, ao2_ref, ao2_unlock, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), AST_LIST_TRAVERSE, sla_trunk_ref::chan, sla_station::name, sla_trunk::name, sla_state_to_devstate(), sla_stations, sla_trunk_ref::state, sla_trunk_ref::trunk, and sla_station::trunks.
Referenced by dial_trunk(), queue_ringing_trunk(), run_station(), sla_handle_dial_state_event(), sla_handle_hold_event(), sla_station_exec(), sla_stop_ringing_trunk(), and sla_trunk_exec().
| 
 | static | 
Definition at line 2367 of file app_sla.c.
References ast_strdupa, ast_strlen_zero(), sla_station::device, and strsep().
Referenced by sla_build_trunk().
| 
 | static | 
Check to see if this station has failed to be dialed in the past minute.
Definition at line 1245 of file app_sla.c.
References AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_tvdiff_ms(), ast_tvnow(), sla_failed_station::entry, sla_failed_station::last_try, sla, sla_failed_station_destroy(), and sla_failed_station::station.
Referenced by sla_ring_stations().
| 
 | static | 
Check to see if a station is in use.
Definition at line 1330 of file app_sla.c.
References AST_LIST_TRAVERSE, sla_trunk_ref::chan, sla_trunk_ref::entry, and sla_station::trunks.
Referenced by sla_calc_station_delays(), and sla_ring_stations().
| 
 | static | 
Check to see if this station is already ringing.
Definition at line 1229 of file app_sla.c.
References AST_LIST_TRAVERSE, sla_ringing_station::entry, sla, and sla_ringing_station::station.
Referenced by sla_calc_station_delays(), and sla_ring_stations().
| 
 | static | 
Calculate the ring delay for a given ringing trunk on a station.
| station | the station | 
| ringing_trunk | the trunk. If NULL, the highest priority ringing trunk will be used | 
Definition at line 1363 of file app_sla.c.
References ao2_cleanup, ast_tvdiff_ms(), ast_tvnow(), NULL, RAII_VAR, sla_ringing_trunk::ring_begin, sla_station::ring_delay, sla_choose_ringing_trunk(), sla_find_trunk_ref(), and sla_ringing_trunk::trunk.
Referenced by sla_calc_station_delays(), and sla_ring_stations().
| 
 | static | 
Definition at line 735 of file app_sla.c.
References AST_LIST_TRAVERSE, sla_trunk_ref::entry, sla_station::hold_access, SLA_HOLD_PRIVATE, SLA_TRUNK_STATE_ONHOLD_BYME, sla_trunk_ref::state, sla_station_ref::station, sla_trunk::stations, sla_trunk_ref::trunk, and sla_station::trunks.
Referenced by sla_find_trunk_ref_byname().
| 
 | static | 
Check to see if dialing this station already timed out for this ringing trunk.
Definition at line 1084 of file app_sla.c.
References AST_LIST_TRAVERSE, sla_station_ref::entry, sla_station_ref::station, and sla_ringing_trunk::timed_out_stations.
Referenced by sla_choose_ringing_trunk(), and sla_ring_stations().
| 
 | static | 
For a given station, choose the highest priority idle trunk.
Definition at line 1941 of file app_sla.c.
References ao2_ref, AST_LIST_TRAVERSE, sla_trunk_ref::entry, NULL, SLA_TRUNK_STATE_IDLE, sla_trunk_ref::state, and sla_station::trunks.
Referenced by sla_station_exec().
| 
 | static | 
Choose the highest priority ringing trunk for a station.
| station | the station | 
| rm | remove the ringing trunk once selected | 
| trunk_ref | a place to store the pointer to this stations reference to the selected trunk | 
Definition at line 1105 of file app_sla.c.
References ao2_ref, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, sla_ringing_trunk::entry, NULL, sla, sla_check_timed_out_station(), sla_trunk_ref::trunk, sla_ringing_trunk::trunk, and sla_station::trunks.
Referenced by sla_calc_station_delays(), sla_check_station_delay(), and sla_handle_dial_state_event().
| 
 | static | 
Definition at line 844 of file app_sla.c.
References ao2_ref, ast_calloc, ast_tvnow(), sla_failed_station::last_try, NULL, and sla_failed_station::station.
Referenced by sla_ring_station().
| 
 | static | 
Definition at line 819 of file app_sla.c.
References ao2_ref, ast_calloc, ast_tvnow(), NULL, sla_ringing_station::ring_begin, and sla_ringing_station::station.
Referenced by sla_ring_station().
| 
 | static | 
Definition at line 805 of file app_sla.c.
References ao2_alloc, ao2_ref, NULL, sla_station_ref_destructor(), and sla_station_ref::station.
Referenced by sla_add_trunk_to_station(), and sla_stop_ringing_station().
| 
 | static | 
Definition at line 2341 of file app_sla.c.
References ao2_callback, ao2_ref, ast_cond_destroy, ast_cond_signal, ast_context_destroy(), ast_mutex_destroy, ast_mutex_lock, ast_mutex_unlock, AST_PTHREADT_NULL, NULL, sla, sla_registrar, sla_station_release_refs(), sla_stations, sla_trunk_release_refs(), and sla_trunks.
Referenced by unload_module().
| 
 | static | 
Definition at line 1076 of file app_sla.c.
References SLA_EVENT_DIAL_STATE, and sla_queue_event().
Referenced by sla_ring_station().
| 
 | static | 
Definition at line 1720 of file app_sla.c.
References ao2_ref, ast_free, and NULL.
Referenced by sla_thread().
| 
 | static | 
Definition at line 859 of file app_sla.c.
References ao2_ref, ast_free, NULL, and sla_failed_station::station.
Referenced by sla_check_failed_station(), and sla_thread().
| 
 | static | 
Definition at line 726 of file app_sla.c.
References ao2_find, name, sla_station::name, OBJ_POINTER, and sla_stations.
Referenced by sla_build_station(), sla_state(), and sla_station_exec().
| 
 | static | 
Definition at line 713 of file app_sla.c.
References ao2_find, name, sla_trunk::name, OBJ_POINTER, and sla_trunks.
Referenced by sla_add_trunk_to_station(), sla_build_trunk(), and sla_trunk_exec().
| 
 | static | 
Definition at line 1343 of file app_sla.c.
References ao2_ref, AST_LIST_TRAVERSE, sla_trunk_ref::entry, NULL, sla_trunk_ref::trunk, and sla_station::trunks.
Referenced by sla_check_station_delay().
| 
 | static | 
Find a trunk reference on a station by name.
| station | the station | 
| name | the trunk's name | 
Definition at line 765 of file app_sla.c.
References ao2_ref, ast_debug, AST_LIST_TRAVERSE, sla_trunk::barge_disabled, sla_trunk_ref::entry, sla_trunk::hold_access, sla_trunk::hold_stations, name, sla_trunk::name, NULL, sla_check_station_hold_access(), SLA_HOLD_PRIVATE, SLA_TRUNK_STATE_ONHOLD_BYME, SLA_TRUNK_STATE_UP, sla_trunk_ref::state, sla_trunk_ref::trunk, and sla_station::trunks.
Referenced by sla_station_exec().
| 
 | static | 
Definition at line 648 of file app_sla.c.
References AST_CONTROL_HOLD, AST_FRAME_CONTROL, AST_FRAMEHOOK_EVENT_WRITE, sla_framehook_data::confname, ast_frame::frametype, ast_frame_subclass::integer, SLA_EVENT_HOLD, sla_queue_event_conf(), and ast_frame::subclass.
Referenced by attach_framehook().
| 
 | static | 
Callback function which informs upstream if we are consuming a frame of a specific type.
Definition at line 661 of file app_sla.c.
References AST_FRAME_CONTROL, and type.
Referenced by attach_framehook().
| 
 | static | 
Definition at line 1144 of file app_sla.c.
References ALL_TRUNK_REFS, answer_trunk_chan(), ao2_cleanup, ao2_ref, args, ast_cond_destroy, ast_cond_init, ast_cond_wait, ast_debug, ast_dial_answered(), ast_dial_destroy(), ast_dial_join(), AST_DIAL_RESULT_ANSWERED, AST_DIAL_RESULT_FAILED, AST_DIAL_RESULT_HANGUP, AST_DIAL_RESULT_INVALID, AST_DIAL_RESULT_PROCEEDING, AST_DIAL_RESULT_PROGRESS, AST_DIAL_RESULT_RINGING, AST_DIAL_RESULT_TIMEOUT, AST_DIAL_RESULT_TRYING, AST_DIAL_RESULT_UNANSWERED, ast_dial_state(), AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_mutex_destroy, ast_mutex_init, ast_mutex_lock, ast_mutex_unlock, ast_pthread_create_detached_background, sla_trunk::chan, cond, run_station_args::cond_lock, sla_station::dial, sla_ringing_station::entry, sla_station::name, NULL, RAII_VAR, run_station(), sla, sla_change_trunk_state(), sla_choose_ringing_trunk(), SLA_EVENT_DIAL_STATE, SLA_EVENT_RINGING_TRUNK, sla_queue_event(), sla_ringing_station_destroy(), sla_ringing_trunk_destroy(), SLA_STATION_HANGUP_NORMAL, sla_stop_ringing_station(), SLA_TRUNK_STATE_UP, sla_ringing_station::station, and sla_ringing_trunk::trunk.
Referenced by sla_thread().
| 
 | static | 
Definition at line 1485 of file app_sla.c.
References ast_atomic_fetchadd_int(), AST_CONTROL_HOLD, AST_DEVICE_ONHOLD, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_indicate(), ast_softhangup(), AST_SOFTHANGUP_DEV, INACTIVE_TRUNK_REFS, NULL, sla_change_trunk_state(), SLA_TRUNK_STATE_ONHOLD, and SLA_TRUNK_STATE_ONHOLD_BYME.
Referenced by sla_thread().
| 
 | static | 
Definition at line 1475 of file app_sla.c.
References ast_mutex_lock, ast_mutex_unlock, sla, sla_hangup_stations(), and sla_ring_stations().
Referenced by sla_thread().
| 
 | static | 
Definition at line 1445 of file app_sla.c.
References ast_dial_destroy(), ast_dial_join(), AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_mutex_lock, ast_mutex_unlock, sla_station::dial, sla_ringing_trunk::entry, sla_ringing_station::entry, NULL, sla, sla_ringing_station_destroy(), sla_ringing_station::station, sla_trunk_ref::trunk, sla_ringing_trunk::trunk, and sla_station::trunks.
Referenced by sla_handle_ringing_trunk_event().
| 
 | static | 
Definition at line 350 of file app_sla.c.
References hold(), SLA_HOLD_OPEN, and SLA_HOLD_PRIVATE.
Referenced by sla_show_stations(), and sla_show_trunks().
| 
 | static | 
Definition at line 2754 of file app_sla.c.
References ao2_container_count(), sla_stations, and sla_trunks.
Referenced by sla_load_config().
| 
 | static | 
Definition at line 2759 of file app_sla.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_callback, ao2_container_alloc_list, ast_category_browse(), ast_cond_init, ast_config_destroy(), ast_config_load, ast_log, ast_mutex_init, ast_pthread_create, AST_PTHREADT_NULL, ast_true(), ast_variable_retrieve(), CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, LOG_ERROR, LOG_WARNING, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, reload(), sla, sla_build_station(), sla_build_trunk(), SLA_CONFIG_FILE, sla_in_use(), sla_station_cmp(), sla_station_is_marked(), sla_station_mark(), sla_stations, sla_thread(), sla_trunk_cmp(), sla_trunk_is_marked(), sla_trunk_mark(), sla_trunks, and type.
Referenced by load_config().
| 
 | static | 
Calculate the time until the next known event.
Definition at line 1680 of file app_sla.c.
References ast_samp2tv(), ast_tvadd(), ast_tvnow(), sla_calc_station_delays(), sla_calc_station_timeouts(), sla_calc_trunk_timeouts(), SLA_EVENT_RINGING_TRUNK, and sla_queue_event_nolock().
Referenced by sla_thread().
| 
 | static | 
Definition at line 561 of file app_sla.c.
References NULL, sla_queue_event_full(), and type.
Referenced by queue_ringing_trunk(), sla_dial_state_callback(), sla_handle_dial_state_event(), sla_station_exec(), and sla_trunk_exec().
| 
 | static | 
Queue a SLA event from the conference.
Definition at line 567 of file app_sla.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_lock, ao2_ref, ao2_unlock, ast_debug, AST_LIST_TRAVERSE, ast_log, ast_strdupa, ast_strlen_zero(), sla_trunk_ref::chan, LOG_ERROR, sla_trunk::name, NULL, sla_queue_event_full(), sla_stations, strsep(), sla_trunk_ref::trunk, sla_station::trunks, and type.
Referenced by sla_framehook().
| 
 | static | 
Definition at line 525 of file app_sla.c.
References ao2_ref, ast_calloc, ast_cond_signal, AST_LIST_INSERT_TAIL, ast_mutex_lock, ast_mutex_unlock, AST_PTHREADT_NULL, sla_event::entry, lock, sla, sla_event::station, sla_event::trunk_ref, and type.
Referenced by sla_queue_event(), sla_queue_event_conf(), and sla_queue_event_nolock().
| 
 | static | 
Definition at line 556 of file app_sla.c.
References NULL, sla_queue_event_full(), and type.
Referenced by sla_process_timers().
| 
 | static | 
Ring a station.
Definition at line 1269 of file app_sla.c.
References ast_channel_caller(), ast_channel_caller_set(), ast_dial_append(), ast_dial_create(), ast_dial_destroy(), ast_dial_join(), AST_DIAL_RESULT_TRYING, ast_dial_run(), ast_dial_set_state_callback(), AST_LIST_INSERT_HEAD, ast_party_caller_free(), ast_party_caller_init(), ast_strdupa, sla_trunk::chan, sla_station::device, sla_station::dial, sla_failed_station::entry, NULL, sla, sla_create_failed_station(), sla_create_ringing_station(), sla_dial_state_callback(), sla_failed_station::station, strsep(), and sla_ringing_trunk::trunk.
Referenced by sla_ring_stations().
| 
 | static | 
Ring stations based on current set of ringing trunks.
Definition at line 1399 of file app_sla.c.
References AST_LIST_TRAVERSE, sla_ringing_trunk::entry, sla, sla_check_failed_station(), sla_check_inuse_station(), sla_check_ringing_station(), sla_check_station_delay(), sla_check_timed_out_station(), sla_ring_station(), sla_station_ref::station, sla_trunk::stations, and sla_ringing_trunk::trunk.
Referenced by sla_handle_ringing_trunk_event().
| 
 | static | 
Definition at line 834 of file app_sla.c.
References ao2_ref, ast_free, NULL, and sla_ringing_station::station.
Referenced by sla_handle_dial_state_event(), sla_hangup_stations(), sla_stop_ringing_station(), and sla_thread().
| 
 | static | 
Definition at line 2149 of file app_sla.c.
References ao2_ref, ast_free, NULL, and sla_ringing_trunk::trunk.
Referenced by sla_handle_dial_state_event(), sla_station_exec(), sla_stop_ringing_trunk(), and sla_trunk_exec().
| 
 | static | 
Definition at line 441 of file app_sla.c.
References a, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_lock, ao2_ref, ao2_unlock, ast_cli(), AST_LIST_TRAVERSE, sla_station::autocontext, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, sla_station::device, sla_trunk_ref::entry, sla_station::hold_access, sla_station::name, sla_trunk::name, NULL, sla_station::ring_delay, sla_trunk_ref::ring_delay, sla_station::ring_timeout, sla_trunk_ref::ring_timeout, S_OR, sla_hold_str(), sla_stations, sla_trunk_ref::state, sla_trunk_ref::trunk, sla_station::trunks, trunkstate2str(), and ast_cli_entry::usage.
| 
 | static | 
Definition at line 367 of file app_sla.c.
References a, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_lock, ao2_ref, ao2_unlock, ast_cli(), AST_LIST_TRAVERSE, sla_trunk::autocontext, sla_trunk::barge_disabled, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, sla_trunk::device, sla_station_ref::entry, sla_trunk::hold_access, sla_station::name, sla_trunk::name, NULL, sla_trunk::ring_timeout, S_OR, sla_hold_str(), sla_trunks, sla_station_ref::station, sla_trunk::stations, and ast_cli_entry::usage.
| 
 | static | 
Definition at line 2250 of file app_sla.c.
References ao2_cleanup, ao2_lock, ao2_unlock, AST_DEVICE_INVALID, AST_LIST_TRAVERSE, ast_log, ast_strdupa, buf, sla_trunk_ref::entry, LOG_ERROR, sla_trunk::name, NULL, RAII_VAR, sla_find_station(), sla_state_to_devstate(), sla_trunk_ref::state, strsep(), and sla_trunk_ref::trunk.
Referenced by load_module().
| 
 | static | 
Definition at line 869 of file app_sla.c.
References AST_DEVICE_INUSE, AST_DEVICE_NOT_INUSE, AST_DEVICE_ONHOLD, AST_DEVICE_RINGING, AST_DEVICE_UNKNOWN, SLA_TRUNK_STATE_IDLE, SLA_TRUNK_STATE_ONHOLD, SLA_TRUNK_STATE_ONHOLD_BYME, SLA_TRUNK_STATE_RINGING, and SLA_TRUNK_STATE_UP.
Referenced by sla_change_trunk_state(), and sla_state().
| 
 | static | 
Definition at line 2334 of file app_sla.c.
References CMP_MATCH, CMP_STOP, and sla_station::name.
Referenced by sla_load_config().
| 
 | static | 
Definition at line 2303 of file app_sla.c.
References ast_context_remove_extension(), ast_debug, AST_LIST_TRAVERSE, AST_MAX_EXTENSION, ast_string_field_free_memory, ast_strlen_zero(), sla_station::autocontext, sla_trunk_ref::entry, sla_station::name, sla_trunk::name, NULL, PRIORITY_HINT, sla_registrar, sla_station_release_refs(), sla_trunk_ref::trunk, and sla_station::trunks.
Referenced by sla_build_station().
| 
 | static | 
Definition at line 1955 of file app_sla.c.
References sla_trunk::active_stations, ALL_TRUNK_REFS, answer_trunk_chan(), ao2_cleanup, ao2_lock, ao2_ref, ao2_unlock, args, ast_answer(), ast_atomic_dec_and_test(), ast_atomic_fetchadd_int(), ast_cond_destroy, ast_cond_init, ast_cond_wait, AST_CONTROL_UNHOLD, ast_debug, AST_DEVICE_INUSE, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_indicate(), AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log, ast_mutex_destroy, ast_mutex_init, ast_mutex_lock, ast_mutex_unlock, ast_pthread_create_detached_background, ast_set_flag, ast_strdupa, ast_strlen_zero(), sla_trunk::chan, sla_trunk_ref::chan, cond, dial_trunk_args::cond_lock, conf_kick_all(), conf_run(), CONFFLAG_MARKEDEXIT, CONFFLAG_PASS_DTMF, CONFFLAG_QUIET, CONFFLAG_SLA_STATION, dial_trunk(), sla_ringing_trunk::entry, sla_trunk::hold_stations, LOG_NOTICE, LOG_WARNING, MAX_CONFNUM, sla_station::name, sla_trunk::name, NULL, sla_trunk::on_hold, pbx_builtin_setvar_helper(), RAII_VAR, sla, sla_change_trunk_state(), sla_choose_idle_trunk(), SLA_EVENT_DIAL_STATE, SLA_EVENT_RINGING_TRUNK, sla_find_station(), sla_find_trunk_ref_byname(), sla_queue_event(), sla_ringing_trunk_destroy(), SLA_TRUNK_STATE_IDLE, SLA_TRUNK_STATE_ONHOLD_BYME, SLA_TRUNK_STATE_RINGING, SLA_TRUNK_STATE_UP, sla_trunk_ref::state, dial_trunk_args::station, strsep(), sla_trunk_ref::trunk, sla_ringing_trunk::trunk, and dial_trunk_args::trunk_ref.
Referenced by load_module().
| 
 | static | 
Definition at line 2726 of file app_sla.c.
References ao2_lock, ao2_ref, ao2_unlock, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, CMP_MATCH, sla_trunk_ref::entry, sla_station::mark, sla_trunk_ref::mark, NULL, sla_station_release_refs(), and sla_station::trunks.
Referenced by sla_load_config().
| 
 | static | 
Definition at line 2680 of file app_sla.c.
References ao2_lock, ao2_unlock, AST_LIST_TRAVERSE, sla_trunk_ref::entry, sla_station::mark, sla_trunk_ref::mark, and sla_station::trunks.
Referenced by sla_load_config().
| 
 | static | 
Definition at line 795 of file app_sla.c.
References ao2_ref, NULL, and sla_station_ref::station.
Referenced by sla_create_station_ref().
| 
 | static | 
Definition at line 2291 of file app_sla.c.
References ao2_ref, AST_LIST_REMOVE_HEAD, sla_trunk_ref::entry, and sla_station::trunks.
Referenced by sla_destroy(), sla_station_destructor(), and sla_station_is_marked().
| 
 | static | 
Definition at line 1038 of file app_sla.c.
References ast_dial_destroy(), ast_dial_join(), AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, sla_station::dial, done, sla_station_ref::entry, hangup(), NULL, sla, sla_create_station_ref(), sla_ringing_station_destroy(), SLA_STATION_HANGUP_NORMAL, sla_ringing_station::station, sla_ringing_trunk::timed_out_stations, sla_trunk_ref::trunk, sla_ringing_trunk::trunk, and sla_station::trunks.
Referenced by sla_calc_station_timeouts(), and sla_handle_dial_state_event().
| 
 | static | 
Definition at line 1024 of file app_sla.c.
References ALL_TRUNK_REFS, ao2_ref, AST_LIST_REMOVE_HEAD, sla_trunk::chan, conf_kick_all(), sla_station_ref::entry, sla_trunk::name, NULL, sla_change_trunk_state(), sla_ringing_trunk_destroy(), SLA_TRUNK_STATE_IDLE, sla_ringing_trunk::timed_out_stations, and sla_ringing_trunk::trunk.
Referenced by sla_calc_trunk_timeouts().
| 
 | static | 
Definition at line 1735 of file app_sla.c.
References ast_cond_timedwait, ast_cond_wait, AST_LIST_EMPTY, AST_LIST_REMOVE_HEAD, ast_mutex_lock, ast_mutex_unlock, NULL, sla, sla_event_destroy(), SLA_EVENT_DIAL_STATE, SLA_EVENT_HOLD, SLA_EVENT_RINGING_TRUNK, sla_failed_station_destroy(), sla_handle_dial_state_event(), sla_handle_hold_event(), sla_handle_ringing_trunk_event(), sla_process_timers(), and sla_ringing_station_destroy().
Referenced by sla_load_config().
| 
 | static | 
Definition at line 2327 of file app_sla.c.
References CMP_MATCH, CMP_STOP, and sla_trunk::name.
Referenced by sla_load_config().
| 
 | static | 
Definition at line 2381 of file app_sla.c.
References ast_context_remove_extension(), ast_debug, ast_string_field_free_memory, ast_strlen_zero(), sla_trunk::autocontext, sla_trunk::name, NULL, sla_registrar, and sla_trunk_release_refs().
Referenced by sla_build_trunk().
| 
 | static | 
Definition at line 2159 of file app_sla.c.
References ALL_TRUNK_REFS, ao2_cleanup, args, AST_APP_ARG, ast_app_parse_options(), AST_CONTROL_RINGING, ast_debug, AST_DECLARE_APP_ARGS, ast_indicate(), AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_set_flag, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), ast_test_flag, conf_run(), CONFFLAG_MARKEDEXIT, CONFFLAG_MARKEDUSER, CONFFLAG_MOH, CONFFLAG_PASS_DTMF, CONFFLAG_QUIET, LOG_ERROR, MAX_CONFNUM, NULL, options, pbx_builtin_getvar_helper(), pbx_builtin_setvar_helper(), queue_ringing_trunk(), RAII_VAR, sla, sla_change_trunk_state(), SLA_EVENT_RINGING_TRUNK, sla_find_trunk(), sla_queue_event(), sla_ringing_trunk_destroy(), SLA_TRUNK_OPT_ARG_ARRAY_SIZE, SLA_TRUNK_OPT_MOH, sla_trunk_opts, SLA_TRUNK_STATE_IDLE, and sla_ringing_trunk::trunk.
Referenced by load_module().
| 
 | static | 
Definition at line 2698 of file app_sla.c.
References ao2_lock, ao2_ref, ao2_unlock, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, CMP_MATCH, sla_station_ref::entry, sla_station_ref::mark, sla_trunk::mark, NULL, sla_trunk_release_refs(), and sla_trunk::stations.
Referenced by sla_load_config().
| 
 | static | 
Definition at line 2662 of file app_sla.c.
References ao2_lock, ao2_unlock, AST_LIST_TRAVERSE, sla_station_ref::entry, sla_station_ref::mark, sla_trunk::mark, and sla_trunk::stations.
Referenced by sla_load_config().
| 
 | static | 
Definition at line 2102 of file app_sla.c.
References ao2_ref, NULL, and sla_trunk_ref::trunk.
Referenced by create_trunk_ref().
| 
 | static | 
Definition at line 2279 of file app_sla.c.
References ao2_ref, AST_LIST_REMOVE_HEAD, sla_station_ref::entry, and sla_trunk::stations.
Referenced by sla_destroy(), sla_trunk_destructor(), and sla_trunk_is_marked().
| 
 | static | 
Definition at line 427 of file app_sla.c.
References S, SLA_TRUNK_STATE_IDLE, SLA_TRUNK_STATE_ONHOLD, SLA_TRUNK_STATE_ONHOLD_BYME, SLA_TRUNK_STATE_RINGING, and SLA_TRUNK_STATE_UP.
Referenced by sla_show_stations().
| 
 | static | 
Definition at line 2830 of file app_sla.c.
References ARRAY_LEN, ast_cli_unregister_multiple(), ast_devstate_prov_del(), ast_unregister_application(), cli_sla, sla_destroy(), slastation_app, and slatrunk_app.
| 
 | static | 
| 
 | static | 
| unsigned int attempt_callerid | 
| 
 | static | 
Definition at line 520 of file app_sla.c.
Referenced by load_module(), and unload_module().
| ast_cond_t cond | 
Definition at line 336 of file app_sla.c.
Referenced by __ast_cond_broadcast(), __ast_cond_destroy(), __ast_cond_init(), __ast_cond_signal(), __ast_cond_timedwait(), __ast_cond_wait(), ast_bridge_impart(), ast_safe_sleep_conditional(), bridge_channel_impart_add(), bridge_channel_impart_ds_head_signal(), bridge_channel_impart_wait(), bridge_impart_internal(), console_indicate(), gosubif_exec(), safe_sleep_conditional(), signal_condition(), sla_handle_dial_state_event(), and sla_station_exec().
| struct { ... } event_q | 
| struct { ... } failed_stations | 
| struct sla_event* first | 
Definition at line 338 of file app_sla.c.
Referenced by _ast_xmldoc_build_seealso(), _ast_xmldoc_build_since(), ast_category_get_templates(), ast_fax_caps_to_str(), ast_format_str_reduce(), ast_pbx_hangup_handler_show(), ast_print_group(), ast_print_namedgroups(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), bridge_channel_update_accountcodes_leaving(), check_goto(), context_merge(), decode_(), func_read_verification(), gen_prios(), generate_filenames_string(), get_goto_target(), get_history_info_header(), get_pattern_node(), h261_encap(), h263_encap(), h263p_encap(), h264_encap(), handle_missing_table(), listfilter(), log_jack_status(), mpeg4_encap(), npval2(), pgsql_log(), pitsyn_(), pjsip_aor_function_read(), realtime_arguments_to_fields2(), realtime_sqlite3_destroy(), realtime_sqlite3_helper(), realtime_sqlite3_store(), realtime_sqlite3_update(), realtime_sqlite3_update2(), realtimefield_read(), update2_mysql(), update2_pgsql(), update2_prepare(), xmldoc_get_syntax_cmd(), and xmldoc_parse_cmd_enumlist().
| struct sla_event* last | 
Definition at line 338 of file app_sla.c.
Referenced by add_email_attachment(), add_extensions(), adsi_generate(), ast_config_engine_deregister(), ast_config_text_file_save2(), ast_db_freetree(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), build_calendar(), config_mysql(), config_odbc(), config_pgsql(), do_monitor(), function_db_keycount(), function_db_keys(), get_pattern_node(), lintocodec2_frameout(), lintogsm_frameout(), lintoilbc_frameout(), lintolpc10_frameout(), lintospeex_frameout(), load_password(), npval2(), try_firmware(), update_last(), and update_scoreboard().
| ast_mutex_t lock | 
Definition at line 337 of file app_sla.c.
Referenced by __ast_bucket_scheme_register(), __ast_cli_generator(), __ast_codec_register_with_format(), __ast_format_interface_register(), __ast_named_lock_get(), action_lock_unlock_helper(), add_headers_to_message(), add_masquerade_store(), add_transferer_role(), aeap_transport_read(), aeap_transport_write(), after_bridge_cb_find(), after_bridge_cb_setup(), aor_alloc(), ast_aeap_connect(), ast_ari_add_handler(), ast_bridge_basic_set_flags(), ast_bridge_read_after_goto(), ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), ast_cdr_fork(), ast_channel_move(), ast_clear_mixmonitor_methods(), ast_config_engine_deregister(), ast_config_engine_register(), ast_endpoint_snapshot_create(), ast_format_cache_set(), ast_get_extension_for_mime_type(), ast_get_format_for_file_ext(), ast_localtime_wakeup_monitor(), ast_realtime_is_mapping_defined(), ast_serializer_shutdown_group_join(), ast_set_mixmonitor_methods(), ast_sip_format_endpoint_ami(), ast_sip_identify_endpoint(), ast_sip_publish_client_remove(), ast_sip_publish_client_send(), ast_sip_register_endpoint_formatter(), ast_sip_register_endpoint_identifier_with_name(), ast_sip_register_event_publisher_handler(), ast_sip_register_supplement(), ast_sip_session_add_supplements(), ast_sip_session_register_sdp_handler(), ast_sip_session_register_supplement_with_module(), ast_sip_session_unregister_supplement(), ast_sip_unregister_endpoint_formatter(), ast_sip_unregister_endpoint_identifier(), ast_sip_unregister_event_publisher_handler(), ast_sip_unregister_supplement(), ast_spinlock_destroy(), ast_spinlock_init(), ast_spinlock_lock(), ast_spinlock_trylock(), ast_spinlock_unlock(), ast_start_mixmonitor(), ast_stop_mixmonitor(), ast_taskprocessor_set_local(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), ast_threadpool_push(), ast_threadpool_set_size(), ast_unreal_channel_push_to_bridge(), bridge_base_init(), bridge_basic_change_personality(), bridge_register(), bucket_file_wizard_retrieve(), bucket_wizard_retrieve(), builtin_feature_get_exten(), cancel_and_unpublish(), channel_get_external_vars(), clear_stimulus_queue(), cli_show_channels(), cli_show_endpoint_identifiers(), complex_task(), conf_announce_channel_push(), consumer_exec(), consumer_exec(), consumer_exec_sync(), consumer_should_stay(), consumer_wait_for(), consumer_wait_for(), consumer_wait_for_completion(), expire_contact(), find_engine(), find_route(), generic_lock_unlock_helper(), get_park_common_datastore_copy(), get_publishes_and_update_state(), get_root_handler(), get_wait_bridge_wrapper(), handle_bridge_enter(), handle_cli_core_show_config_mappings(), handle_local_optimization_begin(), handle_local_optimization_end(), has_complex_started(), has_masquerade_store(), internal_feature_read(), internal_feature_write(), internal_featuremap_read(), internal_featuremap_write(), load_module(), load_module(), load_task(), lock_it(), lock_thread(), message_sink_cb(), mid_test_sync(), one_protocol(), persistent_endpoint_find_or_create(), playback_cancel(), playback_final_update(), playback_first_update(), playback_forward(), playback_pause(), playback_restart(), playback_reverse(), playback_stop(), playback_unpause(), poke_worker(), prometheus_callback_register(), prometheus_callback_unregister(), prometheus_last_scrape_time_get(), prometheus_metric_register(), prometheus_metric_registered_count(), prometheus_metric_unregister(), publisher_client_send(), recording_set_state(), reload_module(), reload_module(), remove_hooks_on_personality_change(), remove_masquerade_store(), remove_stasis_subscriptions(), report_fax_status(), report_receive_fax_status(), report_send_fax_status(), session_reset(), set_touch_variables(), shutdown_has_completed(), shutdown_poke(), shutdown_task_exec(), shutdown_waitfor_completion(), shutdown_waitfor_start(), signal_condition(), simple_task(), simple_task(), sip_outbound_publish_callback(), sip_publisher_service_queue(), sla_queue_event_full(), snoop_determine_format(), sorcery_observer_created(), sorcery_observer_deleted(), sorcery_observer_loaded(), sorcery_observer_updated(), stasis_app_control_record(), stasis_app_playback_get_state(), stasis_app_playback_operation(), stasis_app_recording_operation(), stasis_message_sink_dtor(), stasis_message_sink_should_stay(), stasis_message_sink_wait_for(), stasis_message_sink_wait_for_count(), task(), task_wait(), test_emptied(), test_state_changed(), test_sub(), test_task_pushed(), threadpool_active_thread_idle(), threadpool_idle_thread_dead(), threadpool_tps_emptied(), threadpool_tps_task_pushed(), threadpool_zombie_thread_dead(), unload_module(), unlock_it(), wait_for_completion(), wait_for_complex_completion(), wait_for_complex_start(), wait_for_empty_notice(), wait_for_stimulus(), wait_for_task_pushed(), wait_until_thread_state(), and worker_set_state().
| struct { ... } ringing_stations | 
| struct { ... } ringing_trunks | 
| struct { ... } sla | 
A structure for data used by the sla thread.
Referenced by dial_trunk(), queue_ringing_trunk(), sla_calc_station_timeouts(), sla_calc_trunk_timeouts(), sla_check_failed_station(), sla_check_ringing_station(), sla_choose_ringing_trunk(), sla_destroy(), sla_handle_dial_state_event(), sla_handle_ringing_trunk_event(), sla_hangup_stations(), sla_load_config(), sla_queue_event_full(), sla_ring_station(), sla_ring_stations(), sla_station_exec(), sla_stop_ringing_station(), sla_thread(), and sla_trunk_exec().
| 
 | static | 
Definition at line 616 of file app_sla.c.
Referenced by attach_framehook(), and remove_framehook().
| 
 | static | 
Definition at line 281 of file app_sla.c.
Referenced by sla_build_station(), sla_build_trunk(), sla_destroy(), sla_station_destructor(), and sla_trunk_destructor().
| 
 | static | 
Definition at line 278 of file app_sla.c.
Referenced by sla_build_station(), sla_calc_station_delays(), sla_change_trunk_state(), sla_destroy(), sla_find_station(), sla_in_use(), sla_load_config(), sla_queue_event_conf(), and sla_show_stations().
| 
 | static | 
Definition at line 162 of file app_sla.c.
Referenced by sla_trunk_exec().
| 
 | static | 
Definition at line 279 of file app_sla.c.
Referenced by sla_build_trunk(), sla_destroy(), sla_find_trunk(), sla_in_use(), sla_load_config(), and sla_show_trunks().
| 
 | static | 
Definition at line 133 of file app_sla.c.
Referenced by load_module(), sla_build_station(), and unload_module().
| 
 | static | 
Definition at line 134 of file app_sla.c.
Referenced by load_module(), sla_build_trunk(), and unload_module().
| unsigned int stop | 
Definition at line 342 of file app_sla.c.
Referenced by ast_control_streamfile(), ast_control_streamfile_lang(), ast_control_streamfile_w_cb(), control_streamfile(), controlplayback_exec(), DownSample(), handle_controlstreamfile(), play_on_channel(), queue_exec(), and vparms_().
| pthread_t thread | 
The SLA thread ID
Definition at line 335 of file app_sla.c.
Referenced by __schedule_action(), ari_channels_handle_originate_with_id(), ast_ari_channels_create(), ast_ari_close_per_call_websocket(), ast_dial_join(), ast_pthread_create_detached_stack(), ast_pthread_create_stack(), cleanup_thread_list(), feature_attended_transfer(), find_idle_thread(), handle_cli_iax2_show_threads(), handle_deferred_full_frames(), iax2_process_thread(), iax2_process_thread_cleanup(), idle_sched_init_pj_thread(), insert_idle_thread(), keepalive_transport_thread(), launch_monitor_thread(), load_module(), naptr_resolve(), pbx_outgoing_attempt(), sip_thread_start(), socket_process(), socket_process_helper(), socket_read(), softmix_bridge_destroy(), sorcery_memory_cache_thrash_create(), sorcery_memory_cache_thrash_destroy(), sorcery_memory_cache_thrash_retrieve(), sorcery_memory_cache_thrash_start(), sorcery_memory_cache_thrash_stop(), sorcery_memory_cache_thrash_update(), srv_resolve(), start_network_thread(), stasis_app_control_snoop(), and unbound_resolver_stop().