Asterisk - The Open Source Telephony Project
21.4.1
|
DAHDI for Pseudo TDM. More...
#include "asterisk.h"
#include <sys/sysmacros.h>
#include <signal.h>
#include <sys/stat.h>
#include <math.h>
#include "sig_analog.h"
#include "sig_pri.h"
#include "asterisk/lock.h"
#include "asterisk/channel.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/file.h"
#include "asterisk/ulaw.h"
#include "asterisk/alaw.h"
#include "asterisk/callerid.h"
#include "asterisk/adsi.h"
#include "asterisk/cli.h"
#include "asterisk/pickup.h"
#include "asterisk/features.h"
#include "asterisk/musiconhold.h"
#include "asterisk/say.h"
#include "asterisk/tdd.h"
#include "asterisk/mwi.h"
#include "asterisk/dsp.h"
#include "asterisk/astdb.h"
#include "asterisk/manager.h"
#include "asterisk/causes.h"
#include "asterisk/term.h"
#include "asterisk/utils.h"
#include "asterisk/transcap.h"
#include "asterisk/stringfields.h"
#include "asterisk/abstract_jb.h"
#include "asterisk/smdi.h"
#include "asterisk/devicestate.h"
#include "asterisk/paths.h"
#include "asterisk/ccss.h"
#include "asterisk/features_config.h"
#include "asterisk/bridge.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/parking.h"
#include "asterisk/format_cache.h"
#include "chan_dahdi.h"
#include "dahdi/bridge_native_dahdi.h"
Go to the source code of this file.
Data Structures | |
struct | dahdi_chan_conf |
Channel configuration from chan_dahdi.conf . This struct is used for parsing the [channels] section of chan_dahdi.conf. Generally there is a field here for every possible configuration item. More... | |
struct | dahdi_parms_pseudo |
struct | dahdi_pri |
struct | dahdi_starting_point |
struct | doomed_pri |
struct | doomed_pris |
struct | mwi_thread_data |
Macros | |
#define | ASCII_BYTES_PER_CHAR 80 |
#define | AST_LAW(p) (((p)->law == DAHDI_LAW_ALAW) ? ast_format_alaw : ast_format_ulaw) |
#define | CALLPROGRESS_FAX (CALLPROGRESS_FAX_INCOMING | CALLPROGRESS_FAX_OUTGOING) |
#define | CALLPROGRESS_FAX_INCOMING 4 |
#define | CALLPROGRESS_FAX_OUTGOING 2 |
#define | CALLPROGRESS_PROGRESS 1 |
#define | CALLWAITING_REPEAT_SAMPLES ((10000 * 8) / READ_SIZE) |
#define | CALLWAITING_SILENT_SAMPLES ((300 * 8) / READ_SIZE) |
#define | CALLWAITING_SUPPRESS_SAMPLES ((100 * 8) / READ_SIZE) |
#define | CANBUSYDETECT(p) (ISTRUNK(p) || (p->sig & (SIG_EM | SIG_EM_E1 | SIG_SF)) /* || (p->sig & __DAHDI_SIG_FXO) */) |
#define | CANPROGRESSDETECT(p) (ISTRUNK(p) || (p->sig & (SIG_EM | SIG_EM_E1 | SIG_SF)) /* || (p->sig & __DAHDI_SIG_FXO) */) |
#define | CHAN_PSEUDO -2 |
#define | CIDCW_EXPIRE_SAMPLES ((500 * 8) / READ_SIZE) |
#define | container_of(ptr, type, member) ((type *)((char *)(ptr) - offsetof(type, member))) |
#define | DEFAULT_CIDRINGS 1 |
Typically, how many rings before we should send Caller*ID. More... | |
#define | DEFAULT_DIALTONE_DETECT_TIMEOUT ((10000 * 8) / READ_SIZE) |
#define | DEFAULT_RINGT ((8000 * 8) / READ_SIZE) |
#define | END_SILENCE_LEN 400 |
#define | FORMAT "%7s %4d %-20.20s %-10.10s %-15.15s %-8.8s %-20.20s %-10.10s %-10.10s %-12.12s %-32.32s\n" |
#define | FORMAT "%4d %-40.40s %-7.7s %-6d %-6d %-6d %-3.3s %-4.4s %-8.8s %s\n" |
#define | FORMAT2 "%7s %4s %-20.20s %-10.10s %-15.15s %-8.8s %-20.20s %-10.10s %-10.10s %-12.12s %-32.32s\n" |
#define | FORMAT2 "%4s %-40.40s %-7.7s %-6.6s %-6.6s %-6.6s %-3.3s %-4.4s %-8.8s %s\n" |
#define | gen_pvt_field_callback(type, field) |
#define | GET_CHANNEL(p) ((p)->channel) |
#define | HANGUP 1 |
#define | HEADER_LEN ((HEADER_MS + TRAILER_MS) * 8) |
#define | HEADER_MS 50 |
#define | ISTRUNK(p) |
#define | MASK_AVAIL (1 << 0) |
#define | MASK_INUSE (1 << 1) |
#define | MAX_CHANLIST_LEN 80 |
#define | MIN_MS_SINCE_FLASH ((2000) ) |
#define | NEED_MFDETECT(p) (((p)->sig == SIG_FEATDMF) || ((p)->sig == SIG_FEATDMF_TA) || ((p)->sig == SIG_E911) || ((p)->sig == SIG_FGC_CAMA) || ((p)->sig == SIG_FGC_CAMAMF) || ((p)->sig == SIG_FEATB)) |
Signaling types that need to use MF detection should be placed in this macro. | |
#define | NUM_CADENCE_MAX 25 |
#define | NUM_SPANS 32 |
#define | POLARITY_IDLE 0 |
#define | POLARITY_REV 1 |
#define | PROC_DAHDI_OPT_NOCHAN (1 << 0) |
#define | PROC_DAHDI_OPT_NOWARN (1 << 1) |
#define | READ_SIZE 160 |
#define | REPORT_CHANNEL_ALARMS 1 |
#define | REPORT_SPAN_ALARMS 2 |
#define | sig2str dahdi_sig2str |
#define | SMDI_MD_WAIT_TIMEOUT 1500 /* 1.5 seconds */ |
#define | TRAILER_MS 5 |
#define | TRANSFER 0 |
Functions | |
static struct ast_frame * | __dahdi_exception (struct ast_channel *ast) |
static void | __reg_module (void) |
static int | __unload_module (void) |
static void | __unreg_module (void) |
int | _dahdi_get_index (struct ast_channel *ast, struct dahdi_pvt *p, int nullok, const char *fname, unsigned long line) |
static int | action_dahdidialoffhook (struct mansession *s, const struct message *m) |
static int | action_dahdidndoff (struct mansession *s, const struct message *m) |
static int | action_dahdidndon (struct mansession *s, const struct message *m) |
static int | action_dahdirestart (struct mansession *s, const struct message *m) |
static int | action_dahdishowchannels (struct mansession *s, const struct message *m) |
static int | action_dahdishowstatus (struct mansession *s, const struct message *m) |
static int | action_pri_debug_file_set (struct mansession *s, const struct message *m) |
static int | action_pri_debug_file_unset (struct mansession *s, const struct message *m) |
static int | action_pri_debug_set (struct mansession *s, const struct message *m) |
static int | action_prishowspans (struct mansession *s, const struct message *m) |
static int | action_transfer (struct mansession *s, const struct message *m) |
static int | action_transferhangup (struct mansession *s, const struct message *m) |
static char * | alarm2str (int alm) |
static int | alloc_sub (struct dahdi_pvt *p, int x) |
static void * | analog_ss_thread (void *data) |
static int | analog_tone_to_dahditone (enum analog_tone tone) |
static int | analogsub_to_dahdisub (enum analog_sub analogsub) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | attempt_transfer (struct dahdi_pvt *p) |
static int | available (struct dahdi_pvt **pvt, int is_specific_channel) |
static void | build_alarm_info (char *restrict alarmstr, struct dahdi_spaninfo *spaninfo) |
static int | build_channels (struct dahdi_chan_conf *conf, const char *value, int reload, int lineno) |
static int | bump_gains (struct dahdi_pvt *p) |
static int | calc_energy (const unsigned char *buf, int len, struct ast_format *law) |
static int | canmatch_featurecode (const char *pickupexten, const char *exten) |
static int | check_for_conference (struct dahdi_pvt *p) |
static char * | complete_span_4 (const char *line, const char *word, int pos, int state) |
static char * | complete_span_helper (const char *line, const char *word, int pos, int state, int rpos) |
static int | conf_add (struct dahdi_pvt *p, struct dahdi_subchannel *c, int index, int slavechannel) |
static int | conf_del (struct dahdi_pvt *p, struct dahdi_subchannel *c, int index) |
static struct ast_str * | create_channel_name (struct dahdi_pvt *i, int is_outgoing, char *address) |
static void | dahdi_ami_channel_event (struct dahdi_pvt *p, struct ast_channel *chan) |
static int | dahdi_answer (struct ast_channel *ast) |
static int | dahdi_call (struct ast_channel *ast, const char *rdest, int timeout) |
static int | dahdi_callwait (struct ast_channel *ast) |
static int | dahdi_cc_callback (struct ast_channel *inbound, const char *dest, ast_cc_callback_fn callback) |
Callback made when dial failed to get a channel out of dahdi_request(). More... | |
static struct dahdi_chan_conf | dahdi_chan_conf_default (void) |
static void | dahdi_close (int fd) |
static void | dahdi_close_pri_fd (struct dahdi_pri *pri, int fd_num) |
static void | dahdi_close_sub (struct dahdi_pvt *chan_pvt, int sub_num) |
void | dahdi_conf_update (struct dahdi_pvt *p) |
static int | dahdi_confmute (struct dahdi_pvt *p, int muted) |
static int | dahdi_create_channel_range (int start, int end) |
static char * | dahdi_create_channels (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | dahdi_datetime_send_option (const char *value) |
static void | dahdi_destroy_channel_range (int start, int end) |
static char * | dahdi_destroy_channels (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | dahdi_devicestate (const char *data) |
static int | dahdi_dial_str (struct dahdi_pvt *pvt, int operation, const char *dial_str) |
static int | dahdi_digit_begin (struct ast_channel *ast, char digit) |
static int | dahdi_digit_end (struct ast_channel *ast, char digit, unsigned int duration) |
static unsigned long | dahdi_display_text_option (const char *value) |
static int | dahdi_dnd (struct dahdi_pvt *dahdichan, int flag) |
enable or disable the chan_dahdi Do-Not-Disturb mode for a DAHDI channel More... | |
void | dahdi_dtmf_detect_disable (struct dahdi_pvt *p) |
void | dahdi_dtmf_detect_enable (struct dahdi_pvt *p) |
void | dahdi_ec_disable (struct dahdi_pvt *p) |
void | dahdi_ec_enable (struct dahdi_pvt *p) |
static struct ast_frame * | dahdi_exception (struct ast_channel *ast) |
static int | dahdi_fake_event (struct dahdi_pvt *p, int mode) |
static int | dahdi_fixup (struct ast_channel *oldchan, struct ast_channel *newchan) |
static int | dahdi_func_read (struct ast_channel *chan, const char *function, char *data, char *buf, size_t len) |
static int | dahdi_func_write (struct ast_channel *chan, const char *function, char *data, const char *value) |
static int | dahdi_get_event (int fd) |
Avoid the silly dahdi_getevent which ignores a bunch of events. | |
static void | dahdi_handle_dtmf (struct ast_channel *ast, int idx, struct ast_frame **dest) |
static struct ast_frame * | dahdi_handle_event (struct ast_channel *ast) |
static int | dahdi_hangup (struct ast_channel *ast) |
static void | dahdi_iflist_extract (struct dahdi_pvt *pvt) |
static void | dahdi_iflist_insert (struct dahdi_pvt *pvt) |
static int | dahdi_indicate (struct ast_channel *chan, int condition, const void *data, size_t datalen) |
static void | dahdi_lock_sub_owner (struct dahdi_pvt *pvt, int sub_idx) |
void | dahdi_master_slave_link (struct dahdi_pvt *slave, struct dahdi_pvt *master) |
void | dahdi_master_slave_unlink (struct dahdi_pvt *slave, struct dahdi_pvt *master, int needlock) |
static struct ast_channel * | dahdi_new (struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, ast_callid callid) |
static struct ast_channel * | dahdi_new_callid_clean (struct dahdi_pvt *i, int state, int startpbx, int idx, int law, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, ast_callid callid, int callid_created) |
static int | dahdi_new_pri_nobch_channel (struct sig_pri_span *pri) |
static void | dahdi_nobch_extract (struct sig_pri_span *pri, struct dahdi_pvt *pvt) |
static void | dahdi_nobch_insert (struct sig_pri_span *pri, struct dahdi_pvt *pvt) |
static int | dahdi_open (char *fn) |
static void | dahdi_pri_cc_agent_destructor (struct ast_cc_agent *agent) |
static int | dahdi_pri_cc_agent_init (struct ast_cc_agent *agent, struct ast_channel *chan) |
static void | dahdi_pri_error (struct pri *pri, char *s) |
static void | dahdi_pri_message (struct pri *pri, char *s) |
static void | dahdi_pri_update_span_devstate (struct sig_pri_span *pri) |
static int | dahdi_queryoption (struct ast_channel *chan, int option, void *data, int *datalen) |
static void | dahdi_queue_frame (struct dahdi_pvt *p, struct ast_frame *f) |
static struct ast_frame * | dahdi_read (struct ast_channel *ast) |
static struct ast_channel * | dahdi_request (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause) |
static int | dahdi_restart (void) |
static char * | dahdi_restart_cmd (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | dahdi_ring_phone (struct dahdi_pvt *p) |
static int | dahdi_send_callrerouting_facility_exec (struct ast_channel *chan, const char *data) |
static int | dahdi_send_keypad_facility_exec (struct ast_channel *chan, const char *digits) |
static int | dahdi_sendtext (struct ast_channel *c, const char *text) |
static char * | dahdi_set_dnd (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | dahdi_set_hook (int fd, int hs) |
static char * | dahdi_set_hwgain (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | dahdi_set_mwi (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | dahdi_set_swgain (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | dahdi_setlaw (int dfd, int law) |
static int | dahdi_setlinear (int dfd, int linear) |
static int | dahdi_setoption (struct ast_channel *chan, int option, void *data, int datalen) |
static char * | dahdi_show_channel (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | dahdi_show_channels (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | dahdi_show_status (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | dahdi_show_version (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | dahdi_sig2str (int sig) |
static void | dahdi_softhangup_all (void) |
static void | dahdi_train_ec (struct dahdi_pvt *p) |
static void | dahdi_unlink_pri_pvt (struct dahdi_pvt *pvt) |
static int | dahdi_wait_event (int fd) |
Avoid the silly dahdi_waitevent which ignores a bunch of events. | |
static int | dahdi_wink (struct dahdi_pvt *p, int index) |
static int | dahdi_write (struct ast_channel *ast, struct ast_frame *frame) |
static struct ast_manager_event_blob * | dahdichannel_to_ami (struct stasis_message *msg) |
static enum analog_event | dahdievent_to_analogevent (int event) |
static enum analog_sigtype | dahdisig_to_analogsig (int sig) |
static void | deep_copy_dahdi_chan_conf (struct dahdi_chan_conf *dest, const struct dahdi_chan_conf *src) |
static void | destroy_all_channels (void) |
static void | destroy_channel (struct dahdi_pvt *cur, int now) |
static void | destroy_dahdi_pvt (struct dahdi_pvt *pvt) |
static struct dahdi_pvt * | determine_starting_point (const char *data, struct dahdi_starting_point *param) |
static int | digit_to_dtmfindex (char digit) |
static void * | do_monitor (void *data) |
static int | drc_sample (int sample, float drc) |
static struct dahdi_pvt * | duplicate_pseudo (struct dahdi_pvt *src) |
static const char * | event2str (int event) |
static void | fill_rxgain (struct dahdi_gains *g, float gain, float drc, int law) |
static void | fill_txgain (struct dahdi_gains *g, float gain, float drc, int law) |
static struct dahdi_pvt * | find_channel (int channel) |
static struct dahdi_pvt * | find_channel_from_str (const char *channel) |
static struct dahdi_pvt * | find_next_iface_in_span (struct dahdi_pvt *cur) |
static struct dahdi_pvt * | fxo_pvt (struct ast_channel *chan) |
Return DAHDI pivot if channel is FXO signalled. | |
gen_pvt_field_callback (int, firstdigit_timeout) | |
gen_pvt_field_callback (int, interdigit_timeout) | |
gen_pvt_field_callback (int, matchdigit_timeout) | |
static int | get_alarms (struct dahdi_pvt *p) |
static void | handle_alarms (struct dahdi_pvt *p, int alms) |
static void | handle_clear_alarms (struct dahdi_pvt *p) |
static char * | handle_dahdi_show_cadences (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static struct dahdi_pvt * | handle_init_event (struct dahdi_pvt *i, int event) |
static char * | handle_pri_debug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_pri_destroy_span (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_pri_service_disable_channel (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_pri_service_enable_channel (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_pri_service_generic (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a, int changestatus) |
static char * | handle_pri_set_debug_file (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_pri_show_channels (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_pri_show_debug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_pri_show_span (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_pri_show_spans (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_pri_version (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | has_voicemail (struct dahdi_pvt *p) |
static int | is_group_or_channel_match (struct dahdi_pvt *p, int span, ast_group_t groupmatch, int *groupmatched, int channelmatch, int *channelmatched) |
static int | isourconf (struct dahdi_pvt *p, struct dahdi_subchannel *c) |
static int | isslavenative (struct dahdi_pvt *p, struct dahdi_pvt **out) |
static int | load_module (void) |
Load the module. More... | |
static struct dahdi_pvt * | mkintf (int channel, const struct dahdi_chan_conf *conf, int reloading) |
static void | monitor_pfds_clean (void *arg) |
static int | mwi_send_init (struct dahdi_pvt *pvt) |
static int | mwi_send_process_buffer (struct dahdi_pvt *pvt, int num_read) |
static int | mwi_send_process_event (struct dahdi_pvt *pvt, int event) |
static void * | mwi_thread (void *data) |
static void | my_all_subchannels_hungup (void *pvt) |
static int | my_allocate_sub (void *pvt, enum analog_sub analogsub) |
static void | my_ami_channel_event (void *pvt, struct ast_channel *chan) |
static void | my_answer_polarityswitch (void *pvt) |
static int | my_callwait (void *pvt) |
static void | my_cancel_cidspill (void *pvt) |
static int | my_check_confirmanswer (void *pvt) |
static int | my_check_for_conference (void *pvt) |
static int | my_check_waitingfordt (void *pvt) |
static int | my_complete_conference_update (void *pvt, int needconference) |
static int | my_conf_add (void *pvt, enum analog_sub sub) |
static int | my_conf_del (void *pvt, enum analog_sub sub) |
static int | my_confmute (void *pvt, int mute) |
static int | my_dahdi_write (struct dahdi_pvt *p, unsigned char *buf, int len, int idx, int linear) |
static void | my_deadlock_avoidance_private (void *pvt) |
static void | my_decrease_ss_count (void) |
static int | my_dial_digits (void *pvt, enum analog_sub sub, struct analog_dialoperation *dop) |
static int | my_distinctive_ring (struct ast_channel *chan, void *pvt, int idx, int *ringdata) |
static int | my_dsp_reset_and_flush_digits (void *pvt) |
static int | my_dsp_set_digitmode (void *pvt, enum analog_dsp_digitmode mode) |
static int | my_flash (void *pvt) |
static void | my_get_and_handle_alarms (void *pvt) |
static int | my_get_callerid (void *pvt, char *namebuf, char *numbuf, enum analog_event *ev, size_t timeout) |
static int | my_get_event (void *pvt) |
static const char * | my_get_orig_dialstring (void *pvt) |
static void * | my_get_sigpvt_bridged_channel (struct ast_channel *chan) |
static int | my_get_sub_fd (void *pvt, enum analog_sub sub) |
static int | my_getsigstr (struct ast_channel *chan, char *str, const char *term, int ms) |
static void | my_handle_dchan_exception (struct sig_pri_span *pri, int index) |
static void | my_handle_dtmf (void *pvt, struct ast_channel *ast, enum analog_sub analog_index, struct ast_frame **dest) |
static void | my_handle_notify_message (struct ast_channel *chan, void *pvt, int cid_flags, int neon_mwievent) |
static void | my_hangup_polarityswitch (void *pvt) |
static int | my_has_voicemail (void *pvt) |
static int | my_have_progressdetect (void *pvt) |
static void | my_increase_ss_count (void) |
static int | my_is_dialing (void *pvt, enum analog_sub sub) |
static int | my_is_off_hook (void *pvt) |
static void | my_lock_private (void *pvt) |
static void | my_module_ref (void) |
static void | my_module_unref (void) |
static struct ast_channel * | my_new_analog_ast_channel (void *pvt, int state, int startpbx, enum analog_sub sub, const struct ast_channel *requestor) |
static struct ast_channel * | my_new_pri_ast_channel (void *pvt, int state, enum sig_pri_law law, char *exten, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor) |
static int | my_off_hook (void *pvt) |
static int | my_on_hook (void *pvt) |
static int | my_play_tone (void *pvt, enum analog_sub sub, enum analog_tone tone) |
static void | my_pri_dial_digits (void *p, const char *dial_string) |
static void | my_pri_fixup_chans (void *chan_old, void *chan_new) |
static void | my_pri_init_config (void *priv, struct sig_pri_span *pri) |
static void | my_pri_make_cc_dialstring (void *priv, char *buf, size_t buf_size) |
static int | my_pri_play_tone (void *pvt, enum sig_pri_tone tone) |
static void | my_pri_ss7_open_media (void *p) |
static int | my_ring (void *pvt) |
static int | my_send_callerid (void *pvt, int cwcid, struct ast_party_caller *caller) |
static void | my_set_alarm (void *pvt, int in_alarm) |
static void | my_set_cadence (void *pvt, int *cid_rings, struct ast_channel *ast) |
static void | my_set_callerid (void *pvt, const struct ast_party_caller *caller) |
static void | my_set_callwaiting (void *pvt, int callwaiting_enable) |
static void | my_set_confirmanswer (void *pvt, int flag) |
static void | my_set_dialing (void *pvt, int is_dialing) |
static void | my_set_digital (void *pvt, int is_digital) |
static void | my_set_dnid (void *pvt, const char *dnid) |
static int | my_set_echocanceller (void *pvt, int enable) |
static void | my_set_inthreeway (void *pvt, enum analog_sub sub, int inthreeway) |
static int | my_set_linear_mode (void *pvt, enum analog_sub sub, int linear_mode) |
static void | my_set_needringing (void *pvt, int value) |
static void | my_set_new_owner (void *pvt, struct ast_channel *new_owner) |
static void | my_set_outgoing (void *pvt, int is_outgoing) |
static void | my_set_polarity (void *pvt, int value) |
static void | my_set_pulsedial (void *pvt, int flag) |
static void | my_set_rdnis (void *pvt, const char *rdnis) |
static void | my_set_ringtimeout (void *pvt, int ringt) |
static void | my_set_waitingfordt (void *pvt, struct ast_channel *ast) |
static int | my_start (void *pvt) |
static int | my_start_cid_detect (void *pvt, int cid_signalling) |
static void | my_start_polarityswitch (void *pvt) |
static int | my_stop_callwait (void *pvt) |
static int | my_stop_cid_detect (void *pvt) |
static void | my_swap_subchannels (void *pvt, enum analog_sub a, struct ast_channel *ast_a, enum analog_sub b, struct ast_channel *ast_b) |
static int | my_train_echocanceller (void *pvt) |
static int | my_unallocate_sub (void *pvt, enum analog_sub analogsub) |
static void | my_unlock_private (void *pvt) |
static int | my_wait_event (void *pvt) |
static int | my_wink (void *pvt, enum analog_sub sub) |
static void | notify_message (char *mailbox, int thereornot) |
Send MWI state change. More... | |
static int | parse_buffers_policy (const char *parse, int *num_buffers, int *policy) |
static void | parse_busy_pattern (struct ast_variable *v, struct ast_dsp_busy_pattern *busy_cadence) |
static int | polarity_read (struct ast_channel *chan, const char *cmd, char *data, char *buffer, size_t buflen) |
static int | polarity_write (struct ast_channel *chan, const char *cmd, char *data, const char *value) |
static int | prepare_pri (struct dahdi_pri *pri) |
static int | pri_create_spanmap (int span, int trunkgroup, int logicalspan) |
static int | pri_create_trunkgroup (int trunkgroup, int *channels) |
static void | pri_destroy_span (struct sig_pri_span *pri) |
static void | pri_queue_for_destruction (struct sig_pri_span *pri) |
Queue a span for destruction. More... | |
static int | pri_resolve_span (int *span, int channel, int offset, struct dahdi_spaninfo *si) |
static int | process_dahdi (struct dahdi_chan_conf *confp, const char *cat, struct ast_variable *v, int reload, int options) |
static void | process_echocancel (struct dahdi_chan_conf *confp, const char *data, unsigned int line) |
static void | publish_channel_alarm (int channel, const char *alarm_txt) |
static void | publish_channel_alarm_clear (int channel) |
static void | publish_dahdichannel (struct ast_channel *chan, ast_group_t group, int span, const char *dahdi_channel) |
Sends a DAHDIChannel channel blob used to produce DAHDIChannel AMI messages. | |
static void | publish_dnd_state (int channel, const char *status) |
static void | publish_span_alarm (int span, const char *alarm_txt) |
static void | publish_span_alarm_clear (int span) |
static void | release_doomed_pris (void) |
static int | reload (void) |
static int | reset_conf (struct dahdi_pvt *p) |
static int | restart_monitor (void) |
static int | restore_conference (struct dahdi_pvt *p) |
static int | restore_gains (struct dahdi_pvt *p) |
static int | revert_fax_buffers (struct dahdi_pvt *p, struct ast_channel *ast) |
static int | save_conference (struct dahdi_pvt *p) |
static int | send_callerid (struct dahdi_pvt *p) |
static int | send_cwcidspill (struct dahdi_pvt *p) |
static int | set_actual_gain (int fd, float rxgain, float txgain, float rxdrc, float txdrc, int law) |
static int | set_actual_rxgain (int fd, float gain, float drc, int law) |
static int | set_actual_txgain (int fd, float gain, float drc, int law) |
static int | set_hwgain (int fd, float gain, int tx_direction) |
static int | setup_dahdi (int reload) |
static int | setup_dahdi_int (int reload, struct dahdi_chan_conf *default_conf, struct dahdi_chan_conf *base_conf, struct dahdi_chan_conf *conf) |
static int | sig_pri_tone_to_dahditone (enum sig_pri_tone tone) |
static int | sigtype_to_signalling (int sigtype) |
STASIS_MESSAGE_TYPE_DEFN_LOCAL (dahdichannel_type,.to_ami=dahdichannel_to_ami,) | |
static void | swap_subs (struct dahdi_pvt *p, int a, int b) |
static int | unalloc_sub (struct dahdi_pvt *p, int x) |
static int | unload_module (void) |
static void | wakeup_sub (struct dahdi_pvt *p, int a) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = tdesc , .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 = "da6642af068ee5e6490c5b1d2cc1d238" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, .requires = "ccss", .optional_modules = "res_smdi", } |
struct { | |
int alarm | |
char * name | |
} | alarms [] |
struct analog_callback | analog_callbacks |
static struct dahdi_ring_cadence | AS_RP_cadence = {{250, 10000}} |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct dahdi_ring_cadence | cadences [NUM_CADENCE_MAX] |
static int | cidrings [NUM_CADENCE_MAX] |
cidrings says in which pause to transmit the cid information, where the first pause is 1, the second pause is 2 and so on. | |
static const char | config [] = "chan_dahdi.conf" |
static struct ast_cli_entry | dahdi_cli [] |
static struct ast_cc_agent_callbacks | dahdi_pri_cc_agent_callbacks |
static struct ast_cc_monitor_callbacks | dahdi_pri_cc_monitor_callbacks |
static const char | dahdi_pri_cc_type [] = "DAHDI/PRI" |
static struct ast_cli_entry | dahdi_pri_cli [] |
static struct dahdi_parms_pseudo | dahdi_pseudo_parms |
static char * | dahdi_send_callrerouting_facility_app = "DAHDISendCallreroutingFacility" |
static char * | dahdi_send_keypad_facility_app = "DAHDISendKeypadFacility" |
static struct ast_channel_tech | dahdi_tech |
static struct ast_jb_conf | default_jbconf |
static char | defaultcic [64] = "" |
static char | defaultozz [64] = "" |
static int | distinctiveringaftercid = 0 |
static struct doomed_pris | doomed_pris = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static int | dtmfcid_level = 256 |
static const char *const | events [] |
static struct ast_jb_conf | global_jbconf |
static int | has_pseudo |
static int | ifcount = 0 |
static struct dahdi_pvt * | ifend = NULL |
static struct dahdi_pvt * | iflist = NULL |
static ast_mutex_t | iflock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
Protect the interface list (of dahdi_pvt's) | |
static const char *const | lbostr [] |
static pthread_t | monitor_thread = AST_PTHREADT_NULL |
This is the thread for the monitor which checks for input on the channels which are not currently in use. | |
static ast_mutex_t | monlock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
Protect the monitoring thread, so only one process can kill or start it, and not when it's doing something critical. | |
static int | mwilevel = 512 |
static char | mwimonitornotify [PATH_MAX] = "" |
static int | num_cadence = 4 |
static int | num_restart_pending = 0 |
static int | numbufs = 4 |
static struct ast_custom_function | polarity_function |
static int | pridebugfd = -1 |
static ast_mutex_t | pridebugfdlock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static char | pridebugfilename [1024] = "" |
static struct dahdi_pri | pris [NUM_SPANS] |
static char | progzone [10] = "" |
static int | report_alarms = REPORT_CHANNEL_ALARMS |
static ast_mutex_t | restart_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static int | ringt_base = DEFAULT_RINGT |
Configured ring timeout base. More... | |
static struct dahdi_pvt * | round_robin [64] |
struct sig_pri_callback | sig_pri_callbacks |
static ast_cond_t | ss_thread_complete |
static int | ss_thread_count = 0 |
static ast_mutex_t | ss_thread_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
const char *const | subnames [] |
static const char | tdesc [] |
static int | usedistinctiveringdetection = 0 |
static int | user_has_defined_cadences = 0 |
DAHDI for Pseudo TDM.
Connects to the DAHDI telephony library as well as libpri. Libpri is optional and needed only if you are going to use ISDN connections.
You need to install libraries before you attempt to compile and install the DAHDI channel.
Definition in file chan_dahdi.c.
#define CALLWAITING_REPEAT_SAMPLES ((10000 * 8) / READ_SIZE) |
10,000 ms
Definition at line 800 of file chan_dahdi.c.
#define CALLWAITING_SILENT_SAMPLES ((300 * 8) / READ_SIZE) |
300 ms
Definition at line 799 of file chan_dahdi.c.
#define CALLWAITING_SUPPRESS_SAMPLES ((100 * 8) / READ_SIZE) |
100 ms
Definition at line 801 of file chan_dahdi.c.
#define CIDCW_EXPIRE_SAMPLES ((500 * 8) / READ_SIZE) |
500 ms
Definition at line 802 of file chan_dahdi.c.
#define DEFAULT_CIDRINGS 1 |
Typically, how many rings before we should send Caller*ID.
Definition at line 640 of file chan_dahdi.c.
Referenced by dahdi_chan_conf_default().
#define DEFAULT_DIALTONE_DETECT_TIMEOUT ((10000 * 8) / READ_SIZE) |
10,000 ms
Definition at line 805 of file chan_dahdi.c.
#define DEFAULT_RINGT ((8000 * 8) / READ_SIZE) |
8,000 ms
Definition at line 804 of file chan_dahdi.c.
#define gen_pvt_field_callback | ( | type, | |
field | |||
) |
Definition at line 3603 of file chan_dahdi.c.
#define ISTRUNK | ( | p | ) |
Definition at line 711 of file chan_dahdi.c.
#define MASK_AVAIL (1 << 0) |
Channel available for PRI use
Definition at line 796 of file chan_dahdi.c.
#define MASK_INUSE (1 << 1) |
Channel currently in use
Definition at line 797 of file chan_dahdi.c.
#define MAX_CHANLIST_LEN 80 |
The length of the parameters list of 'dahdichan'.
Definition at line 18297 of file chan_dahdi.c.
#define MIN_MS_SINCE_FLASH ((2000) ) |
2000 ms
Definition at line 803 of file chan_dahdi.c.
#define PROC_DAHDI_OPT_NOCHAN (1 << 0) |
process_dahdi() - ignore keyword 'channel' and similar
Definition at line 18432 of file chan_dahdi.c.
#define PROC_DAHDI_OPT_NOWARN (1 << 1) |
process_dahdi() - No warnings on non-existing cofiguration keywords
Definition at line 18434 of file chan_dahdi.c.
#define READ_SIZE 160 |
Chunk size to read – we use 20ms chunks to make things happy.
Definition at line 794 of file chan_dahdi.c.
Referenced by dahdi_setoption().
|
static |
Definition at line 6699 of file chan_dahdi.c.
References ast_debug, ast_setstate(), AST_STATE_UP, dahdi_pvt::channel, dahdi_pvt::lock, dahdi_pvt::oprmode, dahdi_pvt::radio, dahdi_pvt::sig, and SUB_REAL.
|
static |
Callback made when dial failed to get a channel out of dahdi_request().
inbound | Incoming asterisk channel. |
dest | Same dial string passed to dahdi_request(). |
callback | Callback into CC core to announce a busy channel available for CC. |
This callback acts like a forked dial with all prongs of the fork busy. Essentially, for each channel that could have taken the call, indicate that it is busy.
0 | on success. |
-1 | on error. |
Definition at line 14146 of file chan_dahdi.c.
References AST_CC_GENERIC_MONITOR_TYPE, AST_CC_MONITOR_ALWAYS, AST_CC_MONITOR_GENERIC, AST_CC_MONITOR_NEVER, AST_CHANNEL_NAME, ast_get_cc_monitor_policy(), ast_str_buffer(), dahdi_starting_point::backwards, sig_pri_span::cc_params, dahdi_starting_point::channelmatch, dahdi_starting_point::groupmatch, iflist, iflock, dahdi_pvt::next, dahdi_pvt::prev, dahdi_pvt::sig, sig_pri_span::span, and dahdi_starting_point::span.
|
static |
returns a new dahdi_chan_conf with default values (by-value)
Definition at line 990 of file chan_dahdi.c.
References ANALOG_FIRST_DIGIT_TIMEOUT, ANALOG_INTER_DIGIT_TIMEOUT, ANALOG_MATCH_DIGIT_TIMEOUT, ast_cc_config_params_init, DEFAULT_CIDRINGS, sig_pri_span::nsf, and SIG_PRI_COLP_UPDATE.
|
static |
enable or disable the chan_dahdi Do-Not-Disturb mode for a DAHDI channel
dahdichan | "Physical" DAHDI channel (e.g: DAHDI/5) |
flag | on 1 to enable, 0 to disable, -1 return dnd value |
chan_dahdi has a DND (Do Not Disturb) mode for each dahdichan (physical DAHDI channel). Use this to enable or disable it.
Definition at line 9843 of file chan_dahdi.c.
References dahdi_pvt::channel, dahdi_pvt::dnd, dahdi_pvt::oprmode, dahdi_pvt::radio, and dahdi_pvt::sig.
|
static |
Definition at line 6843 of file chan_dahdi.c.
References ast_check_hangup(), ast_debug, ast_dsp_set_digitmode(), ast_dsp_set_features(), AST_OPTION_AUDIO_MODE, AST_OPTION_DIGIT_DETECT, AST_OPTION_ECHOCAN, AST_OPTION_FAX_DETECT, AST_OPTION_RELAXDTMF, AST_OPTION_RXGAIN, AST_OPTION_TDD, AST_OPTION_TONE_VERIFY, AST_OPTION_TXGAIN, ast_tdd_gen_ecdisa(), dahdi_pvt::channel, dahdi_pvt::didtdd, dahdi_pvt::dsp, DSP_DIGITMODE_DTMF, DSP_DIGITMODE_MUTECONF, DSP_DIGITMODE_MUTEMAX, DSP_DIGITMODE_RELAXDTMF, dahdi_pvt::dsp_features, dahdi_pvt::dtmfrelax, dahdi_pvt::law, dahdi_pvt::mate, dahdi_pvt::oprmode, dahdi_pvt::oprpeer, READ_SIZE, dahdi_pvt::rxgain, dahdi_pvt::sig, SUB_REAL, dahdi_pvt::subs, dahdi_pvt::tdd, tdd_free(), tdd_new(), dahdi_pvt::txdrc, and dahdi_pvt::txgain.
|
static |
Checks channel for alarms
p | a channel to check for alarms. |
Definition at line 7567 of file chan_dahdi.c.
References dahdi_pvt::channel, dahdi_pvt::span, SUB_REAL, and dahdi_pvt::subs.
Referenced by mkintf().
|
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 20279 of file chan_dahdi.c.
References ao2_ref, ast_cc_agent_register(), ast_cc_monitor_register(), ast_channel_register(), ast_cli_register_multiple, ast_custom_function_register, ast_format_alaw, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_slin, ast_format_ulaw, ast_manager_register_xml, AST_MODULE_LOAD_DECLINE, ast_register_application_xml, ast_channel_tech::capabilities, sig_pri_load(), and STASIS_MESSAGE_TYPE_INIT.
|
static |
< Current channel structure initializing
< TRUE if the channel interface already exists.
Definition at line 12493 of file chan_dahdi.c.
References dahdi_pvt::accountcode, dahdi_pvt::adsi, sig_pri_span::allow_call_waiting_calls, dahdi_pvt::amaflags, dahdi_pvt::ani_info_digits, dahdi_pvt::ani_timeout, dahdi_pvt::ani_wink_time, dahdi_pvt::answeronpolarityswitch, sig_pri_span::aoc_passthrough_flag, sig_pri_span::aoce_delayhangup, sig_pri_span::append_msn_to_user_tag, ast_calloc, ast_cc_config_params_init, ast_cc_copy_config_params(), ast_copy_string(), ast_db_del(), ast_db_get(), ast_dsp_set_digitmode(), ast_mwi_subscribe_pool(), ast_smdi_interface_find(), ast_variable_list_replace(), ast_variables_destroy(), dahdi_pvt::buf_no, dahdi_parms_pseudo::buf_no, dahdi_pvt::buf_policy, dahdi_parms_pseudo::buf_policy, dahdi_pvt::bufsize, dahdi_pvt::busy_cadence, dahdi_pvt::busycount, dahdi_pvt::busydetect, dahdi_pvt::calledsubscriberheld, analog_pvt::calledsubscriberheld, dahdi_pvt::callgroup, dahdi_pvt::callprogress, dahdi_pvt::callreturn, dahdi_pvt::callwaiting, dahdi_pvt::callwaitingcallerid, analog_pvt::callwaitingcallerid, dahdi_pvt::cancallforward, dahdi_pvt::canpark, sig_pri_span::cc_params, sig_pri_span::cc_ptmp_recall_mode, sig_pri_span::cc_qsig_signaling_link_req, sig_pri_span::cc_qsig_signaling_link_rsp, sig_ss7_chan::channel, sig_pri_chan::channel, analog_pvt::channel, dahdi_pvt::channel, sig_ss7_chan::cic, dahdi_pvt::cid_name, dahdi_pvt::cid_num, dahdi_pvt::cid_rxgain, analog_pvt::cid_signalling, dahdi_pvt::cid_signalling, dahdi_pvt::cid_start, dahdi_pvt::cid_subaddr, dahdi_pvt::cid_tag, dahdi_pvt::cid_ton, sig_pri_span::colp_send, dahdi_pvt::confno, dahdi_pvt::context, sig_pri_span::cpndialplan, dahdi_db, analog_pvt::dahditrcallerid, dahdi_pvt::dahditrcallerid, sig_pri_span::datetime_send, dahdi_pvt::defcontext, dahdi_pvt::description, dahdi_pvt::destroy, dahdi_pvt::dialmode, analog_pvt::dialmode, sig_pri_span::dialplan, dahdi_pvt::dialtone_detect, sig_pri_span::discardremoteholdretrieval, sig_pri_span::display_flags_receive, sig_pri_span::display_flags_send, sig_ss7_chan::dpc, dahdi_pvt::drings, dahdi_pvt::dsp, DSP_DIGITMODE_DTMF, dahdi_pvt::dtmfrelax, dahdi_pvt::echocanbridged, dahdi_pvt::echocancel, dahdi_pvt::echotraining, sig_pri_span::enable_service_message_support, sig_pri_span::facilityenable, dahdi_pvt::faxbuf_no, dahdi_parms_pseudo::faxbuf_no, dahdi_pvt::faxbuf_policy, dahdi_parms_pseudo::faxbuf_policy, dahdi_pvt::faxdetect_timeout, ast_variable::file, dahdi_pvt::firstdigit_timeout, dahdi_pvt::firstradio, sig_pri_span::force_restart_unavailable_chans, get_alarms(), dahdi_pvt::group, dahdi_pvt::hanguponpolarityswitch, sig_ss7_chan::hidecallerid, dahdi_pvt::hidecallerid, sig_pri_chan::hidecalleridname, dahdi_pvt::hidecalleridname, sig_pri_span::hidecalleridname, sig_pri_span::hold_disconnect_transfer, dahdi_pvt::hwrxgain, dahdi_pvt::hwrxgain_enabled, dahdi_pvt::hwtxgain, dahdi_pvt::hwtxgain_enabled, sig_pri_span::idledial, sig_pri_span::idleext, sig_ss7_chan::immediate, sig_pri_chan::immediate, dahdi_pvt::immediate, sig_pri_span::immediate, analog_pvt::immediatering, dahdi_pvt::immediatering, sig_ss7_chan::inalarm, dahdi_pvt::inalarm, sig_pri_span::inband_on_proceeding, sig_pri_span::inband_on_setup_ack, sig_pri_span::inbanddisconnect, sig_pri_span::initial_user_tag, sig_ss7_chan::inservice, dahdi_pvt::inservice, dahdi_pvt::interdigit_timeout, sig_pri_span::internationalprefix, dahdi_chan_conf::is_sig_auto, sig_pri_span::l2_persistence, dahdi_pvt::language, dahdi_pvt::law, dahdi_pvt::law_default, sig_pri_span::layer1_ignored, sig_pri_span::localdialplan, sig_ss7_chan::locallyblocked, dahdi_pvt::locallyblocked, sig_pri_span::localprefix, dahdi_pvt::lock, dahdi_pvt::mailbox, dahdi_pri::mastertrunkgroup, dahdi_pvt::matchdigit_timeout, sig_pri_span::max_call_waiting_calls, sig_pri_span::mcid_send, sig_pri_span::minidle, sig_pri_span::minunused, dahdi_pvt::mohinterpret, dahdi_pvt::mohsuggest, analog_pvt::msgstate, sig_pri_span::msn_list, dahdi_pvt::mwi_event_sub, sig_pri_span::mwi_mailboxes, sig_pri_span::mwi_vm_boxes, sig_pri_span::mwi_vm_numbers, dahdi_pvt::mwimonitor_fsk, dahdi_pvt::mwimonitor_neon, dahdi_pvt::mwimonitor_rpas, dahdi_pvt::mwisend_rpas, dahdi_pvt::mwisend_setting, ast_variable::name, dahdi_pvt::named_callgroups, dahdi_pvt::named_pickupgroups, sig_pri_span::nationalprefix, ast_variable::next, dahdi_pvt::next, sig_pri_span::nodetype, sig_pri_span::nsf, sig_pri_span::numchans, dahdi_pvt::oprmode, dahdi_pvt::outsigmod, sig_pri_span::overlapdial, dahdi_pvt::parkinglot, analog_pvt::permcallwaiting, dahdi_pvt::permcallwaiting, analog_pvt::permhidecallerid, dahdi_pvt::permhidecallerid, dahdi_pvt::pickupgroup, dahdi_pvt::polarityonanswerdelay, sig_pri_chan::priexclusive, dahdi_pvt::priexclusive, sig_pri_span::priexclusive, dahdi_pvt::priindication_oob, dahdi_pri::prilogicalspan, sig_pri_span::privateprefix, dahdi_pvt::propconfno, dahdi_pvt::pulse, sig_pri_span::pvts, sig_pri_span::qsigchannelmapping, dahdi_pvt::radio, sig_ss7_chan::remotelyblocked, dahdi_pvt::remotelyblocked, dahdi_pvt::reoriginate, sig_pri_span::resetinterval, dahdi_pvt::restrictcid, dahdi_pvt::ringt, dahdi_pvt::ringt_base, ringt_base, dahdi_pvt::rxgain, dahdi_pvt::sendcalleridafter, dahdi_pvt::sig, sig_pri_span::sig, SIG_PRI_NUM_DCHANS, analog_pvt::smdi_iface, dahdi_pvt::smdi_iface, dahdi_chan_conf::smdi_port, dahdi_pvt::span, SRVST_DBKEY, SRVST_FAREND, SRVST_NEAREND, stasis_subscription_cb_noop(), sig_ss7_chan::stripmsd, dahdi_pvt::stripmsd, SUB_REAL, dahdi_pvt::subs, sig_pri_span::switchtype, dahdi_pvt::threewaycalling, dahdi_pvt::threewaysilenthold, dahdi_pvt::tonezone, dahdi_pvt::transfer, sig_pri_span::transfer, analog_pvt::transfertobusy, dahdi_pvt::transfertobusy, dahdi_pvt::txdrc, dahdi_pvt::txgain, sig_pri_span::unknownprefix, sig_ss7_chan::use_callerid, sig_pri_chan::use_callerid, analog_pvt::use_callerid, dahdi_pvt::use_callerid, sig_pri_span::use_callerid, sig_ss7_chan::use_callingpres, sig_pri_chan::use_callingpres, dahdi_pvt::use_callingpres, sig_pri_span::use_callingpres, analog_pvt::use_smdi, dahdi_pvt::use_smdi, dahdi_pvt::usedistinctiveringdetection, dahdi_pvt::usefaxbuffers, ast_variable::value, dahdi_pvt::vars, and dahdi_pvt::waitfordialtone.
|
static |
Send MWI state change.
mailbox | This is the mailbox associated with the FXO line that the MWI state has changed on. |
thereornot | This argument should simply be set to 1 or 0, to indicate whether there are messages waiting or not. |
This function does two things:
1) It generates an internal Asterisk event notifying any other module that cares about MWI that the state of a mailbox has changed.
2) It runs the script specified by the mwimonitornotify option to allow some custom handling of the state change.
Definition at line 3553 of file chan_dahdi.c.
References ast_publish_mwi_state, ast_safe_system(), and mwimonitornotify.
|
static |
Queue a span for destruction.
pri | the span to destroy |
Add a span to the list of spans to be destroyed later on by the monitor thread. Allows destroying a span while holding its lock.
Definition at line 1313 of file chan_dahdi.c.
References ast_calloc, ast_debug, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, and sig_pri_span::span.
struct analog_callback analog_callbacks |
Global analog callbacks to the upper layer.
Definition at line 3616 of file chan_dahdi.c.
|
static |
DAHDI PRI CCSS agent and monitor type name.
Definition at line 904 of file chan_dahdi.c.
|
static |
Global jitterbuffer configuration - by default, jb is disabled
Definition at line 618 of file chan_dahdi.c.
|
static |
Main interface list end
Definition at line 923 of file chan_dahdi.c.
|
static |
Main interface list start
Definition at line 922 of file chan_dahdi.c.
Referenced by dahdi_cc_callback().
|
static |
Run this script when the MWI state changes on an FXO line, if mwimonitor is enabled
Definition at line 721 of file chan_dahdi.c.
Referenced by notify_message().
|
static |
Definition at line 2915 of file chan_dahdi.c.
|
static |
Configured ring timeout base.
Definition at line 811 of file chan_dahdi.c.
Referenced by mkintf().
|
static |
Round robin search locations.
Definition at line 3690 of file chan_dahdi.c.
struct sig_pri_callback sig_pri_callbacks |
Global sig_pri callbacks to the upper layer.
Definition at line 3310 of file chan_dahdi.c.
Referenced by sig_pri_dial_complete().
const char* const subnames[] |
Definition at line 916 of file chan_dahdi.c.
|
static |
Definition at line 648 of file chan_dahdi.c.