Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
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. More... | |
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. More... | |
static int | sla_calc_station_timeouts (unsigned int *timeout) |
Process station ring timeouts. More... | |
static int | sla_calc_trunk_timeouts (unsigned int *timeout) |
Process trunk ring timeouts. More... | |
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. More... | |
static int | sla_check_inuse_station (const struct sla_station *station) |
Check to see if a station is in use. More... | |
static int | sla_check_ringing_station (const struct sla_station *station) |
Check to see if this station is already ringing. More... | |
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. More... | |
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. More... | |
static struct sla_trunk_ref * | sla_choose_idle_trunk (const struct sla_station *station) |
For a given station, choose the highest priority idle trunk. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
static void | sla_ring_stations (void) |
Ring stations based on current set of ringing trunks. More... | |
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) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Shared Line Appearances" , .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 = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_DEVSTATE_PROVIDER, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_cli_entry | cli_sla [] |
struct { | |
unsigned int attempt_callerid:1 | |
ast_cond_t cond | |
struct { | |
struct sla_event * first | |
struct sla_event * last | |
} event_q | |
struct { | |
struct sla_failed_station * first | |
struct sla_failed_station * last | |
} failed_stations | |
ast_mutex_t lock | |
struct { | |
struct sla_ringing_station * first | |
struct sla_ringing_station * last | |
} ringing_stations | |
struct { | |
struct sla_ringing_trunk * first | |
struct sla_ringing_trunk * last | |
} ringing_trunks | |
unsigned int stop:1 | |
pthread_t thread | |
} | sla |
A structure for data used by the sla thread. More... | |
static const struct ast_datastore_info | sla_framehook_datastore |
static const char | sla_registrar [] = "SLA" |
static struct ao2_container * | sla_stations |
static const struct ast_app_option | sla_trunk_opts [128] = { [ 'M' ] = { .flag = SLA_TRUNK_OPT_MOH , .arg_index = SLA_TRUNK_OPT_ARG_MOH_CLASS + 1 }, } |
static struct ao2_container * | sla_trunks |
static const char *const | slastation_app = "SLAStation" |
static const char *const | slatrunk_app = "SLATrunk" |
Shared Line Appearances.
Definition in file app_sla.c.
#define S | ( | e | ) | case e: return # e; |
anonymous enum |
Definition at line 130 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 278 of file app_sla.c.
enum sla_hold_access |
Definition at line 171 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 911 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 660 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 952 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 917 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 2106 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 1794 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 |
Definition at line 2819 of file app_sla.c.
References reload(), and sla_load_config().
Referenced by load_module(), and reload().
|
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 2849 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 2120 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(), 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 2864 of file app_sla.c.
References load_config().
Referenced by load_config(), and sla_load_config().
|
static |
Definition at line 614 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 975 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_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 2472 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(), LOG_ERROR, LOG_WARNING, sla_station_ref::mark, sla_trunk_ref::mark, 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 2553 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(), LOG_ERROR, LOG_WARNING, name, sla_trunk::name, 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 2390 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, 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 1625 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 1533 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_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 1501 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, 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 880 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_trunk::name, sla_state_to_devstate(), sla_stations, sla_trunk_ref::state, 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 2361 of file app_sla.c.
References ast_strdupa, ast_strlen_zero(), 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 1239 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::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 1324 of file app_sla.c.
References AST_LIST_TRAVERSE, sla_trunk_ref::chan, 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 1223 of file app_sla.c.
References AST_LIST_TRAVERSE, 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 1357 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 729 of file app_sla.c.
References AST_LIST_TRAVERSE, 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 1078 of file app_sla.c.
References AST_LIST_TRAVERSE, 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 1935 of file app_sla.c.
References ao2_ref, AST_LIST_TRAVERSE, 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 1099 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, 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 838 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 813 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 799 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 2335 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 1070 of file app_sla.c.
References SLA_EVENT_DIAL_STATE, and sla_queue_event().
Referenced by sla_ring_station().
|
static |
Definition at line 1714 of file app_sla.c.
References ao2_ref, ast_free, and NULL.
Referenced by sla_thread().
|
static |
Definition at line 853 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 720 of file app_sla.c.
References ao2_find, name, OBJ_POINTER, and sla_stations.
Referenced by sla_build_station(), sla_state(), and sla_station_exec().
|
static |
Definition at line 707 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 1337 of file app_sla.c.
References ao2_ref, AST_LIST_TRAVERSE, 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 759 of file app_sla.c.
References ao2_ref, ast_debug, AST_LIST_TRAVERSE, sla_trunk::barge_disabled, 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 642 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 655 of file app_sla.c.
References AST_FRAME_CONTROL, and type.
Referenced by attach_framehook().
|
static |
Definition at line 1138 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, 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 1479 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 1469 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 1439 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, 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 344 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 2748 of file app_sla.c.
References ao2_container_count(), sla_stations, and sla_trunks.
Referenced by sla_load_config().
|
static |
Definition at line 2753 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 1674 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 555 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 561 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 519 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, 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 550 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 1263 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::dial, 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 1393 of file app_sla.c.
References AST_LIST_TRAVERSE, 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 828 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 2143 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 435 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, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, sla_station::hold_access, 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 361 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_trunk::hold_access, 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 2244 of file app_sla.c.
References ao2_cleanup, ao2_lock, ao2_unlock, AST_DEVICE_INVALID, AST_LIST_TRAVERSE, ast_log, ast_strdupa, buf, 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 863 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 2328 of file app_sla.c.
References CMP_MATCH, and CMP_STOP.
Referenced by sla_load_config().
|
static |
Definition at line 2297 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_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 1949 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_trunk::hold_stations, LOG_NOTICE, LOG_WARNING, MAX_CONFNUM, 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 2720 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::mark, sla_trunk_ref::mark, NULL, sla_station_release_refs(), and sla_station::trunks.
Referenced by sla_load_config().
|
static |
Definition at line 2674 of file app_sla.c.
References ao2_lock, ao2_unlock, AST_LIST_TRAVERSE, sla_station::mark, sla_trunk_ref::mark, and sla_station::trunks.
Referenced by sla_load_config().
|
static |
Definition at line 789 of file app_sla.c.
References ao2_ref, NULL, and sla_station_ref::station.
Referenced by sla_create_station_ref().
|
static |
Definition at line 2285 of file app_sla.c.
References ao2_ref, AST_LIST_REMOVE_HEAD, and sla_station::trunks.
Referenced by sla_destroy(), sla_station_destructor(), and sla_station_is_marked().
|
static |
Definition at line 1032 of file app_sla.c.
References ast_dial_destroy(), ast_dial_join(), AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE, sla_station::dial, done, 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 1018 of file app_sla.c.
References ALL_TRUNK_REFS, ao2_ref, AST_LIST_REMOVE_HEAD, sla_trunk::chan, conf_kick_all(), 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 1729 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 2321 of file app_sla.c.
References CMP_MATCH, CMP_STOP, and sla_trunk::name.
Referenced by sla_load_config().
|
static |
Definition at line 2375 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 2153 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 2692 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::mark, sla_trunk::mark, NULL, sla_trunk_release_refs(), and sla_trunk::stations.
Referenced by sla_load_config().
|
static |
Definition at line 2656 of file app_sla.c.
References ao2_lock, ao2_unlock, AST_LIST_TRAVERSE, sla_station_ref::mark, sla_trunk::mark, and sla_trunk::stations.
Referenced by sla_load_config().
|
static |
Definition at line 2096 of file app_sla.c.
References ao2_ref, NULL, and sla_trunk_ref::trunk.
Referenced by create_trunk_ref().
|
static |
Definition at line 2273 of file app_sla.c.
References ao2_ref, AST_LIST_REMOVE_HEAD, and sla_trunk::stations.
Referenced by sla_destroy(), sla_trunk_destructor(), and sla_trunk_is_marked().
|
static |
Definition at line 421 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 2824 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 514 of file app_sla.c.
Referenced by load_module(), and unload_module().
ast_cond_t cond |
Definition at line 330 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 332 of file app_sla.c.
Referenced by _ast_xmldoc_build_seealso(), 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(), bridge_channel_update_accountcodes_leaving(), check_goto(), context_merge(), decode_(), func_read(), 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 332 of file app_sla.c.
Referenced by __ovfl_put(), add_email_attachment(), add_extensions(), adsi_generate(), ast_config_engine_deregister(), ast_db_freetree(), AST_TEST_DEFINE(), build_calendar(), config_mysql(), config_odbc(), config_pgsql(), convert_bdb_to_sqlite3(), 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 331 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_threadpool_push(), ast_threadpool_set_size(), ast_unreal_channel_push_to_bridge(), bridge_basic_change_personality(), 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_sync(), consumer_should_stay(), consumer_wait_for(), consumer_wait_for_completion(), event_session_shutdown(), 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_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(), remove_hooks_on_personality_change(), remove_masquerade_store(), remove_stasis_subscriptions(), report_fax_status(), report_receive_fax_status(), report_send_fax_status(), set_touch_variables(), shutdown_has_completed(), shutdown_poke(), shutdown_task_exec(), shutdown_waitfor_completion(), shutdown_waitfor_start(), signal_condition(), 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 610 of file app_sla.c.
Referenced by attach_framehook(), and remove_framehook().
|
static |
Definition at line 275 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 272 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 156 of file app_sla.c.
Referenced by sla_trunk_exec().
|
static |
Definition at line 273 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 127 of file app_sla.c.
Referenced by load_module(), sla_build_station(), and unload_module().
|
static |
Definition at line 128 of file app_sla.c.
Referenced by load_module(), sla_build_trunk(), and unload_module().
unsigned int stop |
Definition at line 336 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 329 of file app_sla.c.
Referenced by __schedule_action(), ari_channels_handle_originate_with_id(), ast_ari_channels_create(), 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().