PRI signaling module. More...
#include "asterisk.h"
#include <errno.h>
#include <ctype.h>
#include <signal.h>
#include "asterisk/utils.h"
#include "asterisk/options.h"
#include "asterisk/pbx.h"
#include "asterisk/app.h"
#include "asterisk/file.h"
#include "asterisk/callerid.h"
#include "asterisk/say.h"
#include "asterisk/manager.h"
#include "asterisk/astdb.h"
#include "asterisk/causes.h"
#include "asterisk/musiconhold.h"
#include "asterisk/cli.h"
#include "asterisk/transcap.h"
#include "asterisk/features.h"
#include "asterisk/aoc.h"
#include "sig_pri.h"
Go to the source code of this file.
Data Structures | |
struct | sig_pri_cc_agent_prv |
struct | sig_pri_cc_monitor_instance |
struct | xfer_rsp_data |
Macros | |
#define | DCHAN_AVAILABLE (DCHAN_NOTINALARM | DCHAN_UP) |
#define | DCHAN_NOTINALARM (1 << 0) |
#define | DCHAN_UP (1 << 1) |
#define | FORCE_RESTART_UNAVAIL_CHANS 1 |
#define | PRI_CHANNEL(p) ((p) & 0xff) |
#define | PRI_CIS_CALL (1 << 17) /* Call is using the D channel only. */ |
#define | PRI_EXPLICIT (1 << 16) |
#define | PRI_HELD_CALL (1 << 18) |
#define | PRI_SPAN(p) (((p) >> 8) & 0xff) |
#define | SIG_PRI_SC_HEADER "%-4s %4s %-4s %-4s %-10s %-4s %s\n" |
#define | SIG_PRI_SC_LINE "%4d %4d %-4s %-4s %-10s %-4s %s" |
Typedefs | |
typedef void(* | xfer_rsp_callback )(void *data, int is_successful) |
Protocol callback to indicate if transfer will happen. More... | |
Enumerations | |
enum | SIG_PRI_CALL_OPT_ARGS { OPT_ARG_KEYPAD = 0, OPT_ARG_AOC_REQUEST, OPT_ARG_ARRAY_SIZE } |
enum | SIG_PRI_CALL_OPT_FLAGS { OPT_KEYPAD = (1 << 0), OPT_REVERSE_CHARGE = (1 << 1), OPT_AOC_REQUEST = (1 << 2) } |
Functions | |
static void | apply_plan_to_existing_number (char *buf, size_t size, const struct sig_pri_span *pri, const char *number, int plan) |
static void | apply_plan_to_number (char *buf, size_t size, const struct sig_pri_span *pri, const char *number, int plan) |
static unsigned char | ast_pri_pack_hex_char (char c) |
static int | ast_pri_pack_hex_string (unsigned char *dst, char *src, int maxlen) |
static int | ast_to_pri_char_set (enum AST_PARTY_CHAR_SET ast_char_set) |
static int | ast_to_pri_presentation (int ast_presentation) |
static int | ast_to_pri_reason (enum AST_REDIRECTING_REASON ast_reason) |
static void | build_status (char *s, size_t len, int status, int active) |
static int | detect_aoc_e_subcmd (const struct pri_subcommands *subcmds) |
static char * | dialplan2str (int dialplan) |
static void * | do_idle_thread (void *v_pvt) |
static int | pri_active_dchan_index (struct sig_pri_span *pri) |
static void | pri_check_restart (struct sig_pri_span *pri) |
static void * | pri_dchannel (void *vpri) |
void | pri_event_alarm (struct sig_pri_span *pri, int index, int before_start_pri) |
void | pri_event_noalarm (struct sig_pri_span *pri, int index, int before_start_pri) |
static void | pri_find_dchan (struct sig_pri_span *pri) |
static int | pri_find_empty_chan (struct sig_pri_span *pri, int backwards) |
static int | pri_find_empty_nobch (struct sig_pri_span *pri) |
static int | pri_find_fixup_principle (struct sig_pri_span *pri, int channel, q931_call *call) |
static int | pri_find_principle (struct sig_pri_span *pri, int channel, q931_call *call) |
static int | pri_find_principle_by_call (struct sig_pri_span *pri, q931_call *call) |
static int | pri_fixup_principle (struct sig_pri_span *pri, int principle, q931_call *call) |
static int | pri_grab (struct sig_pri_chan *p, struct sig_pri_span *pri) |
int | pri_is_up (struct sig_pri_span *pri) |
int | pri_maintenance_bservice (struct pri *pri, struct sig_pri_chan *p, int changestatus) |
static const char * | pri_order (int level) |
static void | pri_queue_control (struct sig_pri_span *pri, int chanpos, int subclass) |
static void | pri_queue_frame (struct sig_pri_span *pri, int chanpos, struct ast_frame *frame) |
static void | pri_rel (struct sig_pri_span *pri) |
int | pri_send_callrerouting_facility_exec (struct sig_pri_chan *p, enum ast_channel_state chanstate, const char *destination, const char *original, const char *reason) |
int | pri_send_keypad_facility_exec (struct sig_pri_chan *p, const char *digits) |
static void * | pri_ss_thread (void *data) |
static enum AST_PARTY_CHAR_SET | pri_to_ast_char_set (int pri_char_set) |
static int | pri_to_ast_presentation (int pri_presentation) |
static enum AST_REDIRECTING_REASON | pri_to_ast_reason (int pri_reason) |
static unsigned int | PVT_TO_CHANNEL (struct sig_pri_chan *p) |
static char * | redirectingreason2str (int redirectingreason) |
static void | sig_pri_ami_channel_event (struct sig_pri_chan *p) |
int | sig_pri_answer (struct sig_pri_chan *p, struct ast_channel *ast) |
static enum ast_aoc_s_charged_item | sig_pri_aoc_charged_item_to_ast (enum PRI_AOC_CHARGED_ITEM value) |
static enum PRI_AOC_CHARGED_ITEM | sig_pri_aoc_charged_item_to_pri (enum PRI_AOC_CHARGED_ITEM value) |
static void | sig_pri_aoc_d_from_ast (struct sig_pri_chan *pvt, struct ast_aoc_decoded *decoded) |
static void | sig_pri_aoc_d_from_pri (const struct pri_subcmd_aoc_d *aoc_d, struct ast_channel *owner, int passthrough) |
static void | sig_pri_aoc_e_from_ast (struct sig_pri_chan *pvt, struct ast_aoc_decoded *decoded) |
static void | sig_pri_aoc_e_from_pri (const struct pri_subcmd_aoc_e *aoc_e, struct ast_channel *owner, int passthrough) |
static int | sig_pri_aoc_multiplier_from_ast (enum ast_aoc_currency_multiplier mult) |
static int | sig_pri_aoc_multiplier_from_pri (const int mult) |
static void | sig_pri_aoc_request_from_pri (const struct pri_subcmd_aoc_request *aoc_request, struct sig_pri_chan *pvt, q931_call *call) |
static void | sig_pri_aoc_s_from_ast (struct sig_pri_chan *pvt, struct ast_aoc_decoded *decoded) |
static void | sig_pri_aoc_s_from_pri (const struct pri_subcmd_aoc_s *aoc_s, struct ast_channel *owner, int passthrough) |
static enum ast_aoc_time_scale | sig_pri_aoc_scale_to_ast (enum PRI_AOC_TIME_SCALE value) |
static enum PRI_AOC_TIME_SCALE | sig_pri_aoc_scale_to_pri (enum ast_aoc_time_scale value) |
static int | sig_pri_attempt_transfer (struct sig_pri_span *pri, q931_call *call_1_pri, int call_1_held, q931_call *call_2_pri, int call_2_held, xfer_rsp_callback rsp_callback, void *data) |
int | sig_pri_available (struct sig_pri_chan **pvt, int is_specific_channel) |
static int | sig_pri_available_check (struct sig_pri_chan *pvt) |
int | sig_pri_call (struct sig_pri_chan *p, struct ast_channel *ast, char *rdest, int timeout, int layer1) |
static const char * | sig_pri_call_level2str (enum sig_pri_call_level level) |
int | sig_pri_cc_agent_callee_available (struct ast_cc_agent *agent) |
Alert the caller that it is time to try recalling. More... | |
static int | sig_pri_cc_agent_cmp_cc_id (void *obj, void *arg, int flags) |
void | sig_pri_cc_agent_destructor (struct ast_cc_agent *agent) |
Destroy private data on the agent. More... | |
int | sig_pri_cc_agent_init (struct ast_cc_agent *agent, struct sig_pri_chan *pvt_chan) |
PRI CC agent initialization. More... | |
int | sig_pri_cc_agent_party_b_free (struct ast_cc_agent *agent) |
Let the caller know that the callee has become free but that the caller cannot attempt to call back because he is either busy or there is congestion on his line. More... | |
void | sig_pri_cc_agent_req_rsp (struct ast_cc_agent *agent, enum ast_cc_agent_response_reason reason) |
Response to a CC request. More... | |
int | sig_pri_cc_agent_start_monitoring (struct ast_cc_agent *agent) |
Begin monitoring a busy device. More... | |
int | sig_pri_cc_agent_start_offer_timer (struct ast_cc_agent *agent) |
Start the offer timer. More... | |
int | sig_pri_cc_agent_status_req (struct ast_cc_agent *agent) |
Request the status of the agent's device. More... | |
int | sig_pri_cc_agent_stop_offer_timer (struct ast_cc_agent *agent) |
Stop the offer timer. More... | |
int | sig_pri_cc_agent_stop_ringing (struct ast_cc_agent *agent) |
Request for an agent's phone to stop ringing. More... | |
static int | sig_pri_cc_available (struct sig_pri_span *pri, int chanpos, long cc_id, enum ast_cc_service_type service) |
static void | sig_pri_cc_generic_check (struct sig_pri_span *pri, int chanpos, enum ast_cc_service_type service) |
static void | sig_pri_cc_link_canceled (struct sig_pri_span *pri, long cc_id, int is_agent) |
int | sig_pri_cc_monitor_cancel_available_timer (struct ast_cc_monitor *monitor, int *sched_id) |
Cancel the running available timer. More... | |
static int | sig_pri_cc_monitor_cmp_cc_id (void *obj, void *arg, int flags) |
void | sig_pri_cc_monitor_destructor (void *monitor_pvt) |
Destroy PRI private data on the monitor. More... | |
static int | sig_pri_cc_monitor_instance_cmp_fn (void *obj, void *arg, int flags) |
static void | sig_pri_cc_monitor_instance_destroy (void *data) |
static int | sig_pri_cc_monitor_instance_hash_fn (const void *obj, const int flags) |
static struct sig_pri_cc_monitor_instance * | sig_pri_cc_monitor_instance_init (int core_id, struct sig_pri_span *pri, long cc_id, const char *device_name) |
int | sig_pri_cc_monitor_req_cc (struct ast_cc_monitor *monitor, int *available_timer_id) |
Request CCSS. More... | |
int | sig_pri_cc_monitor_status_rsp (struct ast_cc_monitor *monitor, enum ast_device_state devstate) |
Status response to an ast_cc_monitor_status_request(). More... | |
int | sig_pri_cc_monitor_suspend (struct ast_cc_monitor *monitor) |
Suspend monitoring. More... | |
int | sig_pri_cc_monitor_unsuspend (struct ast_cc_monitor *monitor) |
Unsuspend monitoring. More... | |
void | sig_pri_chan_alarm_notify (struct sig_pri_chan *p, int noalarm) |
Notify new alarm status. More... | |
void | sig_pri_chan_delete (struct sig_pri_chan *doomed) |
Delete the sig_pri private channel structure. More... | |
struct sig_pri_chan * | sig_pri_chan_new (void *pvt_data, struct sig_pri_callback *callback, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup) |
void | sig_pri_cli_show_channels (int fd, struct sig_pri_span *pri) |
void | sig_pri_cli_show_channels_header (int fd) |
void | sig_pri_cli_show_span (int fd, int *dchannels, struct sig_pri_span *pri) |
void | sig_pri_cli_show_spans (int fd, int span, struct sig_pri_span *pri) |
static int | sig_pri_cmp_pri_chans (const void *left, const void *right) |
static struct sig_pri_chan * | sig_pri_cw_available (struct sig_pri_span *pri) |
void | sig_pri_dial_complete (struct sig_pri_chan *pvt, struct ast_channel *ast) |
DTMF dial string complete. More... | |
static void | sig_pri_dial_digits (struct sig_pri_chan *p, const char *dial_string) |
int | sig_pri_digit_begin (struct sig_pri_chan *pvt, struct ast_channel *ast, char digit) |
static void | sig_pri_dsp_reset_and_flush_digits (struct sig_pri_chan *p) |
static void | sig_pri_event_party_id (struct ast_str **msg, const char *prefix, struct ast_party_id *party) |
void | sig_pri_extract_called_num_subaddr (struct sig_pri_chan *p, const char *rdest, char *called, size_t called_buff_size) |
Extract the called number and subaddress from the dial string. More... | |
static struct ast_cc_agent * | sig_pri_find_cc_agent_by_cc_id (struct sig_pri_span *pri, long cc_id) |
static struct sig_pri_cc_monitor_instance * | sig_pri_find_cc_monitor_by_cc_id (struct sig_pri_span *pri, long cc_id) |
void | sig_pri_fixup (struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_pri_chan *pchan) |
static void | sig_pri_fixup_chans (struct sig_pri_chan *old_chan, struct sig_pri_chan *new_chan) |
static const char * | sig_pri_get_orig_dialstring (struct sig_pri_chan *p) |
static void | sig_pri_handle_cis_subcmds (struct sig_pri_span *pri, int event_id, const struct pri_subcommands *subcmds, q931_call *call_rsp) |
static void | sig_pri_handle_dchan_exception (struct sig_pri_span *pri, int index) |
static int | sig_pri_handle_hold (struct sig_pri_span *pri, pri_event *ev) |
static void | sig_pri_handle_retrieve (struct sig_pri_span *pri, pri_event *ev) |
static void | sig_pri_handle_subcmds (struct sig_pri_span *pri, int chanpos, int event_id, int channel, const struct pri_subcommands *subcmds, q931_call *call_rsp) |
int | sig_pri_hangup (struct sig_pri_chan *p, struct ast_channel *ast) |
int | sig_pri_indicate (struct sig_pri_chan *p, struct ast_channel *chan, int condition, const void *data, size_t datalen) |
static void | sig_pri_init_config (struct sig_pri_chan *pvt, struct sig_pri_span *pri) |
void | sig_pri_init_pri (struct sig_pri_span *pri) |
int | sig_pri_is_alarm_ignored (struct sig_pri_span *pri) |
Determine if layer 1 alarms are ignored. More... | |
int | sig_pri_is_chan_available (struct sig_pri_chan *pvt) |
Determine if a private channel structure is available. More... | |
static int | sig_pri_is_chan_in_use (struct sig_pri_chan *pvt) |
static int | sig_pri_is_cis_call (int channel) |
static void | sig_pri_kill_call (struct sig_pri_span *pri, q931_call *call, int cause) |
int | sig_pri_load (const char *cc_type_name) |
Load the sig_pri submodule. More... | |
static void | sig_pri_lock_owner (struct sig_pri_span *pri, int chanpos) |
static void | sig_pri_lock_private (struct sig_pri_chan *p) |
static void | sig_pri_make_cc_dialstring (struct sig_pri_chan *p, char *buf, size_t buf_size) |
static void | sig_pri_mcid_event (struct sig_pri_span *pri, const struct pri_subcmd_mcid_req *mcid, struct ast_channel *owner) |
static int | sig_pri_msn_match (const char *msn_patterns, const char *exten) |
static void | sig_pri_mwi_cache_update (struct sig_pri_span *pri) |
static void | sig_pri_mwi_event_cb (const struct ast_event *event, void *userdata) |
static struct ast_channel * | sig_pri_new_ast_channel (struct sig_pri_chan *p, int state, enum sig_pri_law law, int transfercapability, char *exten, const struct ast_channel *requestor) |
static void | sig_pri_open_media (struct sig_pri_chan *p) |
static void | sig_pri_party_id_convert (struct ast_party_id *ast_id, const struct pri_party_id *pri_id, struct sig_pri_span *pri) |
static void | sig_pri_party_id_from_ast (struct pri_party_id *pri_id, const struct ast_party_id *ast_id) |
static void | sig_pri_party_name_convert (struct ast_party_name *ast_name, const struct pri_party_name *pri_name) |
static void | sig_pri_party_name_from_ast (struct pri_party_name *pri_name, const struct ast_party_name *ast_name) |
static void | sig_pri_party_number_convert (struct ast_party_number *ast_number, const struct pri_party_number *pri_number, struct sig_pri_span *pri) |
static void | sig_pri_party_number_from_ast (struct pri_party_number *pri_number, const struct ast_party_number *ast_number) |
static void | sig_pri_party_subaddress_from_ast (struct pri_party_subaddress *pri_subaddress, const struct ast_party_subaddress *ast_subaddress) |
static int | sig_pri_play_tone (struct sig_pri_chan *p, enum sig_pri_tone tone) |
static void | sig_pri_redirecting_convert (struct ast_party_redirecting *ast_redirecting, const struct pri_party_redirecting *pri_redirecting, const struct ast_party_redirecting *ast_guide, struct sig_pri_span *pri) |
static void | sig_pri_redirecting_update (struct sig_pri_chan *pvt, struct ast_channel *ast) |
struct ast_channel * | sig_pri_request (struct sig_pri_chan *p, enum sig_pri_law law, const struct ast_channel *requestor, int transfercapability) |
static void | sig_pri_send_aoce_termination_request (struct sig_pri_span *pri, int chanpos, unsigned int ms) |
static void | sig_pri_send_mwi_indication (struct sig_pri_span *pri, const char *mbox_number, const char *mbox_context, int num_messages) |
void | sig_pri_set_alarm (struct sig_pri_chan *p, int in_alarm) |
static void | sig_pri_set_caller_id (struct sig_pri_chan *p) |
static void | sig_pri_set_dialing (struct sig_pri_chan *p, int is_dialing) |
static void | sig_pri_set_digital (struct sig_pri_chan *p, int is_digital) |
static void | sig_pri_set_dnid (struct sig_pri_chan *p, const char *dnid) |
static int | sig_pri_set_echocanceller (struct sig_pri_chan *p, int enable) |
static void | sig_pri_set_outgoing (struct sig_pri_chan *p, int is_outgoing) |
static void | sig_pri_set_rdnis (struct sig_pri_chan *p, const char *rdnis) |
static void | sig_pri_set_subaddress (struct ast_party_subaddress *ast_subaddress, const struct pri_party_subaddress *pri_subaddress) |
static void | sig_pri_sort_pri_chans (struct sig_pri_span *pri) |
static void | sig_pri_span_devstate_changed (struct sig_pri_span *pri) |
int | sig_pri_start_pri (struct sig_pri_span *pri) |
void | sig_pri_stop_pri (struct sig_pri_span *pri) |
Stop PRI span. More... | |
static void | sig_pri_transfer_rsp (void *data, int is_successful) |
void | sig_pri_unload (void) |
Unload the sig_pri submodule. More... | |
static void | sig_pri_unlock_private (struct sig_pri_chan *p) |
Variables | |
static int | pri_gendigittimeout = 8000 |
static int | pri_matchdigittimeout = 3000 |
static struct ast_app_option | sig_pri_call_opts [128] = { [ 'K' ] = { .flag = OPT_KEYPAD , .arg_index = OPT_ARG_KEYPAD + 1 }, [ 'R' ] = { .flag = OPT_REVERSE_CHARGE }, [ 'A' ] = { .flag = OPT_AOC_REQUEST , .arg_index = OPT_ARG_AOC_REQUEST + 1 }, } |
static struct ao2_container * | sig_pri_cc_monitors |
static const char * | sig_pri_cc_type_name |
PRI signaling module.
Definition in file sig_pri.c.
#define DCHAN_AVAILABLE (DCHAN_NOTINALARM | DCHAN_UP) |
Definition at line 119 of file sig_pri.c.
Referenced by pri_find_dchan(), and pri_is_up().
#define DCHAN_NOTINALARM (1 << 0) |
Definition at line 108 of file sig_pri.c.
Referenced by build_status(), pri_event_alarm(), and pri_event_noalarm().
#define DCHAN_UP (1 << 1) |
Definition at line 109 of file sig_pri.c.
Referenced by build_status(), pri_dchannel(), and pri_event_alarm().
#define FORCE_RESTART_UNAVAIL_CHANS 1 |
Define to make always pick a channel if allowed. Useful for testing channel shifting.
Define to force a RESTART on a channel that returns a cause code of PRI_CAUSE_REQUESTED_CHAN_UNAVAIL(44). If the cause is because of a stuck channel on the peer and the channel is always the next channel we pick for an outgoing call then this can help.
#define PRI_CHANNEL | ( | p | ) | ((p) & 0xff) |
Definition at line 112 of file sig_pri.c.
Referenced by pri_dchannel(), pri_find_fixup_principle(), pri_find_principle(), sig_pri_handle_retrieve(), and sig_pri_handle_subcmds().
#define PRI_CIS_CALL (1 << 17) /* Call is using the D channel only. */ |
Definition at line 115 of file sig_pri.c.
Referenced by sig_pri_is_cis_call().
#define PRI_EXPLICIT (1 << 16) |
Definition at line 114 of file sig_pri.c.
Referenced by pri_find_principle(), and PVT_TO_CHANNEL().
#define PRI_HELD_CALL (1 << 18) |
Definition at line 116 of file sig_pri.c.
Referenced by pri_find_principle(), and sig_pri_handle_retrieve().
#define PRI_SPAN | ( | p | ) | (((p) >> 8) & 0xff) |
Definition at line 113 of file sig_pri.c.
Referenced by pri_dchannel(), pri_find_fixup_principle(), pri_find_principle(), pri_maintenance_bservice(), and sig_pri_handle_subcmds().
#define SIG_PRI_SC_HEADER "%-4s %4s %-4s %-4s %-10s %-4s %s\n" |
Definition at line 7958 of file sig_pri.c.
Referenced by sig_pri_cli_show_channels_header().
#define SIG_PRI_SC_LINE "%4d %4d %-4s %-4s %-10s %-4s %s" |
Definition at line 7959 of file sig_pri.c.
Referenced by sig_pri_cli_show_channels().
typedef void(* xfer_rsp_callback)(void *data, int is_successful) |
Enumerator | |
---|---|
OPT_ARG_KEYPAD | |
OPT_ARG_AOC_REQUEST | |
OPT_ARG_ARRAY_SIZE |
Enumerator | |
---|---|
OPT_KEYPAD | |
OPT_REVERSE_CHARGE | |
OPT_AOC_REQUEST |
|
static |
Definition at line 1670 of file sig_pri.c.
References apply_plan_to_number(), and ast_strlen_zero().
Referenced by pri_dchannel(), and sig_pri_party_number_convert().
|
static |
Definition at line 1634 of file sig_pri.c.
References sig_pri_span::internationalprefix, sig_pri_span::localprefix, sig_pri_span::nationalprefix, sig_pri_span::privateprefix, and sig_pri_span::unknownprefix.
Referenced by apply_plan_to_existing_number().
|
static |
|
static |
Definition at line 735 of file sig_pri.c.
References ast_pri_pack_hex_char(), and len().
Referenced by sig_pri_party_subaddress_from_ast().
|
static |
Definition at line 597 of file sig_pri.c.
References AST_PARTY_CHAR_SET_ISO10646_BMPSTRING, AST_PARTY_CHAR_SET_ISO10646_UTF_8STRING, AST_PARTY_CHAR_SET_ISO8859_1, AST_PARTY_CHAR_SET_ISO8859_2, AST_PARTY_CHAR_SET_ISO8859_3, AST_PARTY_CHAR_SET_ISO8859_4, AST_PARTY_CHAR_SET_ISO8859_5, AST_PARTY_CHAR_SET_ISO8859_7, AST_PARTY_CHAR_SET_UNKNOWN, and AST_PARTY_CHAR_SET_WITHDRAWN.
Referenced by sig_pri_party_name_from_ast().
|
static |
Definition at line 492 of file sig_pri.c.
References AST_PRES_ALLOWED, AST_PRES_NETWORK_NUMBER, AST_PRES_RESTRICTED, AST_PRES_UNAVAILABLE, AST_PRES_USER_NUMBER_FAILED_SCREEN, AST_PRES_USER_NUMBER_PASSED_SCREEN, and AST_PRES_USER_NUMBER_UNSCREENED.
Referenced by sig_pri_party_name_from_ast(), and sig_pri_party_number_from_ast().
|
static |
Definition at line 402 of file sig_pri.c.
References AST_REDIRECTING_REASON_DEFLECTION, AST_REDIRECTING_REASON_NO_ANSWER, AST_REDIRECTING_REASON_UNCONDITIONAL, AST_REDIRECTING_REASON_UNKNOWN, and AST_REDIRECTING_REASON_USER_BUSY.
Referenced by sig_pri_redirecting_update().
|
static |
Definition at line 8007 of file sig_pri.c.
References DCHAN_NOTINALARM, and DCHAN_UP.
Referenced by sig_pri_cli_show_span(), and sig_pri_cli_show_spans().
|
static |
Definition at line 4070 of file sig_pri.c.
Referenced by pri_dchannel().
|
static |
Definition at line 1614 of file sig_pri.c.
Referenced by sig_pri_call().
|
static |
Definition at line 1834 of file sig_pri.c.
References ast_call(), AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, ast_copy_string(), AST_FRAME_CONTROL, ast_frfree, ast_hangup(), ast_log(), ast_pbx_run(), ast_read(), ast_remaining_ms(), ast_tvnow(), ast_verb, ast_waitfor(), sig_pri_chan::channel, ast_channel::context, ast_channel::exten, f, ast_frame::frametype, sig_pri_span::idlecontext, sig_pri_span::idledial, sig_pri_span::idleext, ast_frame_subclass::integer, LOG_WARNING, ast_channel::name, sig_pri_chan::owner, sig_pri_chan::pri, ast_channel::priority, and ast_frame::subclass.
Referenced by pri_dchannel().
|
static |
Definition at line 1054 of file sig_pri.c.
References ast_log(), sig_pri_span::dchans, LOG_WARNING, sig_pri_span::pri, and SIG_PRI_NUM_DCHANS.
Referenced by pri_find_principle().
|
static |
Definition at line 1692 of file sig_pri.c.
References ast_log(), sig_pri_chan::channel, sig_pri_span::lastreset, LOG_NOTICE, sig_pri_chan::no_b_channel, sig_pri_span::numchans, sig_pri_span::pri, PVT_TO_CHANNEL(), sig_pri_span::pvts, sig_pri_span::resetpos, sig_pri_chan::resetting, sig_pri_span::resetting, sig_pri_chan::service_status, sig_pri_is_chan_in_use(), SIG_PRI_RESET_ACTIVE, sig_pri_span_devstate_changed(), sig_pri_span::span, SRVST_FAREND, and SRVST_NEAREND.
Referenced by pri_dchannel().
|
static |
Definition at line 4596 of file sig_pri.c.
References ast_channel::_softhangup, ast_channel::_state, sig_pri_chan::allocated, sig_pri_span::allow_call_waiting_calls, sig_pri_chan::alreadyhungup, sig_pri_span::aoce_delayhangup, sig_pri_span::append_msn_to_user_tag, apply_plan_to_existing_number(), ast_atomic_fetchadd_int(), ast_bridged_channel(), ast_canmatch_extension(), AST_CAUSE_USER_BUSY, AST_CC_CCBS, AST_CC_CCNR, ast_channel_lock, ast_channel_unlock, AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_HANGUP, AST_CONTROL_HOLD, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_RINGING, AST_CONTROL_UNHOLD, ast_copy_string(), ast_db_del(), ast_db_put(), ast_debug, ast_exists_extension(), AST_FRAME_DTMF, ast_hangup(), ast_ignore_pattern(), ast_log(), ast_matchmore_extension(), AST_MAX_EXTENSION, ast_mutex_lock, ast_mutex_unlock, ast_party_subaddress_free(), ast_party_subaddress_init(), ast_pbx_start(), ast_pthread_create_background, ast_pthread_create_detached, ast_setstate(), ast_shrink_phone_number(), AST_SOFTHANGUP_DEV, ast_softhangup_nolock(), AST_STATE_BUSY, AST_STATE_RESERVED, AST_STATE_RING, AST_STATE_RINGING, AST_STATE_UP, ast_strlen_zero(), AST_TRANS_CAP_DIGITAL, ast_tv(), ast_tvcmp(), ast_tvdiff_ms(), ast_tvnow(), ast_tvsub(), ast_verb, ast_verbose(), sig_pri_chan::call, sig_pri_chan::call_level, ast_channel::caller, sig_pri_chan::callingpres, sig_pri_chan::channel, sig_pri_chan::cid_ani, sig_pri_chan::cid_ani2, sig_pri_chan::cid_name, sig_pri_chan::cid_num, sig_pri_chan::cid_subaddr, sig_pri_chan::cid_ton, sig_pri_chan::context, dahdi_db, DAHDI_OVERLAPDIAL_INCOMING, DAHDI_OVERLAPDIAL_OUTGOING, ast_channel::data, DCHAN_UP, sig_pri_span::dchanavail, sig_pri_span::dchans, sig_pri_span::debug, sig_pri_chan::deferred_digits, detect_aoc_e_subcmd(), sig_pri_chan::dialdest, ast_channel::dialed, sig_pri_chan::digital, sig_pri_span::discardremoteholdretrieval, do_idle_thread(), errno, sig_pri_chan::exten, sig_pri_span::fds, ast_channel::hangupcause, HAVE_PRI_SETUP_ACK_INBAND, sig_pri_span::hold_disconnect_transfer, sig_pri_chan::holding_aoce, ast_party_caller::id, sig_pri_span::idlecontext, sig_pri_span::idledial, sig_pri_span::idleext, sig_pri_chan::immediate, sig_pri_span::inband_on_proceeding, sig_pri_span::inband_on_setup_ack, sig_pri_span::initial_user_tag, sig_pri_chan::is_call_waiting, sig_pri_chan::isidlecall, sig_pri_chan::keypad_digits, sig_pri_span::lastreset, len(), sig_pri_span::lock, LOG_ERROR, LOG_NOTICE, LOG_WARNING, sig_pri_chan::logicalspan, sig_pri_span::minidle, sig_pri_span::minunused, sig_pri_span::msn_list, ast_channel::name, sig_pri_chan::no_b_channel, sig_pri_span::no_d_channels, sig_pri_chan::no_dialed_digits, sig_pri_span::nodetype, sig_pri_span::num_call_waiting_calls, ast_party_dialed::number, sig_pri_span::numchans, sig_pri_chan::outgoing, sig_pri_span::overlapdial, sig_pri_chan::owner, pbx_builtin_setvar_helper(), ast_party_dialed::plan, sig_pri_chan::pri, sig_pri_span::pri, PRI_CHANNEL, pri_check_restart(), pri_find_dchan(), pri_find_empty_chan(), pri_find_empty_nobch(), pri_find_fixup_principle(), pri_find_principle(), pri_find_principle_by_call(), pri_fixup_principle(), pri_is_up(), pri_order(), pri_queue_control(), pri_queue_frame(), PRI_SPAN, pri_ss_thread(), sig_pri_chan::prioffset, sig_pri_chan::progress, PVT_TO_CHANNEL(), sig_pri_span::pvts, redirectingreason2str(), sig_pri_span::resetinterval, sig_pri_span::resetpos, sig_pri_chan::resetting, sig_pri_span::resetting, sig_pri_chan::reverse_charging_indication, S_OR, sig_pri_chan::service_status, sig_pri_span::sig, SIG_BRI_PTMP, SIG_PRI_ALAW, sig_pri_attempt_transfer(), SIG_PRI_CALL_LEVEL_ALERTING, SIG_PRI_CALL_LEVEL_CONNECT, SIG_PRI_CALL_LEVEL_DEFER_DIAL, SIG_PRI_CALL_LEVEL_OVERLAP, SIG_PRI_CALL_LEVEL_PROCEEDING, sig_pri_cc_generic_check(), SIG_PRI_DEFLAW, sig_pri_dial_digits(), sig_pri_handle_cis_subcmds(), sig_pri_handle_dchan_exception(), sig_pri_handle_hold(), sig_pri_handle_retrieve(), sig_pri_handle_subcmds(), sig_pri_init_config(), sig_pri_is_chan_available(), sig_pri_is_cis_call(), sig_pri_lock_owner(), sig_pri_lock_private(), sig_pri_msn_match(), sig_pri_new_ast_channel(), SIG_PRI_NUM_DCHANS, sig_pri_open_media(), sig_pri_request(), SIG_PRI_RESET_ACTIVE, SIG_PRI_RESET_IDLE, SIG_PRI_RESET_NO_ACK, sig_pri_send_aoce_termination_request(), sig_pri_set_alarm(), sig_pri_set_caller_id(), sig_pri_set_dialing(), sig_pri_set_dnid(), sig_pri_set_echocanceller(), sig_pri_set_rdnis(), sig_pri_set_subaddress(), sig_pri_span_devstate_changed(), SIG_PRI_ULAW, sig_pri_unlock_private(), sig_pri_span::span, SRVST_DBKEY, SRVST_FAREND, SRVST_NEAREND, SRVST_TYPE_OOS, ast_party_subaddress::str, ast_party_id::subaddress, ast_party_dialed::subaddress, sig_pri_span::switchtype, tv, sig_pri_chan::use_callerid, and sig_pri_chan::user_tag.
Referenced by sig_pri_start_pri().
void pri_event_alarm | ( | struct sig_pri_span * | pri, |
int | index, | ||
int | before_start_pri | ||
) |
Definition at line 2014 of file sig_pri.c.
References DCHAN_NOTINALARM, DCHAN_UP, sig_pri_span::dchanavail, and pri_find_dchan().
Referenced by my_handle_dchan_exception(), and prepare_pri().
void pri_event_noalarm | ( | struct sig_pri_span * | pri, |
int | index, | ||
int | before_start_pri | ||
) |
Definition at line 2022 of file sig_pri.c.
References DCHAN_NOTINALARM, sig_pri_span::dchanavail, and sig_pri_span::dchans.
Referenced by my_handle_dchan_exception(), and prepare_pri().
|
static |
Definition at line 1067 of file sig_pri.c.
References ast_log(), DCHAN_AVAILABLE, sig_pri_span::dchans, sig_pri_span::fds, LOG_NOTICE, LOG_WARNING, sig_pri_span::no_d_channels, sig_pri_span::pri, pri_order(), sig_pri_span::sig, SIG_BRI_PTMP, SIG_PRI_NUM_DCHANS, and sig_pri_span::span.
Referenced by pri_dchannel(), and pri_event_alarm().
|
static |
Definition at line 1771 of file sig_pri.c.
References ast_debug, sig_pri_chan::logicalspan, sig_pri_chan::no_b_channel, sig_pri_span::numchans, sig_pri_chan::prioffset, sig_pri_span::pvts, and sig_pri_is_chan_available().
Referenced by pri_dchannel(), and sig_pri_handle_retrieve().
|
static |
Definition at line 1811 of file sig_pri.c.
References ast_debug, sig_pri_span::calls, sig_pri_callback::new_nobch_intf, sig_pri_chan::no_b_channel, sig_pri_span::numchans, sig_pri_span::pvts, and sig_pri_is_chan_available().
Referenced by pri_dchannel(), sig_pri_cw_available(), and sig_pri_handle_hold().
|
static |
Definition at line 1570 of file sig_pri.c.
References ast_log(), LOG_WARNING, PRI_CHANNEL, pri_find_principle(), pri_fixup_principle(), PRI_SPAN, sig_pri_kill_call(), and sig_pri_span::span.
Referenced by pri_dchannel().
|
static |
Definition at line 1330 of file sig_pri.c.
References sig_pri_chan::call, sig_pri_span::dchan_logical_span, sig_pri_chan::logicalspan, sig_pri_chan::no_b_channel, sig_pri_span::numchans, pri_active_dchan_index(), PRI_CHANNEL, PRI_EXPLICIT, PRI_HELD_CALL, PRI_SPAN, sig_pri_chan::prioffset, and sig_pri_span::pvts.
Referenced by pri_dchannel(), pri_find_fixup_principle(), and sig_pri_handle_retrieve().
|
static |
Definition at line 1265 of file sig_pri.c.
References sig_pri_chan::call, sig_pri_span::numchans, and sig_pri_span::pvts.
Referenced by pri_dchannel(), sig_pri_attempt_transfer(), sig_pri_handle_hold(), sig_pri_handle_retrieve(), and sig_pri_kill_call().
|
static |
Definition at line 1397 of file sig_pri.c.
References sig_pri_chan::allocated, sig_pri_chan::alreadyhungup, sig_pri_chan::aoc_e, sig_pri_chan::aoc_s_request_invoke_id, sig_pri_chan::aoc_s_request_invoke_id_valid, ast_channel_unlock, ast_log(), ast_verb, sig_pri_chan::call, sig_pri_chan::call_level, sig_pri_chan::channel, sig_pri_chan::context, sig_pri_chan::deferred_digits, sig_pri_chan::digital, sig_pri_chan::hidecallerid, sig_pri_chan::hidecalleridname, sig_pri_chan::holding_aoce, sig_pri_chan::immediate, sig_pri_chan::is_call_waiting, sig_pri_chan::isidlecall, sig_pri_chan::keypad_digits, LOG_WARNING, sig_pri_chan::logicalspan, sig_pri_chan::mastertrunkgroup, sig_pri_chan::mohinterpret, ast_channel::name, sig_pri_chan::no_b_channel, sig_pri_chan::no_dialed_digits, sig_pri_span::numchans, sig_pri_chan::outgoing, sig_pri_chan::owner, sig_pri_chan::priexclusive, sig_pri_chan::priindication_oob, sig_pri_chan::progress, sig_pri_span::pvts, sig_pri_chan::reverse_charging_indication, sig_pri_ami_channel_event(), SIG_PRI_CALL_LEVEL_IDLE, sig_pri_fixup_chans(), sig_pri_is_chan_available(), sig_pri_lock_owner(), sig_pri_lock_private(), sig_pri_open_media(), sig_pri_unlock_private(), sig_pri_chan::stripmsd, sig_pri_chan::use_callerid, sig_pri_chan::use_callingpres, sig_pri_chan::user_tag, and sig_pri_chan::waiting_for_aoce.
Referenced by pri_dchannel(), pri_find_fixup_principle(), sig_pri_handle_hold(), and sig_pri_handle_retrieve().
|
inlinestatic |
Definition at line 342 of file sig_pri.c.
References ast_mutex_trylock, AST_PTHREADT_NULL, sig_pri_span::lock, sig_pri_span::master, sig_pri_lock_private(), and sig_pri_unlock_private().
Referenced by pri_send_callrerouting_facility_exec(), pri_send_keypad_facility_exec(), pri_ss_thread(), sig_pri_answer(), sig_pri_call(), sig_pri_chan_alarm_notify(), sig_pri_digit_begin(), sig_pri_hangup(), and sig_pri_indicate().
int pri_is_up | ( | struct sig_pri_span * | pri | ) |
Definition at line 1027 of file sig_pri.c.
References DCHAN_AVAILABLE, sig_pri_span::dchanavail, and SIG_PRI_NUM_DCHANS.
Referenced by pri_dchannel().
int pri_maintenance_bservice | ( | struct pri * | pri, |
struct sig_pri_chan * | p, | ||
int | changestatus | ||
) |
Definition at line 8109 of file sig_pri.c.
References sig_pri_chan::channel, PRI_SPAN, and PVT_TO_CHANNEL().
Referenced by handle_pri_service_generic().
|
static |
Definition at line 1037 of file sig_pri.c.
Referenced by pri_dchannel(), pri_find_dchan(), and sig_pri_cli_show_span().
|
static |
Definition at line 1239 of file sig_pri.c.
References AST_FRAME_CONTROL, sig_pri_chan::calls, sig_pri_chan::chan_pvt, ast_frame_subclass::integer, pri_queue_frame(), sig_pri_span::pvts, sig_pri_callback::queue_control, and ast_frame::subclass.
Referenced by pri_dchannel(), sig_pri_handle_retrieve(), and sig_pri_kill_call().
|
static |
Definition at line 1216 of file sig_pri.c.
References ast_channel_unlock, ast_queue_frame(), sig_pri_chan::owner, sig_pri_span::pvts, and sig_pri_lock_owner().
Referenced by pri_dchannel(), and pri_queue_control().
|
inlinestatic |
Definition at line 144 of file sig_pri.c.
References ast_mutex_unlock, and sig_pri_span::lock.
Referenced by pri_send_callrerouting_facility_exec(), pri_send_keypad_facility_exec(), pri_ss_thread(), sig_pri_answer(), sig_pri_call(), sig_pri_chan_alarm_notify(), sig_pri_digit_begin(), sig_pri_hangup(), and sig_pri_indicate().
int pri_send_callrerouting_facility_exec | ( | struct sig_pri_chan * | p, |
enum ast_channel_state | chanstate, | ||
const char * | destination, | ||
const char * | original, | ||
const char * | reason | ||
) |
Definition at line 8087 of file sig_pri.c.
References ast_log(), sig_pri_chan::call, LOG_DEBUG, sig_pri_chan::pri, sig_pri_span::pri, pri_grab(), pri_rel(), sig_pri_lock_private(), and sig_pri_unlock_private().
Referenced by dahdi_send_callrerouting_facility_exec().
int pri_send_keypad_facility_exec | ( | struct sig_pri_chan * | p, |
const char * | digits | ||
) |
Definition at line 8068 of file sig_pri.c.
References ast_debug, sig_pri_chan::call, sig_pri_chan::pri, sig_pri_span::pri, pri_grab(), pri_rel(), sig_pri_lock_private(), and sig_pri_unlock_private().
Referenced by dahdi_send_keypad_facility_exec().
|
static |
Definition at line 1889 of file sig_pri.c.
References sig_pri_span::append_msn_to_user_tag, AST_CAUSE_UNALLOCATED, ast_copy_string(), ast_exists_extension(), ast_free, ast_hangup(), ast_ignore_pattern(), ast_log(), ast_matchmore_extension(), AST_MAX_EXTENSION, ast_mutex_lock, ast_mutex_unlock, ast_pbx_run(), ast_setstate(), AST_STATE_RING, ast_strdup, ast_strlen_zero(), ast_verb, ast_waitfordigit(), sig_pri_chan::call, sig_pri_chan::call_level, ast_channel::caller, sig_pri_chan::cid_num, ast_channel::context, DAHDI_OVERLAPDIAL_INCOMING, ast_channel::dialed, exten, sig_pri_chan::exten, ast_channel::exten, ast_channel::hangupcause, ast_party_caller::id, sig_pri_span::initial_user_tag, len(), sig_pri_span::lock, LOG_DEBUG, LOG_WARNING, ast_channel::name, sig_pri_span::nodetype, ast_party_dialed::number, sig_pri_span::overlapdial, sig_pri_chan::owner, sig_pri_chan::pri, sig_pri_span::pri, pri_gendigittimeout, pri_grab(), pri_matchdigittimeout, pri_rel(), PVT_TO_CHANNEL(), SIG_PRI_CALL_LEVEL_PROCEEDING, sig_pri_dsp_reset_and_flush_digits(), sig_pri_lock_private(), sig_pri_play_tone(), sig_pri_set_echocanceller(), sig_pri_span_devstate_changed(), SIG_PRI_TONE_DIALTONE, sig_pri_unlock_private(), ast_party_dialed::str, ast_party_id::tag, ast_channel::tech_pvt, and sig_pri_chan::user_tag.
Referenced by pri_dchannel().
|
static |
Definition at line 547 of file sig_pri.c.
References AST_PARTY_CHAR_SET_ISO10646_BMPSTRING, AST_PARTY_CHAR_SET_ISO10646_UTF_8STRING, AST_PARTY_CHAR_SET_ISO8859_1, AST_PARTY_CHAR_SET_ISO8859_2, AST_PARTY_CHAR_SET_ISO8859_3, AST_PARTY_CHAR_SET_ISO8859_4, AST_PARTY_CHAR_SET_ISO8859_5, AST_PARTY_CHAR_SET_ISO8859_7, AST_PARTY_CHAR_SET_UNKNOWN, and AST_PARTY_CHAR_SET_WITHDRAWN.
Referenced by sig_pri_party_name_convert().
|
static |
Definition at line 437 of file sig_pri.c.
References AST_PRES_ALLOWED, AST_PRES_NETWORK_NUMBER, AST_PRES_NUMBER_NOT_AVAILABLE, AST_PRES_RESTRICTED, AST_PRES_USER_NUMBER_FAILED_SCREEN, AST_PRES_USER_NUMBER_PASSED_SCREEN, and AST_PRES_USER_NUMBER_UNSCREENED.
Referenced by sig_pri_party_name_convert(), and sig_pri_party_number_convert().
|
static |
Definition at line 367 of file sig_pri.c.
References AST_REDIRECTING_REASON_DEFLECTION, AST_REDIRECTING_REASON_NO_ANSWER, AST_REDIRECTING_REASON_UNCONDITIONAL, AST_REDIRECTING_REASON_UNKNOWN, and AST_REDIRECTING_REASON_USER_BUSY.
Referenced by sig_pri_redirecting_convert().
|
static |
Definition at line 149 of file sig_pri.c.
References ast_debug, sig_pri_chan::logicalspan, sig_pri_chan::mastertrunkgroup, PRI_EXPLICIT, and sig_pri_chan::prioffset.
Referenced by pri_check_restart(), pri_dchannel(), pri_maintenance_bservice(), pri_ss_thread(), sig_pri_call(), sig_pri_handle_retrieve(), and sig_pri_indicate().
|
static |
Definition at line 1598 of file sig_pri.c.
Referenced by pri_dchannel().
|
static |
Definition at line 1006 of file sig_pri.c.
References sig_pri_callback::ami_channel_event, sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_chan::owner.
Referenced by pri_fixup_principle().
int sig_pri_answer | ( | struct sig_pri_chan * | p, |
struct ast_channel * | ast | ||
) |
Definition at line 7317 of file sig_pri.c.
References sig_pri_chan::aoc_s_request_invoke_id, sig_pri_chan::aoc_s_request_invoke_id_valid, ast_setstate(), AST_STATE_UP, sig_pri_chan::call, sig_pri_chan::call_level, sig_pri_chan::digital, sig_pri_chan::pri, sig_pri_span::pri, pri_grab(), pri_rel(), SIG_PRI_CALL_LEVEL_CONNECT, sig_pri_open_media(), and sig_pri_set_dialing().
Referenced by dahdi_answer().
|
static |
Definition at line 2918 of file sig_pri.c.
References AST_AOC_CHARGED_ITEM_BASIC_COMMUNICATION, AST_AOC_CHARGED_ITEM_CALL_ATTEMPT, AST_AOC_CHARGED_ITEM_CALL_SETUP, AST_AOC_CHARGED_ITEM_NA, AST_AOC_CHARGED_ITEM_SPECIAL_ARRANGEMENT, AST_AOC_CHARGED_ITEM_SUPPLEMENTARY_SERVICE, and AST_AOC_CHARGED_ITEM_USER_USER_INFO.
Referenced by sig_pri_aoc_s_from_pri().
|
static |
Definition at line 2886 of file sig_pri.c.
References AST_AOC_CHARGED_ITEM_BASIC_COMMUNICATION, AST_AOC_CHARGED_ITEM_CALL_ATTEMPT, AST_AOC_CHARGED_ITEM_CALL_SETUP, AST_AOC_CHARGED_ITEM_NA, AST_AOC_CHARGED_ITEM_SPECIAL_ARRANGEMENT, AST_AOC_CHARGED_ITEM_SUPPLEMENTARY_SERVICE, and AST_AOC_CHARGED_ITEM_USER_USER_INFO.
Referenced by sig_pri_aoc_s_from_ast().
|
static |
Definition at line 3574 of file sig_pri.c.
References ast_aoc_unit_entry::amount, ARRAY_LEN, AST_AOC_BILLING_CREDIT_CARD, AST_AOC_BILLING_NA, AST_AOC_BILLING_NORMAL, AST_AOC_BILLING_REVERSE_CHARGE, AST_AOC_CHARGE_CURRENCY, AST_AOC_CHARGE_FREE, AST_AOC_CHARGE_NA, AST_AOC_CHARGE_UNIT, ast_aoc_get_billing_id(), ast_aoc_get_charge_type(), ast_aoc_get_currency_amount(), ast_aoc_get_currency_multiplier(), ast_aoc_get_currency_name(), ast_aoc_get_total_type(), ast_aoc_get_unit_count(), ast_aoc_get_unit_info(), AST_AOC_TOTAL, ast_copy_string(), ast_strlen_zero(), sig_pri_chan::call, sig_pri_chan::pri, sig_pri_span::pri, sig_pri_aoc_multiplier_from_ast(), ast_aoc_unit_entry::type, ast_aoc_unit_entry::valid_amount, and ast_aoc_unit_entry::valid_type.
Referenced by sig_pri_indicate().
|
static |
Definition at line 3247 of file sig_pri.c.
References ast_aoc_add_unit_entry(), AST_AOC_BILLING_CREDIT_CARD, AST_AOC_BILLING_NA, AST_AOC_BILLING_NORMAL, AST_AOC_BILLING_REVERSE_CHARGE, AST_AOC_CHARGE_CURRENCY, AST_AOC_CHARGE_FREE, AST_AOC_CHARGE_NA, AST_AOC_CHARGE_UNIT, ast_aoc_create(), AST_AOC_D, ast_aoc_destroy_decoded(), ast_aoc_destroy_encoded(), ast_aoc_encode(), ast_aoc_manager_event(), ast_aoc_set_billing_id(), ast_aoc_set_currency_info(), ast_aoc_set_total_type(), AST_AOC_SUBTOTAL, AST_AOC_TOTAL, AST_CONTROL_AOC, ast_debug, ast_queue_control_data(), sig_pri_aoc_multiplier_from_pri(), and type.
Referenced by sig_pri_handle_subcmds().
|
static |
Definition at line 3657 of file sig_pri.c.
References ast_aoc_unit_entry::amount, sig_pri_chan::aoc_e, ARRAY_LEN, AST_AOC_BILLING_CALL_DEFLECTION, AST_AOC_BILLING_CALL_FWD_BUSY, AST_AOC_BILLING_CALL_FWD_NO_REPLY, AST_AOC_BILLING_CALL_FWD_UNCONDITIONAL, AST_AOC_BILLING_CALL_TRANSFER, AST_AOC_BILLING_CREDIT_CARD, AST_AOC_BILLING_NA, AST_AOC_BILLING_NORMAL, AST_AOC_BILLING_REVERSE_CHARGE, AST_AOC_CHARGE_CURRENCY, AST_AOC_CHARGE_FREE, AST_AOC_CHARGE_NA, AST_AOC_CHARGE_UNIT, AST_AOC_CHARGING_ASSOCIATION_ID, AST_AOC_CHARGING_ASSOCIATION_NA, AST_AOC_CHARGING_ASSOCIATION_NUMBER, ast_aoc_get_association_info(), ast_aoc_get_billing_id(), ast_aoc_get_charge_type(), ast_aoc_get_currency_amount(), ast_aoc_get_currency_multiplier(), ast_aoc_get_currency_name(), ast_aoc_get_unit_count(), ast_aoc_get_unit_info(), ast_copy_string(), ast_strlen_zero(), ast_aoc_charging_association::charge, ast_aoc_charging_association::charging_type, sig_pri_chan::holding_aoce, ast_aoc_charging_association::id, ast_aoc_charging_association_number::number, ast_aoc_charging_association::number, ast_aoc_charging_association_number::plan, sig_pri_aoc_multiplier_from_ast(), ast_aoc_unit_entry::type, ast_aoc_unit_entry::valid_amount, and ast_aoc_unit_entry::valid_type.
Referenced by sig_pri_indicate().
|
static |
Definition at line 3356 of file sig_pri.c.
References ast_aoc_add_unit_entry(), AST_AOC_BILLING_CALL_DEFLECTION, AST_AOC_BILLING_CALL_FWD_BUSY, AST_AOC_BILLING_CALL_FWD_NO_REPLY, AST_AOC_BILLING_CALL_FWD_UNCONDITIONAL, AST_AOC_BILLING_CALL_TRANSFER, AST_AOC_BILLING_CREDIT_CARD, AST_AOC_BILLING_NA, AST_AOC_BILLING_NORMAL, AST_AOC_BILLING_REVERSE_CHARGE, AST_AOC_CHARGE_CURRENCY, AST_AOC_CHARGE_FREE, AST_AOC_CHARGE_NA, AST_AOC_CHARGE_UNIT, ast_aoc_create(), ast_aoc_destroy_decoded(), ast_aoc_destroy_encoded(), AST_AOC_E, ast_aoc_encode(), ast_aoc_manager_event(), ast_aoc_set_association_id(), ast_aoc_set_association_number(), ast_aoc_set_billing_id(), ast_aoc_set_currency_info(), AST_CONTROL_AOC, ast_queue_control_data(), sig_pri_aoc_multiplier_from_pri(), and type.
Referenced by sig_pri_handle_cis_subcmds(), and sig_pri_handle_subcmds().
|
static |
Definition at line 2948 of file sig_pri.c.
References AST_AOC_MULT_HUNDRED, AST_AOC_MULT_ONE, AST_AOC_MULT_ONEHUNDREDTH, AST_AOC_MULT_ONETENTH, AST_AOC_MULT_ONETHOUSANDTH, AST_AOC_MULT_TEN, and AST_AOC_MULT_THOUSAND.
Referenced by sig_pri_aoc_d_from_ast(), sig_pri_aoc_e_from_ast(), and sig_pri_aoc_s_from_ast().
|
static |
Definition at line 2979 of file sig_pri.c.
References AST_AOC_MULT_HUNDRED, AST_AOC_MULT_ONE, AST_AOC_MULT_ONEHUNDREDTH, AST_AOC_MULT_ONETENTH, AST_AOC_MULT_ONETHOUSANDTH, AST_AOC_MULT_TEN, and AST_AOC_MULT_THOUSAND.
Referenced by sig_pri_aoc_d_from_pri(), sig_pri_aoc_e_from_pri(), and sig_pri_aoc_s_from_pri().
|
static |
Definition at line 3176 of file sig_pri.c.
References sig_pri_span::aoc_passthrough_flag, sig_pri_chan::aoc_s_request_invoke_id, sig_pri_chan::aoc_s_request_invoke_id_valid, sig_pri_chan::pri, sig_pri_span::pri, SIG_PRI_AOC_GRANT_D, SIG_PRI_AOC_GRANT_E, and SIG_PRI_AOC_GRANT_S.
Referenced by sig_pri_handle_subcmds().
|
static |
Definition at line 3475 of file sig_pri.c.
References ast_aoc_duration_rate::amount, ast_aoc_volume_rate::amount, ast_aoc_flat_rate::amount, sig_pri_chan::aoc_s_request_invoke_id, sig_pri_chan::aoc_s_request_invoke_id_valid, AST_AOC_RATE_TYPE_DURATION, AST_AOC_RATE_TYPE_FLAT, AST_AOC_RATE_TYPE_FREE, AST_AOC_RATE_TYPE_FREE_FROM_BEGINNING, AST_AOC_RATE_TYPE_NA, AST_AOC_RATE_TYPE_SPECIAL_CODE, AST_AOC_RATE_TYPE_VOLUME, ast_aoc_s_get_count(), ast_aoc_s_get_rate_info(), ast_copy_string(), ast_strlen_zero(), sig_pri_chan::call, ast_aoc_s_entry::charged_item, ast_aoc_duration_rate::charging_type, ast_aoc_duration_rate::currency_name, ast_aoc_volume_rate::currency_name, ast_aoc_flat_rate::currency_name, ast_aoc_s_entry::duration, ast_aoc_s_entry::flat, ast_aoc_duration_rate::granularity_time, ast_aoc_duration_rate::granularity_time_scale, ast_aoc_duration_rate::multiplier, ast_aoc_volume_rate::multiplier, ast_aoc_flat_rate::multiplier, sig_pri_chan::pri, sig_pri_span::pri, ast_aoc_s_entry::rate, ast_aoc_s_entry::rate_type, sig_pri_aoc_charged_item_to_pri(), sig_pri_aoc_multiplier_from_ast(), sig_pri_aoc_scale_to_pri(), ast_aoc_s_entry::special_code, ast_aoc_duration_rate::time, ast_aoc_duration_rate::time_scale, ast_aoc_s_entry::volume, and ast_aoc_volume_rate::volume_unit.
Referenced by sig_pri_indicate().
|
static |
Definition at line 3083 of file sig_pri.c.
References AST_AOC_CHARGED_ITEM_NA, ast_aoc_create(), ast_aoc_destroy_decoded(), ast_aoc_destroy_encoded(), ast_aoc_encode(), ast_aoc_manager_event(), AST_AOC_S, ast_aoc_s_add_rate_duration(), ast_aoc_s_add_rate_flat(), ast_aoc_s_add_rate_free(), ast_aoc_s_add_rate_na(), ast_aoc_s_add_rate_special_charge_code(), ast_aoc_s_add_rate_volume(), AST_CONTROL_AOC, ast_queue_control_data(), sig_pri_aoc_charged_item_to_ast(), sig_pri_aoc_multiplier_from_pri(), and sig_pri_aoc_scale_to_ast().
Referenced by sig_pri_handle_subcmds().
|
static |
Definition at line 3044 of file sig_pri.c.
References AST_AOC_TIME_SCALE_DAY, AST_AOC_TIME_SCALE_HOUR, AST_AOC_TIME_SCALE_HUNDREDTH_SECOND, AST_AOC_TIME_SCALE_MINUTE, AST_AOC_TIME_SCALE_SECOND, AST_AOC_TIME_SCALE_TEN_SECOND, and AST_AOC_TIME_SCALE_TENTH_SECOND.
Referenced by sig_pri_aoc_s_from_pri().
|
static |
Definition at line 3012 of file sig_pri.c.
References AST_AOC_TIME_SCALE_DAY, AST_AOC_TIME_SCALE_HOUR, AST_AOC_TIME_SCALE_HUNDREDTH_SECOND, AST_AOC_TIME_SCALE_MINUTE, AST_AOC_TIME_SCALE_SECOND, AST_AOC_TIME_SCALE_TEN_SECOND, and AST_AOC_TIME_SCALE_TENTH_SECOND.
Referenced by sig_pri_aoc_s_from_ast().
|
static |
Definition at line 2347 of file sig_pri.c.
References ast_bridged_channel(), ast_channel_transfer_masquerade(), ast_channel_unlock, ast_mutex_lock, ast_mutex_unlock, ast_verb, sig_pri_span::lock, sig_pri_chan::owner, pri_find_principle_by_call(), sig_pri_span::pvts, sig_pri_lock_owner(), sig_pri_lock_private(), and sig_pri_unlock_private().
Referenced by pri_dchannel(), and sig_pri_handle_subcmds().
int sig_pri_available | ( | struct sig_pri_chan ** | pvt, |
int | is_specific_channel | ||
) |
Definition at line 7412 of file sig_pri.c.
References sig_pri_chan::allocated, ast_mutex_lock, ast_mutex_unlock, HAVE_PRI_CALL_WAITING, sig_pri_span::lock, sig_pri_span::num_call_waiting_calls, sig_pri_chan::pri, sig_pri_span::pri, sig_pri_available_check(), and sig_pri_cw_available().
Referenced by available().
|
static |
Definition at line 7354 of file sig_pri.c.
References sig_pri_chan::no_b_channel, and sig_pri_is_chan_available().
Referenced by sig_pri_available(), and sig_pri_cw_available().
int sig_pri_call | ( | struct sig_pri_chan * | p, |
struct ast_channel * | ast, | ||
char * | rdest, | ||
int | timeout, | ||
int | layer1 | ||
) |
Definition at line 6641 of file sig_pri.c.
References ast_channel::_state, ao2_ref, sig_pri_span::append_msn_to_user_tag, args, AST_APP_ARG, ast_app_parse_options(), ast_assert, ast_cc_get_monitor_by_recall_core_id(), ast_cc_is_recall(), ast_channel_get_device_name(), AST_CHANNEL_NAME, ast_copy_string(), AST_DECLARE_APP_ARGS, ast_free, ast_log(), AST_NONSTANDARD_APP_ARGS, ast_party_subaddress_init(), ast_setstate(), AST_STATE_DIALING, AST_STATE_DOWN, AST_STATE_RESERVED, ast_strdup, ast_strlen_zero(), ast_test_flag, ast_transfercapability2str(), ast_verb, sig_pri_chan::call, sig_pri_chan::call_level, ast_channel::caller, sig_pri_cc_monitor_instance::cc_id, sig_pri_chan::channel, ast_channel::connected, sig_pri_chan::deferred_digits, sig_pri_chan::dialdest, sig_pri_span::dialplan, dialplan2str(), sig_pri_chan::digital, ext, sig_pri_span::facilityenable, sig_pri_chan::hidecallerid, sig_pri_chan::hidecalleridname, ast_party_caller::id, ast_party_connected_line::id, sig_pri_span::initial_user_tag, sig_pri_span::internationalprefix, sig_pri_chan::is_call_waiting, IS_DIGITAL, sig_pri_span::localdialplan, LOG_DEBUG, LOG_ERROR, LOG_WARNING, monitor, ast_party_id::name, ast_channel::name, sig_pri_span::nationalprefix, sig_pri_chan::no_dialed_digits, sig_pri_span::nodetype, ast_party_id::number, OPT_AOC_REQUEST, OPT_ARG_AOC_REQUEST, OPT_ARG_ARRAY_SIZE, OPT_ARG_KEYPAD, OPT_KEYPAD, OPT_REVERSE_CHARGE, sig_pri_chan::owner, pbx_builtin_getvar_helper(), ast_party_number::presentation, sig_pri_cc_monitor_instance::pri, sig_pri_chan::pri, sig_pri_span::pri, pri_grab(), pri_rel(), PRI_TRANS_CAP_DIGITAL, sig_pri_chan::priexclusive, ast_cc_monitor::private_data, PVT_TO_CHANNEL(), S_COR, SIG_PRI_CALL_LEVEL_SETUP, sig_pri_call_opts, sig_pri_cc_type_name, sig_pri_party_subaddress_from_ast(), sig_pri_redirecting_update(), sig_pri_set_dialing(), sig_pri_set_digital(), sig_pri_set_outgoing(), ast_party_name::str, ast_party_number::str, ast_party_subaddress::str, sig_pri_chan::stripmsd, ast_party_id::subaddress, ast_party_id::tag, ast_channel::transfercapability, ast_party_subaddress::type, sig_pri_chan::use_callingpres, sig_pri_chan::user_tag, ast_party_name::valid, ast_party_number::valid, and ast_party_subaddress::valid.
Referenced by dahdi_call().
|
static |
Definition at line 123 of file sig_pri.c.
References SIG_PRI_CALL_LEVEL_ALERTING, SIG_PRI_CALL_LEVEL_CONNECT, SIG_PRI_CALL_LEVEL_DEFER_DIAL, SIG_PRI_CALL_LEVEL_IDLE, SIG_PRI_CALL_LEVEL_OVERLAP, SIG_PRI_CALL_LEVEL_PROCEEDING, and SIG_PRI_CALL_LEVEL_SETUP.
Referenced by sig_pri_cli_show_channels(), and sig_pri_digit_begin().
int sig_pri_cc_agent_callee_available | ( | struct ast_cc_agent * | agent | ) |
Alert the caller that it is time to try recalling.
agent | CC core agent control. |
The core will call this function when it receives notice that a monitored party has become available.
The agent's job is to send a message to the caller to notify it of such a change. If the agent is able to discern that the caller is currently unavailable, then the agent should react by calling the ast_cc_caller_unavailable function.
0 | on success. |
-1 | on error. |
Definition at line 8430 of file sig_pri.c.
References ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_agent_prv::cc_id, sig_pri_span::lock, sig_pri_cc_agent_prv::pri, sig_pri_span::pri, and ast_cc_agent::private_data.
|
static |
Definition at line 2503 of file sig_pri.c.
References sig_pri_cc_agent_prv::cc_id, CMP_MATCH, CMP_STOP, sig_pri_cc_agent_prv::pri, and ast_cc_agent::private_data.
Referenced by sig_pri_find_cc_agent_by_cc_id().
void sig_pri_cc_agent_destructor | ( | struct ast_cc_agent * | agent | ) |
Destroy private data on the agent.
agent | CC core agent control. |
The core will call this function upon completion or failure of CC.
Definition at line 8459 of file sig_pri.c.
References ast_free, ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_agent_prv::cc_id, sig_pri_cc_agent_prv::cc_request_response_pending, sig_pri_span::lock, sig_pri_cc_agent_prv::pri, sig_pri_span::pri, and ast_cc_agent::private_data.
Referenced by dahdi_pri_cc_agent_destructor().
int sig_pri_cc_agent_init | ( | struct ast_cc_agent * | agent, |
struct sig_pri_chan * | pvt_chan | ||
) |
PRI CC agent initialization.
agent | CC core agent control. |
pvt_chan | Original channel the agent will attempt to recall. |
This callback is called when the CC core is initialized. Agents should allocate any private data necessary for the call and assign it to the private_data on the agent. Additionally, if any ast_cc_agent_flags are pertinent to the specific agent type, they should be set in this function as well.
0 | on success. |
-1 | on error. |
Definition at line 8142 of file sig_pri.c.
References ast_calloc, ast_free, ast_mutex_lock, ast_mutex_unlock, sig_pri_chan::call, sig_pri_cc_agent_prv::cc_id, sig_pri_span::lock, sig_pri_cc_agent_prv::pri, sig_pri_chan::pri, sig_pri_span::pri, and ast_cc_agent::private_data.
Referenced by dahdi_pri_cc_agent_init().
int sig_pri_cc_agent_party_b_free | ( | struct ast_cc_agent * | agent | ) |
Let the caller know that the callee has become free but that the caller cannot attempt to call back because he is either busy or there is congestion on his line.
agent | CC core agent control. |
This is something that really only affects a scenario where a phone places a call over ISDN PTMP to Asterisk, who then connects over PTMP again to the ISDN network. For most agent types, there is no need to implement this callback at all because they don't really need to actually do anything in this situation. If you're having trouble understanding what the purpose of this callback is, then you can be safe simply not implementing it.
0 | on success. |
-1 | on error. |
Definition at line 8374 of file sig_pri.c.
References ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_agent_prv::cc_id, sig_pri_span::lock, sig_pri_cc_agent_prv::pri, sig_pri_span::pri, and ast_cc_agent::private_data.
void sig_pri_cc_agent_req_rsp | ( | struct ast_cc_agent * | agent, |
enum ast_cc_agent_response_reason | reason | ||
) |
Response to a CC request.
agent | CC core agent control. |
reason | CC request response status. |
When the core receives knowledge that a called party has accepted a CC request, it will call this callback. The core may also call this if there is some error when attempting to process the incoming CC request.
The duty of this is to issue a propper response to a CC request from the caller by acknowledging receipt of that request or rejecting it.
Definition at line 8235 of file sig_pri.c.
References AST_CC_AGENT_RESPONSE_FAILURE_INVALID, AST_CC_AGENT_RESPONSE_FAILURE_TOO_MANY, AST_CC_AGENT_RESPONSE_SUCCESS, ast_cc_failed(), ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_agent_prv::cc_id, sig_pri_cc_agent_prv::cc_request_response_pending, ast_cc_agent::core_id, sig_pri_span::lock, sig_pri_cc_agent_prv::pri, sig_pri_span::pri, ast_cc_agent::private_data, sig_pri_cc_type_name, and status.
int sig_pri_cc_agent_start_monitoring | ( | struct ast_cc_agent * | agent | ) |
Begin monitoring a busy device.
agent | CC core agent control. |
The core will call this callback if the callee becomes available but the caller has reported that he is busy. The agent should begin monitoring the caller's device. When the caller becomes available again, the agent should call ast_cc_agent_caller_available.
0 | on success. |
-1 | on error. |
int sig_pri_cc_agent_start_offer_timer | ( | struct ast_cc_agent * | agent | ) |
Start the offer timer.
agent | CC core agent control. |
This is called by the core when the caller hangs up after a call for which CC may be requested. The agent should begin the timer as configured.
The primary reason why this functionality is left to the specific agent implementations is due to the differing use of schedulers throughout the code. Some channel drivers may already have a scheduler context they wish to use, and amongst those, some may use the ast_sched API while others may use the ast_sched_thread API, which are incompatible.
0 | on success. |
-1 | on error. |
int sig_pri_cc_agent_status_req | ( | struct ast_cc_agent * | agent | ) |
Request the status of the agent's device.
agent | CC core agent control. |
Asynchronous request for the status of any caller which may be a valid caller for the CC transaction. Status responses should be made using the ast_cc_status_response function.
0 | on success. |
-1 | on error. |
Definition at line 8305 of file sig_pri.c.
References ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_agent_prv::cc_id, sig_pri_span::lock, sig_pri_cc_agent_prv::pri, sig_pri_span::pri, and ast_cc_agent::private_data.
int sig_pri_cc_agent_stop_offer_timer | ( | struct ast_cc_agent * | agent | ) |
Stop the offer timer.
agent | CC core agent control. |
This callback is called by the CC core when the caller has requested CC.
0 | on success. |
-1 | on error. |
int sig_pri_cc_agent_stop_ringing | ( | struct ast_cc_agent * | agent | ) |
Request for an agent's phone to stop ringing.
agent | CC core agent control. |
The usefulness of this is quite limited. The only specific known case for this is if Asterisk requests CC over an ISDN PTMP link as the TE side. If other phones are in the same recall group as the Asterisk server, and one of those phones picks up the recall notice, then Asterisk will receive a "stop ringing" notification from the NT side of the PTMP link. This indication needs to be passed to the phone on the other side of the Asterisk server which originally placed the call so that it will stop ringing. Since the phone may be of any type, it is necessary to have a callback that the core can know about.
0 | on success. |
-1 | on error. |
Definition at line 8340 of file sig_pri.c.
References ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_agent_prv::cc_id, sig_pri_span::lock, sig_pri_cc_agent_prv::pri, sig_pri_span::pri, and ast_cc_agent::private_data.
|
static |
Definition at line 2679 of file sig_pri.c.
References ao2_ref, ao2_unlink, AST_CC_GENERIC_MONITOR_TYPE, ast_cc_get_current_core_id(), AST_CC_MONITOR_ALWAYS, AST_CC_MONITOR_GENERIC, AST_CC_MONITOR_NATIVE, AST_CC_MONITOR_NEVER, ast_channel_get_cc_config_params(), ast_channel_get_device_name(), AST_CHANNEL_NAME, ast_get_cc_monitor_policy(), ast_queue_cc_frame(), sig_pri_cc_monitor_instance::cc_id, sig_pri_cc_monitor_instance::core_id, monitor, sig_pri_chan::owner, sig_pri_span::pvts, sig_pri_cc_monitor_instance_init(), sig_pri_cc_type_name, sig_pri_get_orig_dialstring(), and sig_pri_make_cc_dialstring().
Referenced by sig_pri_handle_subcmds().
|
static |
Definition at line 2752 of file sig_pri.c.
References ao2_ref, AST_CC_GENERIC_MONITOR_TYPE, ast_cc_get_current_core_id(), ast_cc_get_monitor_by_recall_core_id(), AST_CC_MONITOR_ALWAYS, AST_CC_MONITOR_GENERIC, AST_CC_MONITOR_NATIVE, AST_CC_MONITOR_NEVER, ast_channel_get_cc_config_params(), ast_channel_get_device_name(), AST_CHANNEL_NAME, ast_channel_unlock, ast_get_cc_monitor_policy(), ast_queue_cc_frame(), ast_cc_monitor::core_id, monitor, sig_pri_span::nodetype, sig_pri_chan::outgoing, sig_pri_chan::owner, sig_pri_span::pvts, sig_pri_span::sig, SIG_BRI_PTMP, sig_pri_get_orig_dialstring(), and sig_pri_lock_owner().
Referenced by pri_dchannel().
|
static |
Definition at line 2849 of file sig_pri.c.
References ao2_ref, ast_cc_failed(), ast_cc_monitor_failed(), sig_pri_cc_monitor_instance::cc_id, sig_pri_cc_monitor_instance::core_id, ast_cc_agent::core_id, monitor, sig_pri_cc_monitor_instance::name, sig_pri_cc_type_name, sig_pri_find_cc_agent_by_cc_id(), and sig_pri_find_cc_monitor_by_cc_id().
Referenced by sig_pri_handle_cis_subcmds(), and sig_pri_handle_subcmds().
int sig_pri_cc_monitor_cancel_available_timer | ( | struct ast_cc_monitor * | monitor, |
int * | sched_id | ||
) |
Cancel the running available timer.
monitor | CC core monitor control. |
sched_id | Available timer scheduler id to cancel. Will never be NULL for a device monitor. |
In most cases, this function will likely consist of just a call to AST_SCHED_DEL. It might have been possible to do this within the core, but unfortunately the mixture of sched_thread and sched usage in Asterisk prevents such usage.
0 | on success |
-1 | on failure. |
|
static |
Definition at line 2555 of file sig_pri.c.
References sig_pri_cc_monitor_instance::cc_id, CMP_MATCH, CMP_STOP, and sig_pri_cc_monitor_instance::pri.
Referenced by sig_pri_find_cc_monitor_by_cc_id().
void sig_pri_cc_monitor_destructor | ( | void * | monitor_pvt | ) |
Destroy PRI private data on the monitor.
monitor_pvt | CC device monitor private data pointer. |
Implementers of this callback are responsible for destroying all heap-allocated data in the monitor's private_data pointer, including the private_data itself.
Definition at line 8708 of file sig_pri.c.
References ao2_ref, and ao2_unlink.
|
static |
Definition at line 8513 of file sig_pri.c.
References CMP_MATCH, CMP_STOP, and sig_pri_cc_monitor_instance::core_id.
Referenced by sig_pri_load().
|
static |
Definition at line 2603 of file sig_pri.c.
References ast_mutex_lock, ast_mutex_unlock, sig_pri_span::calls, sig_pri_cc_monitor_instance::cc_id, sig_pri_span::lock, sig_pri_callback::module_unref, sig_pri_cc_monitor_instance::pri, and sig_pri_span::pri.
Referenced by sig_pri_cc_monitor_instance_init().
|
static |
Definition at line 8493 of file sig_pri.c.
References sig_pri_cc_monitor_instance::core_id.
Referenced by sig_pri_load().
|
static |
Definition at line 2635 of file sig_pri.c.
References ao2_alloc, ao2_link, sig_pri_span::calls, sig_pri_cc_monitor_instance::cc_id, sig_pri_cc_monitor_instance::core_id, sig_pri_callback::module_ref, sig_pri_callback::module_unref, sig_pri_cc_monitor_instance::name, sig_pri_cc_monitor_instance::pri, and sig_pri_cc_monitor_instance_destroy().
Referenced by sig_pri_cc_available().
int sig_pri_cc_monitor_req_cc | ( | struct ast_cc_monitor * | monitor, |
int * | available_timer_id | ||
) |
Request CCSS.
monitor | CC core monitor control. |
available_timer_id | Where to put the available timer scheduler id. Will never be NULL for a device monitor. |
Perform whatever steps are necessary in order to request CC. In addition, the monitor implementation is responsible for starting the available timer in this callback. The scheduler ID for the callback must be stored in the parent_link's child_avail_id field.
0 | on success |
-1 | on failure. |
Definition at line 8541 of file sig_pri.c.
References AST_CC_CCBS, AST_CC_CCNR, ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_monitor_instance::cc_id, sig_pri_span::lock, sig_pri_cc_monitor_instance::pri, sig_pri_span::pri, ast_cc_monitor::private_data, and ast_cc_monitor::service_offered.
int sig_pri_cc_monitor_status_rsp | ( | struct ast_cc_monitor * | monitor, |
enum ast_device_state | devstate | ||
) |
Status response to an ast_cc_monitor_status_request().
monitor | CC core monitor control. |
devstate | Current status of a Party A device. |
Alert a monitor as to the status of the agent for which the monitor had previously requested a status request.
0 | on success |
-1 | on failure. |
Definition at line 8640 of file sig_pri.c.
References AST_DEVICE_BUSY, AST_DEVICE_INUSE, AST_DEVICE_NOT_INUSE, AST_DEVICE_UNKNOWN, ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_monitor_instance::cc_id, sig_pri_span::lock, sig_pri_cc_monitor_instance::pri, sig_pri_span::pri, and ast_cc_monitor::private_data.
int sig_pri_cc_monitor_suspend | ( | struct ast_cc_monitor * | monitor | ) |
Suspend monitoring.
monitor | CC core monitor control. |
Implementers must perform the necessary steps to suspend monitoring.
0 | on success |
-1 | on failure. |
Definition at line 8584 of file sig_pri.c.
References ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_monitor_instance::cc_id, sig_pri_span::lock, sig_pri_cc_monitor_instance::pri, sig_pri_span::pri, and ast_cc_monitor::private_data.
int sig_pri_cc_monitor_unsuspend | ( | struct ast_cc_monitor * | monitor | ) |
Unsuspend monitoring.
monitor | CC core monitor control. |
Perform the necessary steps to unsuspend monitoring.
0 | on success |
-1 | on failure. |
Definition at line 8610 of file sig_pri.c.
References ast_mutex_lock, ast_mutex_unlock, sig_pri_cc_monitor_instance::cc_id, sig_pri_span::lock, sig_pri_cc_monitor_instance::pri, sig_pri_span::pri, and ast_cc_monitor::private_data.
void sig_pri_chan_alarm_notify | ( | struct sig_pri_chan * | p, |
int | noalarm | ||
) |
Notify new alarm status.
p | Channel private pointer. |
noalarm | Non-zero if not in alarm mode. |
Definition at line 7894 of file sig_pri.c.
References ast_channel::_softhangup, AST_SOFTHANGUP_DEV, sig_pri_chan::call, sig_pri_chan::owner, sig_pri_chan::pri, sig_pri_span::pri, pri_grab(), pri_rel(), sig_pri_set_alarm(), and sig_pri_span_devstate_changed().
Referenced by dahdi_handle_event(), and handle_init_event().
void sig_pri_chan_delete | ( | struct sig_pri_chan * | doomed | ) |
Delete the sig_pri private channel structure.
doomed | sig_pri private channel structure to delete. |
Definition at line 7953 of file sig_pri.c.
References ast_free.
Referenced by destroy_dahdi_pvt().
struct sig_pri_chan* sig_pri_chan_new | ( | void * | pvt_data, |
struct sig_pri_callback * | callback, | ||
struct sig_pri_span * | pri, | ||
int | logicalspan, | ||
int | channo, | ||
int | trunkgroup | ||
) |
Definition at line 7925 of file sig_pri.c.
References ast_calloc, sig_pri_chan::calls, sig_pri_chan::chan_pvt, sig_pri_chan::logicalspan, sig_pri_chan::mastertrunkgroup, sig_pri_chan::pri, and sig_pri_chan::prioffset.
Referenced by dahdi_new_pri_nobch_channel(), and mkintf().
void sig_pri_cli_show_channels | ( | int | fd, |
struct sig_pri_span * | pri | ||
) |
Definition at line 7966 of file sig_pri.c.
References ast_channel_unlock, ast_cli(), ast_mutex_lock, ast_mutex_unlock, sig_pri_chan::call, sig_pri_chan::call_level, sig_pri_chan::channel, sig_pri_span::lock, ast_channel::name, sig_pri_chan::no_b_channel, sig_pri_span::numchans, sig_pri_chan::owner, sig_pri_span::pvts, sig_pri_call_level2str(), sig_pri_is_chan_available(), sig_pri_lock_owner(), sig_pri_lock_private(), SIG_PRI_SC_LINE, sig_pri_unlock_private(), and sig_pri_span::span.
Referenced by handle_pri_show_channels().
void sig_pri_cli_show_channels_header | ( | int | fd | ) |
Definition at line 7960 of file sig_pri.c.
References ast_cli(), and SIG_PRI_SC_HEADER.
Referenced by handle_pri_show_channels().
void sig_pri_cli_show_span | ( | int | fd, |
int * | dchannels, | ||
struct sig_pri_span * | pri | ||
) |
Definition at line 8038 of file sig_pri.c.
References ast_cli(), ast_mutex_lock, ast_mutex_unlock, ast_std_free(), build_status(), DAHDI_OVERLAPDIAL_INCOMING, sig_pri_span::dchanavail, sig_pri_span::dchans, sig_pri_span::lock, sig_pri_span::overlapdial, sig_pri_span::pri, pri_order(), SIG_PRI_NUM_DCHANS, and status.
Referenced by handle_pri_show_span().
void sig_pri_cli_show_spans | ( | int | fd, |
int | span, | ||
struct sig_pri_span * | pri | ||
) |
Definition at line 8026 of file sig_pri.c.
References ast_cli(), build_status(), sig_pri_span::dchanavail, sig_pri_span::dchans, sig_pri_span::pri, SIG_PRI_NUM_DCHANS, and status.
Referenced by handle_pri_show_spans().
|
static |
Definition at line 7665 of file sig_pri.c.
References sig_pri_chan::channel.
Referenced by sig_pri_sort_pri_chans().
|
static |
Definition at line 7379 of file sig_pri.c.
References ast_atomic_fetchadd_int(), sig_pri_chan::is_call_waiting, sig_pri_span::max_call_waiting_calls, sig_pri_span::num_call_waiting_calls, sig_pri_span::numchans, pri_find_empty_nobch(), sig_pri_span::pvts, sig_pri_available_check(), and sig_pri_init_config().
Referenced by sig_pri_available().
void sig_pri_dial_complete | ( | struct sig_pri_chan * | pvt, |
struct ast_channel * | ast | ||
) |
DTMF dial string complete.
pvt | sig_pri private channel structure. |
ast | Asterisk channel |
Definition at line 7506 of file sig_pri.c.
References AST_CONTROL_ANSWER, AST_FRAME_CONTROL, ast_queue_frame(), sig_pri_chan::call_level, sig_pri_chan::calls, sig_pri_chan::chan_pvt, ast_frame_subclass::integer, sig_pri_callback::queue_control, SIG_PRI_CALL_LEVEL_CONNECT, SIG_PRI_CALL_LEVEL_DEFER_DIAL, sig_pri_open_media(), sig_pri_set_dialing(), sig_pri_set_echocanceller(), and ast_frame::subclass.
Referenced by dahdi_handle_event().
|
static |
Definition at line 228 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::dial_digits.
Referenced by pri_dchannel().
int sig_pri_digit_begin | ( | struct sig_pri_chan * | pvt, |
struct ast_channel * | ast, | ||
char | digit | ||
) |
Definition at line 7460 of file sig_pri.c.
References ast_channel::_state, ast_debug, ast_log(), AST_STATE_DIALING, sig_pri_chan::call, sig_pri_chan::call_level, sig_pri_chan::dialdest, len(), LOG_WARNING, sig_pri_chan::pri, sig_pri_span::pri, pri_grab(), pri_rel(), sig_pri_call_level2str(), SIG_PRI_CALL_LEVEL_CONNECT, SIG_PRI_CALL_LEVEL_OVERLAP, SIG_PRI_CALL_LEVEL_PROCEEDING, and sig_pri_span::span.
Referenced by dahdi_digit_begin().
|
static |
Definition at line 914 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::dsp_reset_and_flush_digits.
Referenced by pri_ss_thread().
|
static |
Definition at line 2178 of file sig_pri.c.
References ast_describe_caller_presentation(), ast_party_id_presentation(), ast_party_name_charset_describe(), ast_str_append(), ast_party_name::char_set, ast_party_id::name, ast_party_id::number, ast_party_subaddress::odd_even_indicator, ast_party_number::plan, ast_party_name::presentation, ast_party_number::presentation, S_COR, S_OR, ast_party_name::str, ast_party_number::str, ast_party_subaddress::str, ast_party_id::subaddress, ast_party_subaddress::type, ast_party_name::valid, ast_party_number::valid, and ast_party_subaddress::valid.
Referenced by sig_pri_mcid_event().
void sig_pri_extract_called_num_subaddr | ( | struct sig_pri_chan * | p, |
const char * | rdest, | ||
char * | called, | ||
size_t | called_buff_size | ||
) |
Extract the called number and subaddress from the dial string.
p | sig_pri channel structure. |
rdest | Dial string buffer to extract called number and subaddress. |
called | Buffer to fill with extracted <number>[:<subaddress>] |
called_buff_size | Size of buffer to fill. |
Definition at line 6555 of file sig_pri.c.
References args, AST_APP_ARG, AST_DECLARE_APP_ARGS, AST_NONSTANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), ext, and sig_pri_chan::stripmsd.
Referenced by dahdi_request().
|
static |
Definition at line 2531 of file sig_pri.c.
References ast_cc_agent_callback(), sig_pri_cc_agent_prv::cc_id, sig_pri_cc_agent_prv::pri, sig_pri_cc_agent_cmp_cc_id(), and sig_pri_cc_type_name.
Referenced by sig_pri_cc_link_canceled(), sig_pri_handle_cis_subcmds(), and sig_pri_handle_subcmds().
|
static |
Definition at line 2582 of file sig_pri.c.
References ao2_callback, sig_pri_cc_monitor_instance::cc_id, sig_pri_cc_monitor_instance::pri, and sig_pri_cc_monitor_cmp_cc_id().
Referenced by sig_pri_cc_link_canceled(), and sig_pri_handle_cis_subcmds().
void sig_pri_fixup | ( | struct ast_channel * | oldchan, |
struct ast_channel * | newchan, | ||
struct sig_pri_chan * | pchan | ||
) |
Definition at line 8118 of file sig_pri.c.
References sig_pri_chan::owner.
Referenced by dahdi_fixup().
|
static |
Definition at line 929 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::fixup_chans.
Referenced by pri_fixup_principle().
|
static |
Definition at line 207 of file sig_pri.c.
References ast_log(), sig_pri_chan::calls, sig_pri_chan::chan_pvt, sig_pri_callback::get_orig_dialstring, and LOG_ERROR.
Referenced by sig_pri_cc_available(), and sig_pri_cc_generic_check().
|
static |
Definition at line 3851 of file sig_pri.c.
References ao2_ref, ast_cc_agent_accept_request(), ast_cc_agent_caller_available(), ast_cc_agent_caller_busy(), ast_cc_agent_status_response(), ast_cc_failed(), ast_cc_monitor_callee_available(), ast_cc_monitor_failed(), ast_cc_monitor_party_b_free(), ast_cc_monitor_request_acked(), ast_cc_monitor_status_request(), ast_cc_monitor_stop_ringing(), ast_cc_request_is_within_limits(), ast_debug, AST_DEVICE_INUSE, AST_DEVICE_NOT_INUSE, ast_verb, sig_pri_cc_agent_prv::cc_request_response_pending, sig_pri_cc_monitor_instance::core_id, ast_cc_agent::core_id, monitor, sig_pri_cc_monitor_instance::name, sig_pri_span::pri, ast_cc_agent::private_data, sig_pri_aoc_e_from_pri(), sig_pri_cc_link_canceled(), sig_pri_cc_type_name, sig_pri_find_cc_agent_by_cc_id(), sig_pri_find_cc_monitor_by_cc_id(), and sig_pri_span::span.
Referenced by pri_dchannel().
|
static |
Definition at line 158 of file sig_pri.c.
References sig_pri_span::calls, and sig_pri_callback::handle_dchan_exception.
Referenced by pri_dchannel().
|
static |
Definition at line 4460 of file sig_pri.c.
References ast_channel_unlock, AST_CONTROL_HOLD, AST_FRAME_CONTROL, ast_log(), ast_queue_frame(), sig_pri_chan::call_level, ast_frame_subclass::integer, LOG_WARNING, sig_pri_chan::no_b_channel, sig_pri_chan::owner, pri_find_empty_nobch(), pri_find_principle_by_call(), pri_fixup_principle(), sig_pri_span::pvts, SIG_PRI_CALL_LEVEL_CONNECT, sig_pri_handle_subcmds(), sig_pri_lock_owner(), sig_pri_lock_private(), sig_pri_span_devstate_changed(), sig_pri_unlock_private(), sig_pri_span::span, and ast_frame::subclass.
Referenced by pri_dchannel().
|
static |
Definition at line 4542 of file sig_pri.c.
References AST_CONTROL_UNHOLD, ast_log(), LOG_WARNING, sig_pri_span::pri, PRI_CHANNEL, pri_find_empty_chan(), pri_find_principle(), pri_find_principle_by_call(), pri_fixup_principle(), PRI_HELD_CALL, pri_queue_control(), PVT_TO_CHANNEL(), sig_pri_span::pvts, sig_pri_handle_subcmds(), sig_pri_is_chan_available(), sig_pri_lock_private(), sig_pri_span_devstate_changed(), sig_pri_unlock_private(), and sig_pri_span::span.
Referenced by pri_dchannel().
|
static |
Definition at line 4107 of file sig_pri.c.
References ast_party_caller::ani, ao2_ref, sig_pri_span::aoc_passthrough_flag, ast_cc_agent_recalling(), ast_cc_agent_set_interfaces_chanvar(), AST_CC_CCBS, AST_CC_CCNR, AST_CC_NONE, ast_channel_queue_connected_line_update(), ast_channel_queue_redirecting_update(), ast_channel_set_caller_event(), ast_channel_set_redirecting(), ast_channel_unlock, AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER, ast_copy_string(), ast_debug, ast_log(), ast_null_frame, ast_party_caller_set_init(), ast_party_connected_line_free(), ast_party_connected_line_init(), ast_party_id_presentation(), ast_party_redirecting_free(), ast_queue_frame(), ast_setup_cc_recall_datastore(), ast_strdup, ast_string_field_set, ast_strlen_zero(), ast_verb, xfer_rsp_data::call, ast_channel::caller, sig_pri_chan::callingpres, sig_pri_chan::cid_name, sig_pri_chan::cid_num, sig_pri_chan::cid_subaddr, sig_pri_chan::cid_ton, ast_cc_agent::core_id, ast_party_redirecting::from, ast_party_caller::id, ast_party_connected_line::id, xfer_rsp_data::invoke_id, LOG_ERROR, LOG_WARNING, ast_party_id::name, ast_channel::name, ast_party_id::number, sig_pri_chan::owner, ast_party_number::plan, sig_pri_span::pri, xfer_rsp_data::pri, PRI_CHANNEL, PRI_SPAN, sig_pri_span::pvts, ast_channel::redirecting, service, sig_pri_aoc_d_from_pri(), sig_pri_aoc_e_from_pri(), SIG_PRI_AOC_GRANT_D, SIG_PRI_AOC_GRANT_E, SIG_PRI_AOC_GRANT_S, sig_pri_aoc_request_from_pri(), sig_pri_aoc_s_from_pri(), sig_pri_attempt_transfer(), sig_pri_cc_available(), sig_pri_cc_link_canceled(), sig_pri_cc_type_name, sig_pri_find_cc_agent_by_cc_id(), sig_pri_lock_owner(), sig_pri_lock_private(), sig_pri_mcid_event(), sig_pri_party_id_convert(), sig_pri_redirecting_convert(), sig_pri_set_caller_id(), sig_pri_transfer_rsp(), sig_pri_unlock_private(), ast_party_connected_line::source, sig_pri_span::span, ast_party_name::str, ast_party_number::str, ast_party_subaddress::str, ast_party_id::subaddress, ast_party_id::tag, ast_party_redirecting::to, sig_pri_span::transfer, and sig_pri_chan::user_tag.
Referenced by pri_dchannel(), sig_pri_handle_hold(), and sig_pri_handle_retrieve().
int sig_pri_hangup | ( | struct sig_pri_chan * | p, |
struct ast_channel * | ast | ||
) |
Definition at line 6464 of file sig_pri.c.
References sig_pri_chan::allocated, sig_pri_chan::alreadyhungup, sig_pri_chan::aoc_e, sig_pri_chan::aoc_s_request_invoke_id_valid, ast_atomic_fetchadd_int(), ast_debug, ast_log(), ast_strlen_zero(), sig_pri_chan::call, sig_pri_chan::call_level, sig_pri_chan::channel, sig_pri_chan::cid_name, sig_pri_chan::cid_num, sig_pri_chan::cid_subaddr, sig_pri_chan::exten, ast_channel::hangupcause, sig_pri_chan::holding_aoce, sig_pri_chan::is_call_waiting, LOG_WARNING, sig_pri_span::num_call_waiting_calls, sig_pri_chan::owner, pbx_builtin_getvar_helper(), sig_pri_chan::pri, sig_pri_span::pri, pri_grab(), pri_rel(), sig_pri_chan::progress, SIG_PRI_CALL_LEVEL_IDLE, sig_pri_set_dialing(), sig_pri_set_digital(), sig_pri_set_outgoing(), sig_pri_span_devstate_changed(), ast_channel::tech_pvt, sig_pri_chan::user_tag, and sig_pri_chan::waiting_for_aoce.
Referenced by dahdi_hangup().
int sig_pri_indicate | ( | struct sig_pri_chan * | p, |
struct ast_channel * | chan, | ||
int | condition, | ||
const void * | data, | ||
size_t | datalen | ||
) |
Definition at line 7092 of file sig_pri.c.
References ast_channel::_softhangup, ast_channel::_state, sig_pri_span::aoc_passthrough_flag, AST_AOC_D, ast_aoc_decode(), ast_aoc_destroy_decoded(), AST_AOC_E, ast_aoc_get_msg_type(), ast_aoc_get_termination_request(), AST_AOC_REQUEST, AST_AOC_S, AST_CAUSE_INVALID_NUMBER_FORMAT, AST_CAUSE_NORMAL_CLEARING, AST_CAUSE_SWITCH_CONGESTION, AST_CAUSE_USER_BUSY, AST_CONTROL_AOC, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_HOLD, AST_CONTROL_INCOMPLETE, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_REDIRECTING, AST_CONTROL_RINGING, AST_CONTROL_SRCUPDATE, AST_CONTROL_UNHOLD, ast_debug, ast_log(), ast_moh_start(), ast_moh_stop(), ast_setstate(), AST_SOFTHANGUP_DEV, ast_softhangup_nolock(), AST_STATE_RING, AST_STATE_RINGING, AST_STATE_UP, sig_pri_chan::call, sig_pri_chan::call_level, ast_channel::connected, DAHDI_OVERLAPDIAL_INCOMING, sig_pri_chan::digital, ast_channel::hangupcause, ast_party_connected_line::id, LOG_DEBUG, sig_pri_chan::mohinterpret, ast_channel::name, sig_pri_chan::no_b_channel, sig_pri_chan::outgoing, sig_pri_span::overlapdial, sig_pri_chan::pri, sig_pri_span::pri, pri_grab(), pri_rel(), sig_pri_chan::priindication_oob, sig_pri_chan::prioffset, sig_pri_chan::progress, PVT_TO_CHANNEL(), sig_pri_aoc_d_from_ast(), sig_pri_aoc_e_from_ast(), SIG_PRI_AOC_GRANT_D, SIG_PRI_AOC_GRANT_E, SIG_PRI_AOC_GRANT_S, sig_pri_aoc_s_from_ast(), SIG_PRI_CALL_LEVEL_ALERTING, SIG_PRI_CALL_LEVEL_CONNECT, SIG_PRI_CALL_LEVEL_PROCEEDING, sig_pri_party_id_from_ast(), sig_pri_play_tone(), sig_pri_redirecting_update(), sig_pri_set_digital(), SIG_PRI_TONE_BUSY, SIG_PRI_TONE_CONGESTION, SIG_PRI_TONE_RINGTONE, and sig_pri_chan::waiting_for_aoce.
Referenced by dahdi_indicate().
|
static |
Definition at line 1740 of file sig_pri.c.
References ast_copy_string(), sig_pri_span::calls, sig_pri_span::ch_cfg, sig_pri_chan::chan_pvt, sig_pri_chan::context, sig_pri_span::context, sig_pri_chan::hidecallerid, sig_pri_span::hidecallerid, sig_pri_chan::hidecalleridname, sig_pri_span::hidecalleridname, sig_pri_chan::immediate, sig_pri_span::immediate, sig_pri_callback::init_config, sig_pri_chan::mohinterpret, sig_pri_span::mohinterpret, sig_pri_chan::priexclusive, sig_pri_span::priexclusive, sig_pri_chan::priindication_oob, sig_pri_span::priindication_oob, sig_pri_chan::stripmsd, sig_pri_span::stripmsd, sig_pri_chan::use_callerid, sig_pri_span::use_callerid, sig_pri_chan::use_callingpres, and sig_pri_span::use_callingpres.
Referenced by pri_dchannel(), and sig_pri_cw_available().
void sig_pri_init_pri | ( | struct sig_pri_span * | pri | ) |
Definition at line 6451 of file sig_pri.c.
References ast_mutex_init, AST_PTHREADT_NULL, sig_pri_span::fds, sig_pri_span::lock, sig_pri_span::master, and SIG_PRI_NUM_DCHANS.
Referenced by dahdi_restart(), and load_module().
int sig_pri_is_alarm_ignored | ( | struct sig_pri_span * | pri | ) |
Determine if layer 1 alarms are ignored.
p | Channel private pointer. |
Definition at line 7920 of file sig_pri.c.
References sig_pri_span::layer1_ignored.
Referenced by handle_alarms(), handle_clear_alarms(), my_handle_dchan_exception(), and sig_pri_set_alarm().
int sig_pri_is_chan_available | ( | struct sig_pri_chan * | pvt | ) |
Determine if a private channel structure is available.
pvt | Channel to determine if available. |
Definition at line 1160 of file sig_pri.c.
References sig_pri_chan::service_status, and sig_pri_is_chan_in_use().
Referenced by dahdi_pri_update_span_devstate(), pri_dchannel(), pri_find_empty_chan(), pri_find_empty_nobch(), pri_fixup_principle(), sig_pri_available_check(), sig_pri_cli_show_channels(), and sig_pri_handle_retrieve().
|
static |
Definition at line 1146 of file sig_pri.c.
References sig_pri_chan::allocated, sig_pri_chan::call, sig_pri_chan::inalarm, sig_pri_chan::owner, sig_pri_chan::resetting, and SIG_PRI_RESET_IDLE.
Referenced by pri_check_restart(), and sig_pri_is_chan_available().
|
static |
|
static |
Definition at line 1295 of file sig_pri.c.
References AST_CONTROL_HANGUP, sig_pri_chan::call, ast_channel::hangupcause, sig_pri_chan::owner, sig_pri_span::pri, pri_find_principle_by_call(), pri_queue_control(), sig_pri_span::pvts, sig_pri_lock_private(), sig_pri_span_devstate_changed(), and sig_pri_unlock_private().
Referenced by pri_find_fixup_principle().
int sig_pri_load | ( | const char * | cc_type_name | ) |
Load the sig_pri submodule.
cc_type_name | CC type name to use when looking up agent/monitor. |
0 | on success. |
-1 | on error. |
Definition at line 8730 of file sig_pri.c.
References ao2_container_alloc, sig_pri_cc_monitor_instance_cmp_fn(), sig_pri_cc_monitor_instance_hash_fn(), and sig_pri_cc_type_name.
Referenced by load_module().
|
static |
Definition at line 1183 of file sig_pri.c.
References ast_channel_trylock, DEADLOCK_AVOIDANCE, sig_pri_span::lock, sig_pri_chan::owner, sig_pri_span::pvts, sig_pri_lock_private(), and sig_pri_unlock_private().
Referenced by pri_dchannel(), pri_fixup_principle(), pri_queue_frame(), sig_pri_attempt_transfer(), sig_pri_cc_generic_check(), sig_pri_cli_show_channels(), sig_pri_handle_hold(), sig_pri_handle_subcmds(), and sig_pri_send_aoce_termination_request().
|
static |
Definition at line 336 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::lock_private.
Referenced by pri_dchannel(), pri_fixup_principle(), pri_grab(), pri_send_callrerouting_facility_exec(), pri_send_keypad_facility_exec(), pri_ss_thread(), sig_pri_attempt_transfer(), sig_pri_cli_show_channels(), sig_pri_handle_hold(), sig_pri_handle_retrieve(), sig_pri_handle_subcmds(), sig_pri_kill_call(), and sig_pri_lock_owner().
|
static |
Definition at line 217 of file sig_pri.c.
References ast_log(), sig_pri_chan::calls, sig_pri_chan::chan_pvt, LOG_ERROR, and sig_pri_callback::make_cc_dialstring.
Referenced by sig_pri_cc_available().
|
static |
Definition at line 2245 of file sig_pri.c.
References ast_free, ast_manager_event_multichan, ast_party_id_free(), ast_party_id_init(), ast_str_append(), ast_str_buffer(), ast_str_create(), ast_channel::connected, EVENT_FLAG_CALL, ast_party_connected_line::id, ast_channel::name, sig_pri_event_party_id(), sig_pri_party_id_convert(), and ast_channel::uniqueid.
Referenced by sig_pri_handle_subcmds().
|
static |
Definition at line 2144 of file sig_pri.c.
References ast_extension_match(), ast_strdupa, ast_strip(), and ast_strlen_zero().
Referenced by pri_dchannel().
|
static |
Definition at line 7602 of file sig_pri.c.
References ARRAY_LEN, ast_event_destroy(), ast_event_get_cached(), ast_event_get_ie_uint(), AST_EVENT_IE_CONTEXT, AST_EVENT_IE_END, AST_EVENT_IE_MAILBOX, AST_EVENT_IE_NEWMSGS, AST_EVENT_IE_PLTYPE_STR, AST_EVENT_MWI, sig_pri_mbox::context, sig_pri_span::mbox, sig_pri_mbox::number, sig_pri_send_mwi_indication(), and sig_pri_mbox::sub.
Referenced by sig_pri_start_pri().
|
static |
Definition at line 7572 of file sig_pri.c.
References ast_event_get_ie_str(), ast_event_get_ie_uint(), AST_EVENT_IE_CONTEXT, AST_EVENT_IE_MAILBOX, AST_EVENT_IE_NEWMSGS, ast_strlen_zero(), sig_pri_span::pri, and sig_pri_send_mwi_indication().
Referenced by sig_pri_start_pri().
|
static |
Definition at line 943 of file sig_pri.c.
References sig_pri_chan::alreadyhungup, ast_mutex_lock, ast_mutex_unlock, AST_TRANS_CAP_DIGITAL, ast_transfercapability2str(), sig_pri_chan::calls, sig_pri_chan::chan_pvt, sig_pri_chan::isidlecall, sig_pri_span::lock, sig_pri_callback::new_ast_channel, sig_pri_chan::owner, pbx_builtin_setvar_helper(), sig_pri_chan::pri, sig_pri_set_digital(), sig_pri_span_devstate_changed(), and ast_channel::transfercapability.
Referenced by pri_dchannel(), and sig_pri_request().
|
static |
Definition at line 984 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, sig_pri_chan::no_b_channel, and sig_pri_callback::open_media.
Referenced by pri_dchannel(), pri_fixup_principle(), sig_pri_answer(), and sig_pri_dial_complete().
|
static |
Definition at line 2090 of file sig_pri.c.
References ast_party_id::name, ast_party_id::number, sig_pri_party_name_convert(), sig_pri_party_number_convert(), sig_pri_set_subaddress(), and ast_party_id::subaddress.
Referenced by sig_pri_handle_subcmds(), sig_pri_mcid_event(), and sig_pri_redirecting_convert().
|
static |
Definition at line 869 of file sig_pri.c.
References ast_party_id::name, ast_party_id::number, sig_pri_party_name_from_ast(), sig_pri_party_number_from_ast(), sig_pri_party_subaddress_from_ast(), and ast_party_id::subaddress.
Referenced by sig_pri_indicate(), and sig_pri_redirecting_update().
|
static |
Definition at line 2042 of file sig_pri.c.
References ast_strdup, ast_party_name::char_set, ast_party_name::presentation, pri_to_ast_char_set(), pri_to_ast_presentation(), ast_party_name::str, and ast_party_name::valid.
Referenced by sig_pri_party_id_convert().
|
static |
Definition at line 819 of file sig_pri.c.
References ast_copy_string(), ast_strlen_zero(), ast_to_pri_char_set(), ast_to_pri_presentation(), ast_party_name::char_set, ast_party_name::presentation, ast_party_name::str, and ast_party_name::valid.
Referenced by sig_pri_party_id_from_ast().
|
static |
Definition at line 2064 of file sig_pri.c.
References apply_plan_to_existing_number(), AST_MAX_EXTENSION, ast_strdup, ast_party_number::plan, ast_party_number::presentation, pri_to_ast_presentation(), ast_party_number::str, and ast_party_number::valid.
Referenced by sig_pri_party_id_convert().
|
static |
Definition at line 844 of file sig_pri.c.
References ast_copy_string(), ast_strlen_zero(), ast_to_pri_presentation(), ast_party_number::plan, ast_party_number::presentation, ast_party_number::str, and ast_party_number::valid.
Referenced by sig_pri_party_id_from_ast().
|
static |
Definition at line 773 of file sig_pri.c.
References ast_copy_string(), ast_pri_pack_hex_string(), ast_strlen_zero(), ast_party_subaddress::str, ast_party_subaddress::type, and ast_party_subaddress::valid.
Referenced by sig_pri_call(), and sig_pri_party_id_from_ast().
|
static |
Definition at line 935 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::play_tone.
Referenced by pri_ss_thread(), and sig_pri_indicate().
|
static |
Definition at line 2120 of file sig_pri.c.
References ast_party_redirecting_set_init(), ast_party_redirecting::count, ast_party_redirecting::from, pri_to_ast_reason(), ast_party_redirecting::reason, sig_pri_party_id_convert(), and ast_party_redirecting::to.
Referenced by sig_pri_handle_subcmds().
|
static |
Definition at line 890 of file sig_pri.c.
References ast_to_pri_reason(), sig_pri_chan::call, ast_party_redirecting::count, ast_party_redirecting::from, sig_pri_chan::pri, sig_pri_span::pri, ast_party_redirecting::reason, ast_channel::redirecting, sig_pri_party_id_from_ast(), and ast_party_redirecting::to.
Referenced by sig_pri_call(), and sig_pri_indicate().
struct ast_channel* sig_pri_request | ( | struct sig_pri_chan * | p, |
enum sig_pri_law | law, | ||
const struct ast_channel * | requestor, | ||
int | transfercapability | ||
) |
Definition at line 1013 of file sig_pri.c.
References ast_log(), AST_STATE_RESERVED, sig_pri_chan::channel, sig_pri_chan::exten, LOG_DEBUG, sig_pri_new_ast_channel(), and sig_pri_set_outgoing().
Referenced by dahdi_request(), and pri_dchannel().
|
static |
Definition at line 3774 of file sig_pri.c.
References ast_aoc_create(), ast_aoc_destroy_decoded(), ast_aoc_destroy_encoded(), ast_aoc_encode(), AST_AOC_REQUEST, AST_AOC_REQUEST_E, ast_aoc_set_termination_request(), ast_channel_setwhentohangup_tv(), ast_channel_unlock, AST_CONTROL_AOC, ast_log(), ast_queue_control_data(), AST_SOFTHANGUP_DEV, ast_softhangup_nolock(), LOG_DEBUG, ast_channel::name, sig_pri_chan::owner, sig_pri_span::pvts, sig_pri_lock_owner(), and sig_pri_chan::waiting_for_aoce.
Referenced by pri_dchannel().
|
static |
Definition at line 7542 of file sig_pri.c.
References ast_copy_string(), ast_debug, ast_mutex_lock, ast_mutex_unlock, sig_pri_span::lock, and sig_pri_span::pri.
Referenced by sig_pri_mwi_cache_update(), and sig_pri_mwi_event_cb().
void sig_pri_set_alarm | ( | struct sig_pri_chan * | p, |
int | in_alarm | ||
) |
Definition at line 187 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, sig_pri_chan::inalarm, sig_pri_chan::pri, sig_pri_chan::resetting, sig_pri_callback::set_alarm, sig_pri_is_alarm_ignored(), and SIG_PRI_RESET_IDLE.
Referenced by mkintf(), pri_dchannel(), and sig_pri_chan_alarm_notify().
|
static |
Definition at line 262 of file sig_pri.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_party_caller_init(), ast_strlen_zero(), sig_pri_chan::callingpres, sig_pri_chan::calls, sig_pri_chan::chan_pvt, sig_pri_chan::cid_ani, sig_pri_chan::cid_ani2, sig_pri_chan::cid_name, sig_pri_chan::cid_num, sig_pri_chan::cid_subaddr, sig_pri_chan::cid_ton, ast_party_caller::id, ast_party_id::name, ast_party_id::number, ast_party_number::plan, ast_party_name::presentation, ast_party_number::presentation, sig_pri_callback::set_callerid, ast_party_name::str, ast_party_number::str, ast_party_subaddress::str, ast_party_id::subaddress, ast_party_id::tag, sig_pri_chan::user_tag, ast_party_name::valid, ast_party_number::valid, and ast_party_subaddress::valid.
Referenced by pri_dchannel(), and sig_pri_handle_subcmds().
|
static |
Definition at line 164 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::set_dialing.
Referenced by pri_dchannel(), sig_pri_answer(), sig_pri_call(), sig_pri_dial_complete(), and sig_pri_hangup().
|
static |
Definition at line 171 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, sig_pri_chan::digital, and sig_pri_callback::set_digital.
Referenced by sig_pri_call(), sig_pri_hangup(), sig_pri_indicate(), and sig_pri_new_ast_channel().
|
static |
Definition at line 306 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::set_dnid.
Referenced by pri_dchannel().
|
static |
Definition at line 921 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::set_echocanceller.
Referenced by pri_dchannel(), pri_ss_thread(), and sig_pri_dial_complete().
|
static |
Definition at line 179 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, sig_pri_chan::outgoing, and sig_pri_callback::set_outgoing.
Referenced by sig_pri_call(), sig_pri_hangup(), and sig_pri_request().
|
static |
Definition at line 323 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::set_rdnis.
Referenced by pri_dchannel().
|
static |
Definition at line 650 of file sig_pri.c.
References ast_free, ast_malloc, ast_party_subaddress_init(), ast_strdup, len(), ast_party_subaddress::odd_even_indicator, ast_party_subaddress::str, ast_party_subaddress::type, and ast_party_subaddress::valid.
Referenced by pri_dchannel(), and sig_pri_party_id_convert().
|
static |
Definition at line 7698 of file sig_pri.c.
References sig_pri_span::numchans, sig_pri_span::pvts, and sig_pri_cmp_pri_chans().
Referenced by sig_pri_start_pri().
|
static |
Definition at line 246 of file sig_pri.c.
References sig_pri_span::calls, and sig_pri_callback::update_span_devstate.
Referenced by pri_check_restart(), pri_dchannel(), pri_ss_thread(), sig_pri_chan_alarm_notify(), sig_pri_handle_hold(), sig_pri_handle_retrieve(), sig_pri_hangup(), sig_pri_kill_call(), and sig_pri_new_ast_channel().
int sig_pri_start_pri | ( | struct sig_pri_span * | pri | ) |
Definition at line 7703 of file sig_pri.c.
References ARRAY_LEN, AST_EVENT_IE_CONTEXT, AST_EVENT_IE_END, AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, AST_EVENT_MWI, ast_event_subscribe(), ast_event_unsubscribe(), ast_log(), ast_mutex_init, ast_pthread_create_background, ast_str_alloca, ast_str_buffer(), ast_str_set(), ast_strip(), ast_strlen_zero(), sig_pri_span::cc_ptmp_recall_mode, sig_pri_span::cc_qsig_signaling_link_req, sig_pri_span::cc_qsig_signaling_link_rsp, sig_pri_mbox::context, DAHDI_CHAN_MAPPING_LOGICAL, DAHDI_OVERLAPDIAL_OUTGOING, sig_pri_span::dchans, sig_pri_span::enable_service_message_support, errno, sig_pri_span::fds, sig_pri_span::inbanddisconnect, sig_pri_span::l2_persistence, sig_pri_span::lock, LOG_ERROR, sig_pri_span::master, sig_pri_span::mbox, sig_pri_span::mwi_mailboxes, sig_pri_span::nodetype, sig_pri_span::nsf, sig_pri_mbox::number, sig_pri_span::overlapdial, sig_pri_span::pri, pri_dchannel(), sig_pri_span::pritimers, sig_pri_span::qsigchannelmapping, sig_pri_span::resetpos, sig_pri_span::sig, SIG_BRI, SIG_BRI_PTMP, sig_pri_cc_type_name, SIG_PRI_DEBUG_DEFAULT, sig_pri_mwi_cache_update(), sig_pri_mwi_event_cb(), SIG_PRI_NUM_DCHANS, sig_pri_sort_pri_chans(), sig_pri_span::span, strsep(), sig_pri_mbox::sub, and sig_pri_span::switchtype.
Referenced by setup_dahdi_int().
void sig_pri_stop_pri | ( | struct sig_pri_span * | pri | ) |
Stop PRI span.
pri | PRI span control structure. |
Definition at line 7638 of file sig_pri.c.
References ARRAY_LEN, ast_event_unsubscribe(), sig_pri_span::mbox, and sig_pri_mbox::sub.
Referenced by __unload_module().
|
static |
Definition at line 2307 of file sig_pri.c.
References xfer_rsp_data::call, xfer_rsp_data::invoke_id, sig_pri_span::pri, and xfer_rsp_data::pri.
Referenced by sig_pri_handle_subcmds().
void sig_pri_unload | ( | void | ) |
Unload the sig_pri submodule.
Definition at line 8749 of file sig_pri.c.
References ao2_ref.
Referenced by __unload_module().
|
static |
Definition at line 330 of file sig_pri.c.
References sig_pri_chan::calls, sig_pri_chan::chan_pvt, and sig_pri_callback::unlock_private.
Referenced by pri_dchannel(), pri_fixup_principle(), pri_grab(), pri_send_callrerouting_facility_exec(), pri_send_keypad_facility_exec(), pri_ss_thread(), sig_pri_attempt_transfer(), sig_pri_cli_show_channels(), sig_pri_handle_hold(), sig_pri_handle_retrieve(), sig_pri_handle_subcmds(), sig_pri_kill_call(), and sig_pri_lock_owner().
|
static |
Definition at line 106 of file sig_pri.c.
Referenced by pri_ss_thread().
|
static |
Definition at line 104 of file sig_pri.c.
Referenced by pri_ss_thread().
|
static |
Definition at line 6638 of file sig_pri.c.
Referenced by sig_pri_call().
|
static |
|
static |
Upper level agent/monitor type name.
Definition at line 99 of file sig_pri.c.
Referenced by sig_pri_call(), sig_pri_cc_agent_req_rsp(), sig_pri_cc_available(), sig_pri_cc_link_canceled(), sig_pri_find_cc_agent_by_cc_id(), sig_pri_handle_cis_subcmds(), sig_pri_handle_subcmds(), sig_pri_load(), and sig_pri_start_pri().