Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Implementation of Inter-Asterisk eXchange Version 2 as specified in RFC 5456. More...
#include "asterisk.h"
#include <sys/mman.h>
#include <dirent.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <sys/time.h>
#include <signal.h>
#include <netdb.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <regex.h>
#include "asterisk/paths.h"
#include "asterisk/lock.h"
#include "asterisk/frame.h"
#include "asterisk/channel.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/sched.h"
#include "asterisk/io.h"
#include "asterisk/config.h"
#include "asterisk/cli.h"
#include "asterisk/translate.h"
#include "asterisk/md5.h"
#include "asterisk/crypto.h"
#include "asterisk/acl.h"
#include "asterisk/manager.h"
#include "asterisk/callerid.h"
#include "asterisk/app.h"
#include "asterisk/mwi.h"
#include "asterisk/astdb.h"
#include "asterisk/musiconhold.h"
#include "asterisk/features.h"
#include "asterisk/utils.h"
#include "asterisk/causes.h"
#include "asterisk/localtime.h"
#include "asterisk/dnsmgr.h"
#include "asterisk/devicestate.h"
#include "asterisk/stringfields.h"
#include "asterisk/linkedlists.h"
#include "asterisk/astobj2.h"
#include "asterisk/timing.h"
#include "asterisk/taskprocessor.h"
#include "asterisk/test.h"
#include "asterisk/security_events.h"
#include "asterisk/stasis_endpoints.h"
#include "asterisk/bridge.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_system.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/format_cache.h"
#include "asterisk/format_compatibility.h"
#include "asterisk/format_cap.h"
#include "iax2/include/iax2.h"
#include "iax2/include/firmware.h"
#include "iax2/include/parser.h"
#include "iax2/include/provision.h"
#include "iax2/include/codec_pref.h"
#include "iax2/include/format_compatibility.h"
#include "iax2/include/netsock.h"
#include "jitterbuf.h"
Go to the source code of this file.
Data Structures | |
struct | active_list |
struct | addr_range |
struct | call_number_pool |
struct | chan_iax2_pvt |
struct | create_addr_info |
struct | dpcache |
struct | dpreq_data |
struct | dynamic_list |
struct | iax2_context |
struct | iax2_dpcache |
struct | iax2_peer |
struct | iax2_pkt_buf |
struct | iax2_registry |
struct | iax2_thread |
struct | iax2_trunk_peer |
struct | iax2_user |
struct | iax_rr |
struct | idle_list |
struct | parsed_dial_string |
struct | peercnt |
struct | registrations |
struct | show_peers_context |
struct | chan_iax2_pvt::signaling_queue |
struct | signaling_queue_entry |
struct | tpeers |
Macros | |
#define | ACN_FORMAT1 "%-24.25s %4u %4d %4d %5d %3d %5d %4d %6d %4d %4d %5d %3d %5d %4d %6d %s%s %4s%s\n" |
#define | ACN_FORMAT2 "%s %u %d %d %d %d %d %d %d %d %d %d %d %d %d %d %s%s %s%s\n" |
#define | AUTH_METHOD_NAMES_BUFSIZE 19 |
#define | CALLNO_ENTRY_GET_CALLNO(a) ((a) & 0x7FFF) |
#define | CALLNO_ENTRY_IS_VALIDATED(a) ((a) & 0x8000) |
#define | CALLNO_ENTRY_SET_VALIDATED(a) ((a) |= 0x8000) |
#define | CALLNO_ENTRY_TO_PTR(a) ((void *)(unsigned long)(a)) |
#define | CALLNO_TO_PTR(a) ((void *)(unsigned long)(a)) |
#define | CALLTOKEN_HASH_FORMAT "%s%u%d" /* address + port + ts + randomcalldata */ |
#define | CALLTOKEN_IE_FORMAT "%u?%s" /* time + ? + (40 char hash) */ |
#define | DEBUG_SCHED_MULTITHREAD |
#define | DEBUG_SUPPORT |
#define | DEFAULT_CONTEXT "default" |
#define | DEFAULT_DROP 3 |
#define | DEFAULT_FREQ_NOTOK 10 * 1000 /* How often to check, if the host is down... */ |
#define | DEFAULT_FREQ_OK 60 * 1000 /* How often to check for the host to be up */ |
#define | DEFAULT_MAX_THREAD_COUNT 100 |
#define | DEFAULT_MAXMS 2000 /* Must be faster than 2 seconds by default */ |
#define | DEFAULT_RETRY_TIME 1000 |
#define | DEFAULT_THREAD_COUNT 10 |
#define | DEFAULT_TRUNKDATA 640 * 10 |
#define | FORMAT "%-15.15s %-20.20s %-15.15s %-15.15s %-5.5s %-5.10s\n" |
#define | FORMAT "%-45.45s %-6.6s %-10.10s %-45.45s %8d %s\n" |
#define | FORMAT "%-20.20s %-40.40s %-10.10s %5.5d/%5.5d %5.5d/%5.5d %-5.5dms %-4.4dms %-4.4dms %-6.6s %s%s %3s%s\n" |
#define | FORMAT2 "%-15.15s %-20.20s %-15.15d %-15.15s %-5.5s %-5.10s\n" |
#define | FORMAT2 "%-45.45s %-6.6s %-10.10s %-45.45s %8.8s %s\n" |
#define | FORMAT2 "%-20.20s %-40.40s %-10.10s %-11.11s %-11.11s %-7.7s %-6.6s %-6.6s %s %s %9s\n" |
#define | FORMATB "%-20.20s %-40.40s %-10.10s %5.5d/%5.5d %5.5d/%5.5d [Native Bridged to ID=%5.5d]\n" |
#define | GAMMA (0.01) |
#define | IAX2_TRUNK_PREFACE (sizeof(struct iax_frame) + sizeof(struct ast_iax2_meta_hdr) + sizeof(struct ast_iax2_meta_trunk_hdr)) |
#define | IAX_ALLOWFWDOWNLOAD (uint64_t)(1LLU << 26) |
#define | IAX_ALREADYGONE (uint64_t)(1LLU << 9) |
#define | IAX_CALLENCRYPTED(pvt) (ast_test_flag64(pvt, IAX_ENCRYPTED) && ast_test_flag64(pvt, IAX_KEYPOPULATED)) |
#define | IAX_CAPABILITY_FULLBANDWIDTH 0xFFFF |
#define | IAX_CAPABILITY_LOWBANDWIDTH |
#define | IAX_CAPABILITY_LOWFREE |
#define | IAX_CAPABILITY_MEDBANDWIDTH |
#define | IAX_CODEC_NOCAP (uint64_t)(1LLU << 16) |
#define | IAX_CODEC_NOPREFS (uint64_t)(1LLU << 15) |
#define | IAX_CODEC_USER_FIRST (uint64_t)(1LLU << 14) |
#define | IAX_DEBUGDIGEST(msg, key) |
#define | IAX_DELAYPBXSTART (uint64_t)(1LLU << 25) |
#define | IAX_DELME (uint64_t)(1LLU << 1) |
#define | IAX_DYNAMIC (uint64_t)(1LLU << 6) |
#define | IAX_ENCRYPTED (uint64_t)(1LLU << 12) |
#define | IAX_FORCE_ENCRYPT (uint64_t)(1LLU << 30) |
#define | IAX_HASCALLERID (uint64_t)(1LLU << 0) |
#define | IAX_IMMEDIATE (uint64_t)(1LLU << 27) |
#define | IAX_KEYPOPULATED (uint64_t)(1LLU << 13) |
#define | IAX_MAXAUTHREQ (uint64_t)(1LLU << 24) |
#define | IAX_NOTRANSFER (uint64_t)(1LLU << 4) |
#define | IAX_PROVISION (uint64_t)(1LLU << 10) |
#define | IAX_QUELCH (uint64_t)(1LLU << 11) |
#define | IAX_RECVCONNECTEDLINE (uint64_t)(1LLU << 29) |
#define | IAX_RTAUTOCLEAR (uint64_t)(1LLU << 19) |
#define | IAX_RTCACHEFRIENDS (uint64_t)(1LLU << 17) |
#define | IAX_RTIGNOREREGEXPIRE (uint64_t)(1LLU << 21) |
#define | IAX_RTSAVE_SYSNAME (uint64_t)(1LLU << 8) |
#define | IAX_RTUPDATE (uint64_t)(1LLU << 18) |
#define | IAX_SENDANI (uint64_t)(1LLU << 7) |
#define | IAX_SENDCONNECTEDLINE (uint64_t)(1LLU << 28) |
#define | IAX_SHRINKCALLERID (uint64_t)(1LLU << 31) |
#define | IAX_TEMPONLY (uint64_t)(1LLU << 2) |
#define | IAX_TRANSFERMEDIA (uint64_t)(1LLU << 23) |
#define | IAX_TRUNK (uint64_t)(1LLU << 3) |
#define | IAX_TRUNKTIMESTAMPS (uint64_t)(1LLU << 22) |
#define | IAX_USEJITTERBUF (uint64_t)(1LLU << 5) |
#define | MARK_IAX_SUBCLASS_TX 0x8000 |
#define | MAX_JITTER_BUFFER 50 |
#define | MAX_PEER_BUCKETS 563 |
#define | MAX_RETRY_TIME 10000 |
#define | MAX_TIMESTAMP_SKEW 160 |
#define | MAX_TRUNK_MTU 1240 |
Maximum transmission unit for the UDP packet in the trunk not to be fragmented. This is based on 1516 - ethernet - ip - udp - iax minus one g711 frame = 1240. More... | |
#define | MAX_TRUNKDATA 640 * 200 |
#define | MAX_USER_BUCKETS MAX_PEER_BUCKETS |
#define | MEMORY_SIZE 100 |
#define | MIN_JITTER_BUFFER 10 |
#define | MIN_RETRY_TIME 100 |
#define | MIN_REUSE_TIME 60 /* Don't reuse a call number within 60 seconds */ |
#define | PEERS_FORMAT "%-15.15s %-40.40s %s %-40.40s %-6s%s %s %-11s %-32.32s\n" |
#define | PEERS_FORMAT2 "%-15.15s %-40.40s %s %-40.40s %-9s %s %-11s %-32.32s\n" |
#define | PTR_TO_CALLNO(a) ((unsigned short)(unsigned long)(a)) |
#define | PTR_TO_CALLNO_ENTRY(a) ((uint16_t)(unsigned long)(a)) |
#define | SCHED_MULTITHREADED |
#define | schedule_action(func, data) __schedule_action(func, data, __PRETTY_FUNCTION__) |
#define | TRUNK_CALL_START (IAX_MAX_CALLS / 2) |
#define | TS_GAP_FOR_JB_RESYNC 5000 |
Typedefs | |
typedef uint16_t | callno_entry |
Functions | |
static void | __attempt_transmit (const void *data) |
static void | __auth_reject (const void *nothing) |
static void | __auto_congest (const void *nothing) |
static void | __auto_hangup (const void *nothing) |
static int | __do_deliver (void *data) |
static void | __expire_registry (const void *data) |
static int | __find_callno (unsigned short callno, unsigned short dcallno, struct ast_sockaddr *addr, int new, int sockfd, int return_locked, int check_dcallno) |
static void | __get_from_jb (const void *p) |
static void | __iax2_do_register_s (const void *data) |
static void | __iax2_poke_noanswer (const void *data) |
static void | __iax2_poke_peer_s (const void *data) |
static int | __iax2_show_peers (int fd, int *total, struct mansession *s, const int argc, const char *const argv[]) |
static void | __reg_module (void) |
static int | __schedule_action (void(*func)(const void *data), const void *data, const char *funcname) |
static int | __send_command (struct chan_iax2_pvt *i, char type, int command, unsigned int ts, const unsigned char *data, int datalen, int seqno, int now, int transfer, int final) |
static void | __send_lagrq (const void *data) |
static void | __send_ping (const void *data) |
static int | __unload_module (void) |
static void | __unreg_module (void) |
static void | _iax2_show_peers_one (int fd, struct mansession *s, struct show_peers_context *cont, struct iax2_peer *peer) |
static int | acf_channel_read (struct ast_channel *chan, const char *funcname, char *preparse, char *buf, size_t buflen) |
static int | acf_iaxvar_read (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | acf_iaxvar_write (struct ast_channel *chan, const char *cmd, char *data, const char *value) |
static void | acl_change_stasis_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | acl_change_stasis_subscribe (void) |
static void | acl_change_stasis_unsubscribe (void) |
static int | add_calltoken_ignore (const char *addr) |
static void | add_empty_calltoken_ie (struct chan_iax2_pvt *pvt, struct iax_ie_data *ied) |
static int | addr_range_cmp_cb (void *obj, void *arg, int flags) |
static int | addr_range_delme_cb (void *obj, void *arg, int flags) |
static int | addr_range_hash_cb (const void *obj, const int flags) |
static int | addr_range_match_address_cb (void *obj, void *arg, int flags) |
static int | apply_context (struct iax2_context *con, const char *context) |
static int | ast_cli_netstats (struct mansession *s, int fd, int limit_fmt) |
static struct ast_channel * | ast_iax2_new (int callno, int state, iax2_format capability, struct iax2_codec_pref *prefs, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, unsigned int cachable) |
Create new call, interface with the PBX core. More... | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | attempt_transmit (const void *data) |
static int | auth_fail (int callno, int failcode) |
static char * | auth_method_names (int authmethods, char *restrict buf) |
Get names of all auth methods. More... | |
static int | auth_reject (const void *data) |
static int | authenticate (const char *challenge, const char *secret, const char *keyn, int authmethods, struct iax_ie_data *ied, struct ast_sockaddr *addr, struct chan_iax2_pvt *pvt) |
static int | authenticate_reply (struct chan_iax2_pvt *p, struct ast_sockaddr *addr, struct iax_ies *ies, const char *override, const char *okey) |
static int | authenticate_request (int call_num) |
static int | authenticate_verify (struct chan_iax2_pvt *p, struct iax_ies *ies) |
static int | auto_congest (const void *data) |
static int | auto_hangup (const void *data) |
static void | build_callno_limits (struct ast_variable *v) |
static struct iax2_context * | build_context (const char *context) |
static void | build_ecx_key (const unsigned char *digest, struct chan_iax2_pvt *pvt) |
static void | build_encryption_keys (const unsigned char *digest, struct chan_iax2_pvt *pvt) |
static struct iax2_peer * | build_peer (const char *name, struct ast_variable *v, struct ast_variable *alt, int temponly) |
Create peer structure based on configuration. More... | |
static void | build_rand_pad (unsigned char *buf, ssize_t len) |
static struct iax2_user * | build_user (const char *name, struct ast_variable *v, struct ast_variable *alt, int temponly) |
Create in-memory user structure from configuration. More... | |
static int | cache_get_callno_locked (const char *data) |
static unsigned int | calc_rxstamp (struct chan_iax2_pvt *p, unsigned int offset) |
static unsigned int | calc_timestamp (struct chan_iax2_pvt *p, unsigned int ts, struct ast_frame *f) |
static unsigned int | calc_txpeerstamp (struct iax2_trunk_peer *tpeer, int sampms, struct timeval *now) |
static int | calltoken_required (struct ast_sockaddr *addr, const char *name, int subclass) |
static int | check_access (int callno, struct ast_sockaddr *addr, struct iax_ies *ies) |
static int | check_provisioning (struct ast_sockaddr *addr, int sockfd, char *si, unsigned int ver) |
static int | check_srcaddr (struct ast_sockaddr *addr) |
Check if address can be used as packet source. More... | |
static void | cleanup_thread_list (void *head) |
static struct ast_format * | codec_choose_from_prefs (struct iax2_codec_pref *pref, struct ast_format_cap *cap) |
static int | complete_dpreply (struct chan_iax2_pvt *pvt, struct iax_ies *ies) |
static char * | complete_iax2_peers (const char *line, const char *word, int pos, int state, uint64_t flags) |
static char * | complete_iax2_unregister (const char *line, const char *word, int pos, int state) |
static int | complete_transfer (int callno, struct iax_ies *ies) |
static unsigned char | compress_subclass (iax2_format subclass) |
static void | construct_rr (struct chan_iax2_pvt *pvt, struct iax_ie_data *iep) |
static int | create_addr (const char *peername, struct ast_channel *c, struct ast_sockaddr *addr, struct create_addr_info *cai) |
static int | create_callno_pools (void) |
static int | decode_frame (ast_aes_decrypt_key *dcx, struct ast_iax2_full_hdr *fh, struct ast_frame *f, int *datalen) |
static int | decrypt_frame (int callno, struct ast_iax2_full_hdr *fh, struct ast_frame *f, int *datalen) |
static void | defer_full_frame (struct iax2_thread *from_here, struct iax2_thread *to_here) |
Queue the last read full frame for processing by a certain thread. More... | |
static void | delete_users (void) |
static void | dp_lookup (int callno, const char *context, const char *callednum, const char *callerid, int skiplock) |
static void * | dp_lookup_thread (void *data) |
static void | encmethods_to_str (int e, struct ast_str **buf) |
static int | encrypt_frame (ast_aes_encrypt_key *ecx, struct ast_iax2_full_hdr *fh, unsigned char *poo, int *datalen) |
static int | expire_registry (const void *data) |
static struct iax2_dpcache * | find_cache (struct ast_channel *chan, const char *data, const char *context, const char *exten, int priority) |
static int | find_callno (unsigned short callno, unsigned short dcallno, struct ast_sockaddr *addr, int new, int sockfd, int full_frame) |
static int | find_callno_locked (unsigned short callno, unsigned short dcallno, struct ast_sockaddr *addr, int new, int sockfd, int full_frame) |
static struct iax2_thread * | find_idle_thread (void) |
static struct iax2_peer * | find_peer (const char *name, int realtime) |
static struct iax2_trunk_peer * | find_tpeer (struct ast_sockaddr *addr, int fd) |
static struct iax2_user * | find_user (const char *name) |
static int | firmware_show_callback (struct ast_iax2_firmware_header *header, void *user_data) |
static unsigned int | fix_peerts (struct timeval *rxtrunktime, int callno, unsigned int ts) |
static void | free_context (struct iax2_context *con) |
static void | free_signaling_queue_entry (struct signaling_queue_entry *s) |
static int | function_iaxpeer (struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) |
static int | get_auth_methods (const char *value) |
static int | get_encrypt_methods (const char *s) |
static int | get_from_jb (const void *p) |
static int | get_unused_callno (enum callno_type type, int validated, callno_entry *entry) |
static int | handle_call_token (struct ast_iax2_full_hdr *fh, struct iax_ies *ies, struct ast_sockaddr *addr, int fd) |
static char * | handle_cli_iax2_provision (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_prune_realtime (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_reload (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_set_debug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_set_debug_jb (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_set_debug_trunk (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_set_mtu (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Set trunk MTU from CLI. More... | |
static char * | handle_cli_iax2_show_cache (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_show_callno_limits (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_show_channels (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_show_firmware (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_show_netstats (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_show_peer (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
Show one peer in detail. More... | |
static char * | handle_cli_iax2_show_peers (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_show_registry (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_show_stats (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_show_threads (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_show_users (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_test_losspct (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_iax2_unregister (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static void | handle_deferred_full_frames (struct iax2_thread *thread) |
Handle any deferred full frames for this thread. More... | |
static int | handle_error (void) |
static int | iax2_ack_registry (struct iax_ies *ies, struct ast_sockaddr *addr, int callno) |
Acknowledgment received for OUR registration. More... | |
static int attribute_pure | iax2_allow_new (int frametype, int subclass, int inbound) |
static int | iax2_answer (struct ast_channel *c) |
static int | iax2_append_register (const char *hostname, const char *username, const char *secret, const char *porta) |
static int | iax2_call (struct ast_channel *c, const char *dest, int timeout) |
static int | iax2_canmatch (struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
part of the IAX2 dial plan switch interface More... | |
static iax2_format | iax2_codec_choose (struct iax2_codec_pref *pref, iax2_format formats) |
static unsigned int | iax2_datetime (const char *tz) |
static int | iax2_delete_from_sched (const void *data) |
static void | iax2_destroy (int callno) |
static void | iax2_destroy_helper (struct chan_iax2_pvt *pvt) |
static int | iax2_devicestate (const char *data) |
Part of the device state notification system —. More... | |
static int | iax2_digit_begin (struct ast_channel *c, char digit) |
static int | iax2_digit_end (struct ast_channel *c, char digit, unsigned int duration) |
static int | iax2_do_register (struct iax2_registry *reg) |
static int | iax2_do_register_s (const void *data) |
static void | iax2_dprequest (struct iax2_dpcache *dp, int callno) |
static void * | iax2_dup_variable_datastore (void *) |
static int | iax2_exec (struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
Execute IAX2 dialplan switch. More... | |
static int | iax2_exists (struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
Part of the IAX2 switch interface. More... | |
static int | iax2_fixup (struct ast_channel *oldchannel, struct ast_channel *newchan) |
static void | iax2_frame_free (struct iax_frame *fr) |
static void | iax2_free_variable_datastore (void *) |
const char * | iax2_getformatname (iax2_format format) |
iax2 wrapper function for ast_getformatname More... | |
static const char * | iax2_getformatname_multiple (iax2_format format, struct ast_str **codec_buf) |
static int | iax2_getpeername (struct ast_sockaddr addr, char *host, int len) |
static int | iax2_getpeertrunk (struct ast_sockaddr addr) |
static int | iax2_hangup (struct ast_channel *c) |
static int | iax2_indicate (struct ast_channel *c, int condition, const void *data, size_t datalen) |
static int | iax2_is_control_frame_allowed (int subtype) |
static int | iax2_key_rotate (const void *vpvt) |
static int | iax2_lock_callno_unless_destroyed (int callno) |
Acquire the iaxsl[callno] if call exists and not having ongoing hangup. More... | |
static void | iax2_lock_owner (int callno) |
static int | iax2_matchmore (struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
Part of the IAX2 Switch interface. More... | |
static int | iax2_parse_allow_disallow (struct iax2_codec_pref *pref, iax2_format *formats, const char *list, int allowing) |
static int | iax2_poke_noanswer (const void *data) |
static int | iax2_poke_peer (struct iax2_peer *peer, int heldcall) |
static int | iax2_poke_peer_cb (void *obj, void *arg, int flags) |
static int | iax2_poke_peer_s (const void *data) |
static int | iax2_predestroy (int callno) |
static void * | iax2_process_thread (void *data) |
static void | iax2_process_thread_cleanup (void *data) |
static int | iax2_prov_app (struct ast_channel *chan, const char *data) |
static int | iax2_provision (struct ast_sockaddr *end, int sockfd, const char *dest, const char *template, int force) |
static void | iax2_publish_registry (const char *username, const char *domain, const char *status, const char *cause) |
static int | iax2_queryoption (struct ast_channel *c, int option, void *data, int *datalen) |
static int | iax2_queue_frame (int callno, struct ast_frame *f) |
Queue a frame to a call's owning asterisk channel. More... | |
static int | iax2_queue_hangup (int callno) |
Queue a hangup frame on the ast_channel owner. More... | |
static int | iax2_queue_hold (int callno, const char *musicclass) |
Queue a hold frame on the ast_channel owner. More... | |
static int | iax2_queue_unhold (int callno) |
Queue an unhold frame on the ast_channel owner. More... | |
static struct ast_frame * | iax2_read (struct ast_channel *c) |
static int | iax2_register (const char *value, int lineno) |
static struct ast_channel * | iax2_request (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause) |
static int | iax2_sched_add (struct ast_sched_context *sched, int when, ast_sched_cb callback, const void *data) |
static int | iax2_sched_replace (int id, struct ast_sched_context *con, int when, ast_sched_cb callback, const void *data) |
static int | iax2_send (struct chan_iax2_pvt *pvt, struct ast_frame *f, unsigned int ts, int seqno, int now, int transfer, int final) |
static int | iax2_sendhtml (struct ast_channel *c, int subclass, const char *data, int datalen) |
static int | iax2_sendimage (struct ast_channel *c, struct ast_frame *img) |
static int | iax2_sendtext (struct ast_channel *c, const char *text) |
static int | iax2_setoption (struct ast_channel *c, int option, void *data, int datalen) |
static int | iax2_transfer (struct ast_channel *c, const char *dest) |
static int | iax2_transmit (struct iax_frame *fr) |
static int | iax2_trunk_expired (struct iax2_trunk_peer *tpeer, struct timeval *now) |
static int | iax2_trunk_queue (struct chan_iax2_pvt *pvt, struct iax_frame *fr) |
static int | iax2_vnak (int callno) |
static int | iax2_write (struct ast_channel *c, struct ast_frame *f) |
static void | iax_debug_output (const char *data) |
static void | iax_error_output (const char *data) |
static void | iax_outputframe (struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, struct ast_sockaddr *addr, int datalen) |
static ast_callid | iax_pvt_callid_get (int callno) |
static void | iax_pvt_callid_new (int callno) |
static void | iax_pvt_callid_set (int callno, ast_callid callid) |
static struct iax_frame * | iaxfrdup2 (struct iax_frame *fr) |
static void | insert_idle_thread (struct iax2_thread *thread) |
static int | invalid_key (ast_aes_decrypt_key *ecx) |
static void | jb_debug_output (const char *fmt,...) |
static void | jb_error_output (const char *fmt,...) |
static void | jb_warning_output (const char *fmt,...) |
static int | load_module (void) |
Load the module. More... | |
static int | load_objects (void) |
static void | log_jitterstats (unsigned short callno) |
static int | make_trunk (unsigned short callno, int locked) |
static int | manager_iax2_show_netstats (struct mansession *s, const struct message *m) |
static int | manager_iax2_show_peer_list (struct mansession *s, const struct message *m) |
callback to display iax peers in manager format More... | |
static int | manager_iax2_show_peers (struct mansession *s, const struct message *m) |
callback to display iax peers in manager More... | |
static int | manager_iax2_show_registry (struct mansession *s, const struct message *m) |
static int | match (struct ast_sockaddr *addr, unsigned short callno, unsigned short dcallno, const struct chan_iax2_pvt *cur, int check_dcallno) |
static void | memcpy_decrypt (unsigned char *dst, const unsigned char *src, int len, ast_aes_decrypt_key *dcx) |
static void | memcpy_encrypt (unsigned char *dst, const unsigned char *src, int len, ast_aes_encrypt_key *ecx) |
static void | merge_encryption (struct chan_iax2_pvt *p, unsigned int enc) |
static int | network_change_sched_cb (const void *data) |
static void | network_change_stasis_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | network_change_stasis_subscribe (void) |
static void | network_change_stasis_unsubscribe (void) |
static void * | network_thread (void *ignore) |
static struct chan_iax2_pvt * | new_iax (struct ast_sockaddr *addr, const char *host) |
static void | parse_dial_string (char *data, struct parsed_dial_string *pds) |
Parses an IAX dial string into its component parts. More... | |
static int | peer_cmp_cb (void *obj, void *arg, int flags) |
static int | peer_delme_cb (void *obj, void *arg, int flags) |
static void | peer_destructor (void *obj) |
static int | peer_hash_cb (const void *obj, const int flags) |
static struct iax2_peer * | peer_ref (struct iax2_peer *peer) |
static int | peer_set_sock_cb (void *obj, void *arg, int flags) |
static int | peer_set_srcaddr (struct iax2_peer *peer, const char *srcaddr) |
Parse the "sourceaddress" value, lookup in netsock list and set peer's sockfd. Defaults to defaultsockfd if not found. More... | |
static int | peer_status (struct iax2_peer *peer, char *status, int statuslen) |
peer_status: Report Peer status in character string More... | |
static struct iax2_peer * | peer_unref (struct iax2_peer *peer) |
static int | peercnt_add (struct ast_sockaddr *addr) |
static int | peercnt_cmp_cb (void *obj, void *arg, int flags) |
static int | peercnt_hash_cb (const void *obj, const int flags) |
static void | peercnt_modify (unsigned char reg, uint16_t limit, struct ast_sockaddr *sockaddr) |
static void | peercnt_remove (struct peercnt *peercnt) |
static int | peercnt_remove_by_addr (struct ast_sockaddr *addr) |
static int | peercnt_remove_cb (const void *obj) |
static void | poke_all_peers (void) |
static int | prune_addr_range_cb (void *obj, void *arg, int flags) |
static void | prune_peers (void) |
static void | prune_users (void) |
static int | pvt_cmp_cb (void *obj, void *arg, int flags) |
static void | pvt_destructor (void *obj) |
static int | pvt_hash_cb (const void *obj, const int flags) |
static int | queue_signalling (struct chan_iax2_pvt *pvt, struct ast_frame *f) |
All frames other than that of type AST_FRAME_IAX must be held until we have received a destination call number. More... | |
static int | raw_hangup (struct ast_sockaddr *addr, unsigned short src, unsigned short dst, int sockfd) |
static struct iax2_peer * | realtime_peer (const char *peername, struct ast_sockaddr *addr) |
static void | realtime_update_peer (const char *peername, struct ast_sockaddr *sockaddr, time_t regtime) |
static struct iax2_user * | realtime_user (const char *username, struct ast_sockaddr *addr) |
static void | reg_source_db (struct iax2_peer *p) |
static void | register_peer_exten (struct iax2_peer *peer, int onoff) |
static int | register_verify (int callno, struct ast_sockaddr *addr, struct iax_ies *ies) |
Verify inbound registration. More... | |
static int | registry_authrequest (int callno) |
static int | registry_rerequest (struct iax_ies *ies, int callno, struct ast_sockaddr *addr) |
static char * | regstate2str (int regstate) |
static int | reload (void) |
static int | reload_config (int forced_reload) |
static void | remove_by_peercallno (struct chan_iax2_pvt *pvt) |
static void | remove_by_transfercallno (struct chan_iax2_pvt *pvt) |
static int | replace_callno (const void *obj) |
static void | requirecalltoken_mark_auto (const char *name, int subclass) |
static void | resend_with_token (int callno, struct iax_frame *f, const char *newtoken) |
static void | save_osptoken (struct iax_frame *fr, struct iax_ies *ies) |
static void | save_rr (struct iax_frame *fr, struct iax_ies *ies) |
static void | sched_delay_remove (struct ast_sockaddr *addr, callno_entry entry) |
static int | schedule_delivery (struct iax_frame *fr, int updatehistory, int fromtrunk, unsigned int *tsout) |
static int | scheduled_destroy (const void *vid) |
static int | send_apathetic_reply (unsigned short callno, unsigned short dcallno, struct ast_sockaddr *addr, int command, int ts, unsigned char seqno, int sockfd, struct iax_ie_data *ied) |
static int | send_command (struct chan_iax2_pvt *, char, int, unsigned int, const unsigned char *, int, int) |
static int | send_command_final (struct chan_iax2_pvt *, char, int, unsigned int, const unsigned char *, int, int) |
static int | send_command_immediate (struct chan_iax2_pvt *, char, int, unsigned int, const unsigned char *, int, int) |
static int | send_command_locked (unsigned short callno, char, int, unsigned int, const unsigned char *, int, int) |
static int | send_command_transfer (struct chan_iax2_pvt *, char, int, unsigned int, const unsigned char *, int) |
static int | send_lagrq (const void *data) |
static int | send_packet (struct iax_frame *f) |
static int | send_ping (const void *data) |
static void | send_signaling (struct chan_iax2_pvt *pvt) |
This function must be called once we are sure the other side has given us a call number. All signaling is held here until that point. More... | |
static int | send_trunk (struct iax2_trunk_peer *tpeer, struct timeval *now) |
static int | set_config (const char *config_file, int reload, int forced) |
Load configuration. More... | |
static void | set_config_destroy (void) |
static void | set_hangup_source_and_cause (int callno, unsigned char causecode) |
static void | set_peercnt_limit (struct peercnt *peercnt) |
static int | set_peercnt_limit_all_cb (void *obj, void *arg, int flags) |
static void | signal_condition (ast_mutex_t *lock, ast_cond_t *cond) |
static int | socket_process (struct iax2_thread *thread) |
static int | socket_process_helper (struct iax2_thread *thread) |
static int | socket_process_meta (int packet_len, struct ast_iax2_meta_hdr *meta, struct ast_sockaddr *addr, int sockfd, struct iax_frame *fr) |
static int | socket_read (int *id, int fd, short events, void *cbdata) |
static void | spawn_dp_lookup (int callno, const char *context, const char *callednum, const char *callerid) |
static int | start_network_thread (void) |
static void | stop_stuff (int callno) |
static void | store_by_peercallno (struct chan_iax2_pvt *pvt) |
static void | store_by_transfercallno (struct chan_iax2_pvt *pvt) |
static int | timing_read (int *id, int fd, short events, void *cbdata) |
static int | transfercallno_pvt_cmp_cb (void *obj, void *arg, int flags) |
static int | transfercallno_pvt_hash_cb (const void *obj, const int flags) |
static int | transmit_frame (void *data) |
static int | transmit_trunk (struct iax_frame *f, struct ast_sockaddr *addr, int sockfd) |
static int | try_transfer (struct chan_iax2_pvt *pvt, struct iax_ies *ies) |
static iax2_format | uncompress_subclass (unsigned char csub) |
static void | unlink_peer (struct iax2_peer *peer) |
static int | unload_module (void) |
static void | unwrap_timestamp (struct iax_frame *fr) |
static void | update_jbsched (struct chan_iax2_pvt *pvt) |
static int | update_packet (struct iax_frame *f) |
static int | update_registry (struct ast_sockaddr *addr, int callno, char *devtype, int fd, unsigned short refresh) |
static int | user_cmp_cb (void *obj, void *arg, int flags) |
static int | user_delme_cb (void *obj, void *arg, int flags) |
static void | user_destructor (void *obj) |
static int | user_hash_cb (const void *obj, const int flags) |
static struct iax2_user * | user_unref (struct iax2_user *user) |
static void | vnak_retransmit (int callno, int last) |
static int | wait_for_peercallno (struct chan_iax2_pvt *pvt) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Inter Asterisk eXchange (Ver 2)" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, .requires = "dnsmgr", .optional_modules = "res_crypto", } |
static char | accountcode [AST_MAX_ACCOUNT_CODE] |
static struct stasis_subscription * | acl_change_sub |
static struct active_list | active_list = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static int | adsi = 0 |
static int | amaflags = 0 |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static const char * | auth_method_labels [] |
Name of effective auth method. More... | |
static int | authdebug = 0 |
static int | autokill = 0 |
static struct ao2_container * | callno_limits |
static struct call_number_pool | callno_pool |
static ast_mutex_t | callno_pool_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static struct call_number_pool | callno_pool_trunk |
static struct ao2_container * | calltoken_ignores |
static struct ast_cli_entry | cli_iax2 [] |
static struct ast_sockaddr | debugaddr |
static uint16_t | DEFAULT_MAXCALLNO_LIMIT = 2048 |
static uint16_t | DEFAULT_MAXCALLNO_LIMIT_NONVAL = 8192 |
static char | default_parkinglot [AST_MAX_CONTEXT] |
static int | defaultsockfd = -1 |
static int | delayreject = 0 |
static struct dpcache | dpcache = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static struct dynamic_list | dynamic_list = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
struct { | |
struct iax_frame * first | |
struct iax_frame * last | |
} | frame_queue [IAX_MAX_CALLS] |
a list of frames that may need to be retransmitted More... | |
static int | global_max_trunk_mtu |
static uint16_t | global_maxcallno |
static uint16_t | global_maxcallno_nonval |
static int | global_rtautoclear = 120 |
static struct ast_flags64 | globalflags = { 0 } |
static int | iax2_authmethods = 0 |
static iax2_format | iax2_capability = IAX_CAPABILITY_FULLBANDWIDTH |
static int | iax2_encryption = 0 |
static int(* | iax2_regfunk )(const char *username, int onoff) = NULL |
static struct ast_switch | iax2_switch |
static struct ast_channel_tech | iax2_tech |
static const struct ast_datastore_info | iax2_variable_datastore_info |
static struct ao2_container * | iax_peercallno_pvts |
Another container of iax2_pvt structures. More... | |
static struct ao2_container * | iax_transfercallno_pvts |
Another container of iax2_pvt structures. More... | |
static int | iaxactivethreadcount = 0 |
static int | iaxcompat = 0 |
static int | iaxdebug = 0 |
static int | iaxdefaultdpcache =10 * 60 |
static int | iaxdefaulttimeout = 5 |
static int | iaxdynamicthreadcount = 0 |
static int | iaxdynamicthreadnum = 0 |
static int | iaxmaxthreadcount = DEFAULT_MAX_THREAD_COUNT |
static struct ast_custom_function | iaxpeer_function |
static struct chan_iax2_pvt * | iaxs [IAX_MAX_CALLS] |
an array of iax2 pvt structures More... | |
static ast_mutex_t | iaxsl [ARRAY_LEN(iaxs)] |
chan_iax2_pvt structure locks More... | |
static int | iaxthreadcount = DEFAULT_THREAD_COUNT |
static int | iaxtrunkdebug = 0 |
static struct ast_custom_function | iaxvar_function |
static struct idle_list | idle_list = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static struct io_context * | io |
static int | jittertargetextra = 40 |
static int | lagrq_time = 10 |
static char | language [MAX_LANGUAGE] = "" |
static int | last_authmethod = 0 |
static time_t | max_calltoken_delay = 10 |
static int | max_reg_expire |
static int | max_retries = 4 |
static int | maxauthreq = 3 |
static int | maxjitterbuffer =1000 |
static int | maxjitterinterps =10 |
static int | min_reg_expire |
static char | mohinterpret [MAX_MUSICCLASS] |
static char | mohsuggest [MAX_MUSICCLASS] |
static struct ast_netsock_list * | netsock |
static pthread_t | netthreadid = AST_PTHREADT_NULL |
static int | network_change_sched_id = -1 |
static struct stasis_subscription * | network_change_sub |
static struct ast_netsock_list * | outsock |
static char * | papp = "IAX2Provision" |
static struct ao2_container * | peercnts |
static struct ao2_container * | peers |
static int | ping_time = 21 |
static struct iax2_codec_pref | prefs_global |
struct { | |
unsigned int cos | |
unsigned int tos | |
} | qos = { 0, 0 } |
static int | randomcalltokendata |
static char | regcontext [AST_MAX_CONTEXT] = "" |
static struct registrations | registrations = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static int | resyncthreshold =1000 |
static struct ast_sched_context * | sched |
static int | srvlookup = 0 |
static const char | tdesc [] = "Inter Asterisk eXchange Driver (Ver 2)" |
static int | test_losspct = 0 |
static struct ast_timer * | timer |
static uint16_t | total_nonval_callno_used = 0 |
static struct tpeers | tpeers = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static struct ast_taskprocessor * | transmit_processor |
static int | trunk_maxmtu |
static int | trunk_nmaxmtu |
static int | trunk_timed |
static int | trunk_untimed |
static int | trunkfreq = 20 |
static int | trunkmaxsize = MAX_TRUNKDATA |
static struct ao2_container * | users |
Implementation of Inter-Asterisk eXchange Version 2 as specified in RFC 5456.
Definition in file chan_iax2.c.
#define ACN_FORMAT1 "%-24.25s %4u %4d %4d %5d %3d %5d %4d %6d %4d %4d %5d %3d %5d %4d %6d %s%s %4s%s\n" |
#define AUTH_METHOD_NAMES_BUFSIZE 19 |
Definition at line 407 of file chan_iax2.c.
Definition at line 955 of file chan_iax2.c.
Definition at line 954 of file chan_iax2.c.
Definition at line 953 of file chan_iax2.c.
Definition at line 951 of file chan_iax2.c.
Definition at line 293 of file chan_iax2.c.
#define CALLTOKEN_HASH_FORMAT "%s%u%d" /* address + port + ts + randomcalldata */ |
#define CALLTOKEN_IE_FORMAT "%u?%s" /* time + ? + (40 char hash) */ |
#define DEBUG_SCHED_MULTITHREAD |
Definition at line 285 of file chan_iax2.c.
#define DEBUG_SUPPORT |
Definition at line 301 of file chan_iax2.c.
#define DEFAULT_CONTEXT "default" |
Definition at line 320 of file chan_iax2.c.
#define DEFAULT_DROP 3 |
Definition at line 299 of file chan_iax2.c.
#define DEFAULT_FREQ_NOTOK 10 * 1000 /* How often to check, if the host is down... */ |
Definition at line 396 of file chan_iax2.c.
#define DEFAULT_FREQ_OK 60 * 1000 /* How often to check for the host to be up */ |
Definition at line 395 of file chan_iax2.c.
#define DEFAULT_MAX_THREAD_COUNT 100 |
Definition at line 296 of file chan_iax2.c.
#define DEFAULT_MAXMS 2000 /* Must be faster than 2 seconds by default */ |
Definition at line 394 of file chan_iax2.c.
#define DEFAULT_RETRY_TIME 1000 |
Definition at line 297 of file chan_iax2.c.
#define DEFAULT_THREAD_COUNT 10 |
Definition at line 295 of file chan_iax2.c.
#define DEFAULT_TRUNKDATA 640 * 10 |
40ms, uncompressed linear * 10 channels
Definition at line 710 of file chan_iax2.c.
#define FORMAT "%-15.15s %-20.20s %-15.15s %-15.15s %-5.5s %-5.10s\n" |
#define FORMAT "%-45.45s %-6.6s %-10.10s %-45.45s %8d %s\n" |
#define FORMAT "%-20.20s %-40.40s %-10.10s %5.5d/%5.5d %5.5d/%5.5d %-5.5dms %-4.4dms %-4.4dms %-6.6s %s%s %3s%s\n" |
#define FORMAT2 "%-15.15s %-20.20s %-15.15d %-15.15s %-5.5s %-5.10s\n" |
#define FORMAT2 "%-45.45s %-6.6s %-10.10s %-45.45s %8.8s %s\n" |
#define FORMAT2 "%-20.20s %-40.40s %-10.10s %-11.11s %-11.11s %-7.7s %-6.6s %-6.6s %s %s %9s\n" |
#define GAMMA (0.01) |
Definition at line 306 of file chan_iax2.c.
#define IAX2_TRUNK_PREFACE (sizeof(struct iax_frame) + sizeof(struct ast_iax2_meta_hdr) + sizeof(struct ast_iax2_meta_trunk_hdr)) |
Definition at line 638 of file chan_iax2.c.
#define IAX_ALLOWFWDOWNLOAD (uint64_t)(1LLU << 26) |
Allow the FWDOWNL command?
Definition at line 523 of file chan_iax2.c.
#define IAX_ALREADYGONE (uint64_t)(1LLU << 9) |
Already disconnected
Definition at line 507 of file chan_iax2.c.
#define IAX_CALLENCRYPTED | ( | pvt | ) | (ast_test_flag64(pvt, IAX_ENCRYPTED) && ast_test_flag64(pvt, IAX_KEYPOPULATED)) |
Definition at line 440 of file chan_iax2.c.
#define IAX_CAPABILITY_FULLBANDWIDTH 0xFFFF |
Definition at line 373 of file chan_iax2.c.
#define IAX_CAPABILITY_LOWBANDWIDTH |
Definition at line 385 of file chan_iax2.c.
#define IAX_CAPABILITY_LOWFREE |
Definition at line 390 of file chan_iax2.c.
#define IAX_CAPABILITY_MEDBANDWIDTH |
Definition at line 375 of file chan_iax2.c.
#define IAX_CODEC_NOCAP (uint64_t)(1LLU << 16) |
only consider requested format and ignore capabilities
Definition at line 514 of file chan_iax2.c.
#define IAX_CODEC_NOPREFS (uint64_t)(1LLU << 15) |
Force old behaviour by turning off prefs
Definition at line 513 of file chan_iax2.c.
#define IAX_CODEC_USER_FIRST (uint64_t)(1LLU << 14) |
are we willing to let the other guy choose the codec?
Definition at line 512 of file chan_iax2.c.
#define IAX_DEBUGDIGEST | ( | msg, | |
key | |||
) |
Definition at line 443 of file chan_iax2.c.
#define IAX_DELAYPBXSTART (uint64_t)(1LLU << 25) |
Don't start a PBX on the channel until the peer sends us a response, so that we've achieved a three-way handshake with them before sending voice or anything else
Definition at line 522 of file chan_iax2.c.
#define IAX_DELME (uint64_t)(1LLU << 1) |
Needs to be deleted
Definition at line 499 of file chan_iax2.c.
#define IAX_DYNAMIC (uint64_t)(1LLU << 6) |
dynamic peer
Definition at line 504 of file chan_iax2.c.
#define IAX_ENCRYPTED (uint64_t)(1LLU << 12) |
Whether we should assume encrypted tx/rx
Definition at line 510 of file chan_iax2.c.
#define IAX_FORCE_ENCRYPT (uint64_t)(1LLU << 30) |
Forces call encryption, if encryption not possible hangup
Definition at line 527 of file chan_iax2.c.
#define IAX_HASCALLERID (uint64_t)(1LLU << 0) |
CallerID has been specified
Definition at line 498 of file chan_iax2.c.
#define IAX_IMMEDIATE (uint64_t)(1LLU << 27) |
Allow immediate off-hook to extension s
Definition at line 524 of file chan_iax2.c.
#define IAX_KEYPOPULATED (uint64_t)(1LLU << 13) |
Whether we have a key populated
Definition at line 511 of file chan_iax2.c.
#define IAX_MAXAUTHREQ (uint64_t)(1LLU << 24) |
Maximum outstanding AUTHREQ restriction is in place
Definition at line 521 of file chan_iax2.c.
#define IAX_NOTRANSFER (uint64_t)(1LLU << 4) |
Don't native bridge
Definition at line 502 of file chan_iax2.c.
#define IAX_PROVISION (uint64_t)(1LLU << 10) |
This is a provisioning request
Definition at line 508 of file chan_iax2.c.
#define IAX_QUELCH (uint64_t)(1LLU << 11) |
Whether or not we quelch audio
Definition at line 509 of file chan_iax2.c.
#define IAX_RECVCONNECTEDLINE (uint64_t)(1LLU << 29) |
Allow receiving of connected line updates
Definition at line 526 of file chan_iax2.c.
#define IAX_RTAUTOCLEAR (uint64_t)(1LLU << 19) |
erase me on expire
Definition at line 517 of file chan_iax2.c.
#define IAX_RTCACHEFRIENDS (uint64_t)(1LLU << 17) |
let realtime stay till your reload
Definition at line 515 of file chan_iax2.c.
#define IAX_RTIGNOREREGEXPIRE (uint64_t)(1LLU << 21) |
When using realtime, ignore registration expiration
Definition at line 518 of file chan_iax2.c.
#define IAX_RTSAVE_SYSNAME (uint64_t)(1LLU << 8) |
Save Systname on Realtime Updates
Definition at line 506 of file chan_iax2.c.
#define IAX_RTUPDATE (uint64_t)(1LLU << 18) |
Send a realtime update
Definition at line 516 of file chan_iax2.c.
#define IAX_SENDANI (uint64_t)(1LLU << 7) |
Send ANI along with CallerID
Definition at line 505 of file chan_iax2.c.
#define IAX_SENDCONNECTEDLINE (uint64_t)(1LLU << 28) |
Allow sending of connected line updates
Definition at line 525 of file chan_iax2.c.
#define IAX_SHRINKCALLERID (uint64_t)(1LLU << 31) |
Turn on and off caller id shrinking
Definition at line 528 of file chan_iax2.c.
#define IAX_TEMPONLY (uint64_t)(1LLU << 2) |
Temporary (realtime)
Definition at line 500 of file chan_iax2.c.
#define IAX_TRANSFERMEDIA (uint64_t)(1LLU << 23) |
When doing IAX2 transfers, transfer media only
Definition at line 520 of file chan_iax2.c.
#define IAX_TRUNK (uint64_t)(1LLU << 3) |
Treat as a trunk
Definition at line 501 of file chan_iax2.c.
#define IAX_TRUNKTIMESTAMPS (uint64_t)(1LLU << 22) |
Send trunk timestamps
Definition at line 519 of file chan_iax2.c.
#define IAX_USEJITTERBUF (uint64_t)(1LLU << 5) |
Use jitter buffer
Definition at line 503 of file chan_iax2.c.
#define MARK_IAX_SUBCLASS_TX 0x8000 |
Definition at line 718 of file chan_iax2.c.
#define MAX_JITTER_BUFFER 50 |
Definition at line 707 of file chan_iax2.c.
#define MAX_PEER_BUCKETS 563 |
This module will get much higher performance when doing a lot of user and peer lookups if the number of buckets is increased from 1. However, to maintain old behavior for Asterisk 1.4, these are set to 1 by default. When using multiple buckets, search order through these containers is considered random, so you will not be able to depend on the order the entires are specified in iax.conf for matching order.
Definition at line 998 of file chan_iax2.c.
#define MAX_RETRY_TIME 10000 |
Definition at line 705 of file chan_iax2.c.
#define MAX_TIMESTAMP_SKEW 160 |
maximum difference between actual and predicted ts for sending
Definition at line 712 of file chan_iax2.c.
#define MAX_TRUNK_MTU 1240 |
Maximum transmission unit for the UDP packet in the trunk not to be fragmented. This is based on 1516 - ethernet - ip - udp - iax minus one g711 frame = 1240.
Definition at line 315 of file chan_iax2.c.
#define MAX_TRUNKDATA 640 * 200 |
40ms, uncompressed linear * 200 channels
Definition at line 340 of file chan_iax2.c.
#define MAX_USER_BUCKETS MAX_PEER_BUCKETS |
Definition at line 1002 of file chan_iax2.c.
#define MEMORY_SIZE 100 |
Definition at line 298 of file chan_iax2.c.
#define MIN_JITTER_BUFFER 10 |
Definition at line 708 of file chan_iax2.c.
#define MIN_RETRY_TIME 100 |
Definition at line 704 of file chan_iax2.c.
Definition at line 303 of file chan_iax2.c.
#define PEERS_FORMAT "%-15.15s %-40.40s %s %-40.40s %-6s%s %s %-11s %-32.32s\n" |
Definition at line 6943 of file chan_iax2.c.
#define PEERS_FORMAT2 "%-15.15s %-40.40s %s %-40.40s %-9s %s %-11s %-32.32s\n" |
Definition at line 6942 of file chan_iax2.c.
Definition at line 292 of file chan_iax2.c.
Definition at line 950 of file chan_iax2.c.
#define SCHED_MULTITHREADED |
Definition at line 281 of file chan_iax2.c.
#define schedule_action | ( | func, | |
data | |||
) | __schedule_action(func, data, __PRETTY_FUNCTION__) |
Definition at line 1724 of file chan_iax2.c.
#define TRUNK_CALL_START (IAX_MAX_CALLS / 2) |
Definition at line 1222 of file chan_iax2.c.
#define TS_GAP_FOR_JB_RESYNC 5000 |
Definition at line 715 of file chan_iax2.c.
typedef uint16_t callno_entry |
Definition at line 740 of file chan_iax2.c.
anonymous enum |
Definition at line 1049 of file chan_iax2.c.
anonymous enum |
Enumerator | |
---|---|
NEW_PREVENT | |
NEW_ALLOW | |
NEW_FORCE | |
NEW_ALLOW_CALLTOKEN_VALIDATED |
Definition at line 2350 of file chan_iax2.c.
enum callno_type |
Enumerator | |
---|---|
CALLNO_TYPE_NORMAL | |
CALLNO_TYPE_TRUNK |
Definition at line 945 of file chan_iax2.c.
enum calltoken_peer_enum |
Call token validation settings.
Definition at line 536 of file chan_iax2.c.
enum iax2_state |
Enumerator | |
---|---|
IAX_STATE_STARTED | |
IAX_STATE_AUTHENTICATED | |
IAX_STATE_TBD |
Definition at line 486 of file chan_iax2.c.
enum iax2_thread_iostate |
Enumerator | |
---|---|
IAX_IOSTATE_IDLE | |
IAX_IOSTATE_READY | |
IAX_IOSTATE_PROCESSING | |
IAX_IOSTATE_SCHEDREADY |
Definition at line 1090 of file chan_iax2.c.
enum iax2_thread_type |
Enumerator | |
---|---|
IAX_THREAD_TYPE_POOL | |
IAX_THREAD_TYPE_DYNAMIC |
Definition at line 1097 of file chan_iax2.c.
enum iax_reg_state |
Enumerator | |
---|---|
REG_STATE_UNREGISTERED | |
REG_STATE_REGSENT | |
REG_STATE_AUTHSENT | |
REG_STATE_REGISTERED | |
REG_STATE_REJECTED | |
REG_STATE_TIMEOUT | |
REG_STATE_NOAUTH |
Definition at line 661 of file chan_iax2.c.
enum iax_transfer_state |
Enumerator | |
---|---|
TRANSFER_NONE | |
TRANSFER_BEGIN | |
TRANSFER_READY | |
TRANSFER_RELEASED | |
TRANSFER_PASSTHROUGH | |
TRANSFER_MBEGIN | |
TRANSFER_MREADY | |
TRANSFER_MRELEASED | |
TRANSFER_MPASSTHROUGH | |
TRANSFER_MEDIA | |
TRANSFER_MEDIAPASS |
Definition at line 671 of file chan_iax2.c.
|
static |
Definition at line 3595 of file chan_iax2.c.
References chan_iax2_pvt::addr, iax_frame::af, AST_CAUSE_DESTINATION_OUT_OF_ORDER, ast_channel_hangupcause_set(), ast_channel_name(), AST_CONTROL_HANGUP, AST_FRAME_CONTROL, AST_FRAME_IAX, AST_LIST_REMOVE, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_sockaddr_stringify_addr(), attempt_transmit(), iax_frame::callno, iax_frame::data, chan_iax2_pvt::error, iax_frame::final, frame_queue, ast_frame::frametype, iax2_destroy(), iax2_frame_free(), iax2_queue_frame(), iax2_sched_add(), IAX_COMMAND_TXREJ, IAX_DEFAULT_REG_EXPIRE, iaxs, iaxsl, ast_frame_subclass::integer, LOG_WARNING, max_retries, MAX_RETRY_TIME, NULL, iax_frame::oseqno, chan_iax2_pvt::owner, iax2_registry::refresh, chan_iax2_pvt::reg, REG_STATE_TIMEOUT, iax2_registry::regstate, iax_frame::retrans, iax_frame::retries, iax_frame::retrytime, send_command(), send_packet(), ast_frame::subclass, iax_frame::transfer, iax_frame::ts, update_packet(), and iax2_registry::us.
Referenced by attempt_transmit().
|
static |
Definition at line 9424 of file chan_iax2.c.
References AST_CAUSE_FACILITY_NOT_SUBSCRIBED, AST_CAUSE_FACILITY_REJECTED, AST_FRAME_IAX, ast_mutex_lock, ast_mutex_unlock, iax_ie_data::buf, IAX_COMMAND_REGREJ, IAX_COMMAND_REJECT, iax_ie_append_byte(), iax_ie_append_str(), IAX_IE_CAUSE, IAX_IE_CAUSECODE, iaxs, iaxsl, iax_ie_data::pos, and send_command_final().
Referenced by auth_reject().
|
static |
Definition at line 4782 of file chan_iax2.c.
References AST_CONTROL_CONGESTION, AST_FRAME_CONTROL, ast_log, ast_mutex_lock, ast_mutex_unlock, iax2_queue_frame(), iaxs, iaxsl, chan_iax2_pvt::initid, LOG_NOTICE, and PTR_TO_CALLNO.
Referenced by auto_congest().
|
static |
Definition at line 9473 of file chan_iax2.c.
References AST_CAUSE_NO_USER_RESPONSE, AST_FRAME_IAX, ast_mutex_lock, ast_mutex_unlock, iax_ie_data::buf, IAX_COMMAND_HANGUP, iax_ie_append_byte(), iax_ie_append_str(), IAX_IE_CAUSE, IAX_IE_CAUSECODE, iaxs, iaxsl, iax_ie_data::pos, and send_command_final().
Referenced by auto_hangup().
|
static |
Definition at line 3387 of file chan_iax2.c.
References iax_frame::af, ast_clear_flag, AST_FRFLAG_HAS_TIMING_INFO, ast_test_flag64, iax_frame::callno, iax_frame::data, iax2_frame_free(), iax2_queue_frame(), IAX_ALREADYGONE, iaxs, and iax_frame::retrans.
Referenced by __get_from_jb(), and schedule_delivery().
|
static |
Definition at line 9040 of file chan_iax2.c.
References iax2_peer::addr, ast_db_del(), ast_debug, AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_endpoint_blob_publish(), AST_ENDPOINT_OFFLINE, ast_endpoint_set_state(), ast_endpoint_state_type(), ast_json_pack(), ast_json_unref(), ast_sockaddr_setnull(), ast_test_flag64, iax2_peer::endpoint, iax2_peer::expire, iax2_peer::expiry, globalflags, iax2_regfunk, IAX_RTAUTOCLEAR, IAX_RTCACHEFRIENDS, IAX_RTUPDATE, IAX_TEMPONLY, min_reg_expire, iax2_peer::name, NULL, peer_unref(), peercnt_modify(), RAII_VAR, realtime_update_peer(), register_peer_exten(), and unlink_peer().
Referenced by expire_registry().
|
static |
Definition at line 3155 of file chan_iax2.c.
References accountcode, chan_iax2_pvt::addr, amaflags, chan_iax2_pvt::amaflags, ao2_find, ao2_ref, ast_copy_flags64, ast_debug, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_sockaddr_copy(), ast_sockaddr_stringify(), ast_string_field_set, chan_iax2_pvt::callno, chan_iax2_pvt::callno_entry, CALLNO_ENTRY_GET_CALLNO, CALLNO_ENTRY_TO_PTR, CALLNO_TYPE_NORMAL, default_parkinglot, DEFAULT_RETRY_TIME, chan_iax2_pvt::expiry, get_unused_callno(), globalflags, chan_iax2_pvt::host, iax2_getpeername(), iax2_sched_add(), IAX_FORCE_ENCRYPT, IAX_NOTRANSFER, iax_peercallno_pvts, IAX_RECVCONNECTEDLINE, IAX_SENDCONNECTEDLINE, iax_transfercallno_pvts, IAX_TRANSFERMEDIA, IAX_USEJITTERBUF, iaxdebug, iaxs, iaxsl, chan_iax2_pvt::lagid, lagrq_time, LOG_WARNING, match(), min_reg_expire, mohinterpret, mohsuggest, NEW_ALLOW, new_iax(), NULL, OBJ_POINTER, chan_iax2_pvt::parkinglot, chan_iax2_pvt::peercallno, peercnt_add(), peercnt_remove_by_addr(), ping_time, chan_iax2_pvt::pingid, chan_iax2_pvt::pingtime, replace_callno(), send_lagrq(), send_ping(), chan_iax2_pvt::sockfd, store_by_peercallno(), and chan_iax2_pvt::transfer.
Referenced by find_callno(), and find_callno_locked().
|
static |
Definition at line 4172 of file chan_iax2.c.
References __do_deliver(), ast_channel_name(), ast_format_compatibility_bitfield2format(), ast_format_get_default_ms(), ast_format_get_sample_rate(), AST_FRAME_VOICE, AST_FRIENDLY_OFFSET, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_samp2tv(), ast_test_flag64, ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), cleanup(), jb_frame::data, ast_frame::delivery, ast_frame_subclass::format, ast_frame::frametype, iax2_frame_free(), iax2_queue_frame(), IAX_ALREADYGONE, iaxs, iaxsl, chan_iax2_pvt::jb, JB_DROP, JB_EMPTY, jb_get(), JB_INTERP, jb_next(), JB_NOFRAME, JB_OK, chan_iax2_pvt::jbid, LOG_WARNING, jb_frame::ms, iax_frame::next, ast_frame::next, NULL, ast_frame::offset, chan_iax2_pvt::owner, chan_iax2_pvt::peerformat, PTR_TO_CALLNO, chan_iax2_pvt::rxcore, ast_frame::samples, ast_frame::src, ast_frame::subclass, update_jbsched(), and chan_iax2_pvt::voiceformat.
Referenced by get_from_jb().
|
static |
Definition at line 8683 of file chan_iax2.c.
References iax2_registry::addr, AST_AF_UNSPEC, ast_dnsmgr_lookup(), ast_sockaddr_isnull(), ast_sockaddr_port, ast_sockaddr_set_port, iax2_registry::dnsmgr, iax2_registry::expire, iax2_registry::hostname, iax2_do_register(), NULL, iax2_registry::port, srvlookup, and ast_sockaddr::ss.
Referenced by iax2_do_register_s().
|
static |
Definition at line 12488 of file chan_iax2.c.
References AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_endpoint_blob_publish(), AST_ENDPOINT_OFFLINE, ast_endpoint_set_state(), ast_endpoint_state_type(), ast_json_pack(), ast_json_unref(), ast_log, ast_mutex_lock, ast_mutex_unlock, iax2_peer::callno, iax2_peer::endpoint, iax2_destroy(), iax2_poke_peer_s(), iax2_sched_add(), iaxsl, iax2_peer::lastms, LOG_NOTICE, iax2_peer::name, NULL, peer_ref(), peer_unref(), iax2_peer::pokeexpire, iax2_peer::pokefreqnotok, and RAII_VAR.
Referenced by iax2_poke_noanswer().
|
static |
Definition at line 9533 of file chan_iax2.c.
References iax2_poke_peer(), and peer_unref().
Referenced by iax2_poke_peer_s().
|
static |
Definition at line 7046 of file chan_iax2.c.
References _iax2_show_peers_one(), iax2_peer::addr, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_cli(), ast_sockaddr_isnull(), show_peers_context::havepattern, iax2_peer::name, NULL, show_peers_context::offline_peers, show_peers_context::online_peers, peer_unref(), PEERS_FORMAT2, show_peers_context::regexbuf, show_peers_context::registeredonly, RESULT_SHOWUSAGE, RESULT_SUCCESS, total, show_peers_context::total_peers, and show_peers_context::unmonitored_peers.
Referenced by handle_cli_iax2_show_peers(), and manager_iax2_show_peers().
|
static |
Definition at line 15139 of file chan_iax2.c.
|
static |
Definition at line 1699 of file chan_iax2.c.
References ast_copy_string(), ast_debug, find_idle_thread(), IAX_IOSTATE_SCHEDREADY, NULL, signal_condition(), and thread.
|
static |
Definition at line 7812 of file chan_iax2.c.
References ast_frame::data, ast_frame::datalen, ast_frame::frametype, iax2_send(), ast_frame_subclass::integer, ast_frame::ptr, queue_signalling(), ast_frame::seqno, ast_frame::src, ast_frame::subclass, transfer(), ast_frame::ts, and type.
Referenced by send_command(), send_command_final(), send_command_immediate(), and send_command_transfer().
|
static |
Definition at line 1827 of file chan_iax2.c.
References ast_debug, AST_FRAME_IAX, ast_mutex_unlock, iax2_thread::callno, iax2_lock_callno_unless_destroyed(), iax2_sched_add(), IAX_COMMAND_LAGRQ, iaxs, iaxsl, chan_iax2_pvt::lagid, lagrq_time, NULL, PTR_TO_CALLNO, send_command(), and send_lagrq().
Referenced by send_lagrq().
|
static |
Definition at line 1763 of file chan_iax2.c.
References ast_debug, AST_FRAME_IAX, ast_mutex_unlock, iax2_thread::callno, iax2_lock_callno_unless_destroyed(), iax2_sched_add(), IAX_COMMAND_PING, iaxs, iaxsl, NULL, ping_time, chan_iax2_pvt::pingid, PTR_TO_CALLNO, send_command(), and send_ping().
Referenced by send_ping().
|
static |
Definition at line 14766 of file chan_iax2.c.
References acl_change_stasis_unsubscribe(), ao2_ref, ARRAY_LEN, ast_channel_unregister(), ast_cli_unregister_multiple(), ast_context_destroy_by_name(), ast_manager_unregister(), ast_mutex_destroy, ast_netsock_release(), AST_PTHREADT_NULL, ast_sched_clean_by_callback(), ast_sched_context_destroy(), ast_taskprocessor_unreference(), ast_timer_close(), ast_unload_realtime(), ast_unregister_application(), ast_unregister_switch(), callno_limits, calltoken_ignores, ast_channel_tech::capabilities, cleanup_thread_list(), cli_iax2, delete_users(), iax2_destroy(), iax2_switch, iax2_tech, iax_firmware_unload(), iax_peercallno_pvts, iax_provision_unload(), iax_transfercallno_pvts, iaxs, iaxsl, netsock, netthreadid, network_change_stasis_unsubscribe(), NULL, outsock, papp, peercnt_remove_cb(), peercnts, regcontext, timer, and transmit_processor.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 15139 of file chan_iax2.c.
|
static |
Definition at line 6945 of file chan_iax2.c.
References iax2_peer::addr, ast_cli(), ast_copy_string(), ast_sockaddr_stringify_addr(), ast_sockaddr_stringify_port(), ast_str_alloca, ast_str_buffer(), ast_strdupa, ast_strlen_zero(), ast_test_flag64, astman_append(), iax2_peer::description, iax2_peer::encmethods, encmethods_to_str(), IAX_DYNAMIC, IAX_TRUNK, show_peers_context::idtext, iax2_peer::mask, name, iax2_peer::name, show_peers_context::offline_peers, show_peers_context::online_peers, peer_status(), show_peers_context::peerlist, PEERS_FORMAT, status, show_peers_context::total_peers, show_peers_context::unmonitored_peers, and iax2_peer::username.
Referenced by __iax2_show_peers(), and manager_iax2_show_peer_list().
|
static |
Definition at line 14632 of file chan_iax2.c.
References chan_iax2_pvt::addr, args, ast_channel_tech(), ast_channel_tech_pvt(), ast_copy_string(), ast_log, ast_mutex_lock, ast_mutex_unlock, ast_sockaddr_isnull(), ast_sockaddr_stringify_addr(), buf, chan_iax2_pvt::callno, iax2_tech, IAX_CALLENCRYPTED, iaxs, iaxsl, LOG_ERROR, chan_iax2_pvt::osptoken, PTR_TO_CALLNO, and chan_iax2_pvt::username.
|
static |
Definition at line 10119 of file chan_iax2.c.
References ast_channel_datastore_find(), ast_copy_string(), AST_LIST_HEAD, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, buf, ast_datastore::data, ast_var_t::entries, iax2_variable_datastore_info, len(), LOG_WARNING, NULL, and var.
|
static |
Definition at line 10148 of file chan_iax2.c.
References ast_calloc, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_datastore_alloc, ast_datastore_free(), AST_LIST_HEAD, AST_LIST_HEAD_INIT, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_log, ast_var_assign, ast_var_delete(), ast_datastore::data, DATASTORE_INHERIT_FOREVER, ast_var_t::entries, iax2_variable_datastore_info, ast_datastore::inheritance, LOG_ERROR, LOG_WARNING, NULL, value, and var.
|
static |
Definition at line 1558 of file chan_iax2.c.
References ast_log, ast_named_acl_change_type(), LOG_NOTICE, reload_config(), and stasis_message_type().
Referenced by acl_change_stasis_subscribe(), and rtp_reload().
|
static |
Definition at line 1516 of file chan_iax2.c.
References acl_change_stasis_cb(), acl_change_sub, ast_named_acl_change_type(), ast_security_topic(), NULL, stasis_subscribe, stasis_subscription_accept_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, and stasis_subscription_set_filter().
Referenced by build_peer(), and build_user().
|
static |
Definition at line 1526 of file chan_iax2.c.
References acl_change_sub, and stasis_unsubscribe_and_join().
Referenced by __unload_module().
|
static |
Definition at line 2842 of file chan_iax2.c.
References ast_ha::addr, ao2_alloc, ao2_find, ao2_link, ao2_lock, ao2_ref, ao2_unlock, ast_append_ha(), ast_copy_ha(), ast_free_ha(), ast_log, ast_strlen_zero(), calltoken_ignores, addr_range::delme, error(), addr_range::ha, LOG_WARNING, NULL, OBJ_POINTER, and tmp().
Referenced by set_config().
|
static |
Definition at line 4858 of file chan_iax2.c.
References iax_ie_data::buf, chan_iax2_pvt::calltoken_ie_len, IAX_IE_CALLTOKEN, and iax_ie_data::pos.
Referenced by cache_get_callno_locked(), iax2_call(), iax2_do_register(), iax2_poke_peer(), and registry_rerequest().
|
static |
Definition at line 2498 of file chan_iax2.c.
References ast_ha::addr, ast_sockaddr_cmp_addr(), CMP_MATCH, CMP_STOP, addr_range::ha, and ast_ha::netmask.
Referenced by load_objects().
|
static |
Definition at line 2485 of file chan_iax2.c.
References addr_range::delme.
Referenced by set_config_destroy().
|
static |
Definition at line 2492 of file chan_iax2.c.
References abs, ast_ha::addr, ast_sockaddr_hash(), and addr_range::ha.
Referenced by load_objects().
|
static |
Definition at line 2522 of file chan_iax2.c.
References ast_ha::addr, ast_sockaddr_apply_netmask(), ast_sockaddr_cmp_addr(), CMP_MATCH, CMP_STOP, addr_range::ha, and ast_ha::netmask.
Referenced by calltoken_required(), and set_peercnt_limit().
|
static |
Definition at line 7876 of file chan_iax2.c.
References iax2_context::context, voicemailpwcheck::context, and iax2_context::next.
Referenced by check_access().
|
static |
Definition at line 7577 of file chan_iax2.c.
References ACN_FORMAT1, ACN_FORMAT2, ARRAY_LEN, ast_channel_name(), ast_cli(), ast_mutex_lock, ast_mutex_unlock, ast_test_flag64, astman_append(), jb_info::current, iax_rr::delay, iax_rr::dropped, chan_iax2_pvt::first_iax_message, jb_info::frames_dropped, jb_info::frames_lost, jb_info::frames_ooo, iax_frame_subclass2str(), IAX_USEJITTERBUF, iaxs, iaxsl, jb_getinfo(), jb_info::jitter, chan_iax2_pvt::last_iax_message, iax_rr::losscnt, iax_rr::losspct, jb_info::losspct, MARK_IAX_SUBCLASS_TX, jb_info::min, iax_rr::ooo, iax_rr::packets, and chan_iax2_pvt::remote_rr.
Referenced by handle_cli_iax2_show_netstats(), and manager_iax2_show_netstats().
|
static |
Create new call, interface with the PBX core.
Definition at line 5906 of file chan_iax2.c.
References chan_iax2_pvt::accountcode, chan_iax2_pvt::adsi, chan_iax2_pvt::amaflags, chan_iax2_pvt::ani, ast_party_caller::ani, ast_party_caller::ani2, ao2_cleanup, ao2_ref, AST_ADSI_UNAVAILABLE, ast_calloc, ast_channel_adsicpe_set(), ast_channel_alloc, ast_channel_alloc_with_endpoint, ast_channel_amaflags_set(), ast_channel_caller(), ast_channel_callid_set(), ast_channel_context_set(), ast_channel_datastore_add(), ast_channel_dialed(), ast_channel_exten_set(), ast_channel_flags(), ast_channel_name(), ast_channel_nativeformats_set(), ast_channel_redirecting(), ast_channel_release(), ast_channel_set_rawreadformat(), ast_channel_set_rawwriteformat(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), ast_channel_tech_pvt_set(), ast_channel_tech_set(), ast_channel_unlock, ast_datastore_alloc, ast_datastore_free(), ast_debug, AST_FLAG_DISABLE_DEVSTATE_CACHE, ast_format_cap_alloc, ast_format_cap_count(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_format(), ast_free, ast_hangup(), AST_LIST_HEAD, AST_LIST_HEAD_INIT, AST_LIST_INSERT_TAIL, ast_log, ast_module_ref, ast_mutex_lock, ast_mutex_unlock, ast_pbx_start(), ast_set_flag, AST_STATE_DOWN, ast_strdup, ast_strdupa, ast_strlen_zero(), ast_var_assign, chan_iax2_pvt::calling_ani2, chan_iax2_pvt::calling_pres, chan_iax2_pvt::calling_tns, chan_iax2_pvt::calling_ton, chan_iax2_pvt::callno, CALLNO_TO_PTR, chan_iax2_pvt::capability, chan_iax2_pvt::cid_name, chan_iax2_pvt::cid_num, chan_iax2_pvt::context, ast_datastore::data, DATASTORE_INHERIT_FOREVER, chan_iax2_pvt::dnid, iax2_peer::endpoint, ast_var_t::entries, chan_iax2_pvt::exten, find_peer(), ast_party_redirecting::from, chan_iax2_pvt::host, iax2_codec_pref_best_bitfield2cap(), iax2_tech, iax2_variable_datastore_info, iaxs, iaxsl, chan_iax2_pvt::iaxvars, ast_party_caller::id, ast_datastore::inheritance, chan_iax2_pvt::language, LOG_ERROR, LOG_WARNING, ast_party_id::name, ast_variable::name, ast_variable::next, NULL, ast_party_id::number, ast_party_dialed::number, chan_iax2_pvt::owner, chan_iax2_pvt::parkinglot, pbx_builtin_setvar_helper(), chan_iax2_pvt::peer, chan_iax2_pvt::peeradsicpe, ast_party_number::plan, ast_party_name::presentation, ast_party_number::presentation, chan_iax2_pvt::rdnis, ast_module_info::self, ast_party_number::str, ast_party_dialed::str, tmp(), ast_party_dialed::transit_network_select, ast_party_number::valid, ast_variable::value, var, and chan_iax2_pvt::vars.
Referenced by iax2_request(), and socket_process_helper().
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 15139 of file chan_iax2.c.
|
static |
Definition at line 3678 of file chan_iax2.c.
References __attempt_transmit(), ast_frame::data, and schedule_action.
Referenced by __attempt_transmit(), and transmit_frame().
|
static |
Definition at line 9458 of file chan_iax2.c.
References auth_reject(), chan_iax2_pvt::authfail, chan_iax2_pvt::authid, delayreject, iax2_sched_replace(), and iaxs.
Referenced by socket_process_helper().
|
static |
Get names of all auth methods.
Bit | field of auth methods | |
[out] | buf | Buffer into which to write the names. Must be of size AUTH_METHOD_NAMES_BUFSIZE. |
Definition at line 415 of file chan_iax2.c.
References buf, IAX_AUTH_MD5, IAX_AUTH_PLAINTEXT, and IAX_AUTH_RSA.
Referenced by socket_process_helper().
|
static |
Definition at line 9444 of file chan_iax2.c.
References __auth_reject(), ast_mutex_lock, ast_mutex_unlock, chan_iax2_pvt::authid, iaxs, iaxsl, and schedule_action.
Referenced by auth_fail().
|
static |
Definition at line 8465 of file chan_iax2.c.
References ast_key_get(), AST_KEY_PRIVATE, ast_log, ast_sign(), ast_sockaddr_stringify_addr(), ast_strlen_zero(), build_encryption_keys(), challenge(), chan_iax2_pvt::eff_auth_method, IAX_AUTH_MD5, IAX_AUTH_PLAINTEXT, IAX_AUTH_RSA, iax_ie_append_str(), IAX_IE_MD5_RESULT, IAX_IE_PASSWORD, IAX_IE_RSA_RESULT, LOG_WARNING, md5(), MD5Final(), MD5Init(), and MD5Update().
Referenced by authenticate_reply(), and registry_rerequest().
|
static |
Definition at line 8543 of file chan_iax2.c.
References iax2_peer::addr, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_assert_return, ast_calloc, ast_channel_datastore_add(), ast_datastore_alloc, ast_datastore_free(), AST_FRAME_IAX, ast_free, AST_LIST_HEAD, AST_LIST_HEAD_INIT, AST_LIST_INSERT_TAIL, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_set_flag64, ast_sockaddr_apply_netmask(), ast_sockaddr_cmp_addr(), ast_sockaddr_copy(), ast_sockaddr_isnull(), ast_strdupa, ast_string_field_set, ast_strlen_zero(), ast_test_flag64, ast_var_assign, authenticate(), iax2_peer::authmethods, iax_ies::authmethods, iax_ie_data::buf, chan_iax2_pvt::callno, chan_iax2_pvt::challenge, iax_ies::challenge, challenge(), ast_datastore::data, DATASTORE_INHERIT_FOREVER, chan_iax2_pvt::dcx, chan_iax2_pvt::ecx, chan_iax2_pvt::encmethods, iax_ies::encmethods, ast_var_t::entries, iax2_variable_datastore_info, IAX_AUTH_MD5, IAX_AUTH_PLAINTEXT, IAX_AUTH_RSA, IAX_COMMAND_AUTHREP, IAX_ENCRYPTED, IAX_FORCE_ENCRYPT, IAX_KEYPOPULATED, iaxs, iaxsl, ast_datastore::inheritance, invalid_key(), LOG_ERROR, LOG_NOTICE, LOG_WARNING, iax2_peer::mask, merge_encryption(), iax2_peer::name, NULL, iax2_peer::outkey, chan_iax2_pvt::owner, chan_iax2_pvt::peer, peer_unref(), iax_ie_data::pos, realtime_peer(), iax2_peer::secret, chan_iax2_pvt::secret, send_command(), iax2_peer::username, chan_iax2_pvt::username, iax_ies::username, var, and iax_ies::vars.
Referenced by socket_process_helper().
|
static |
Definition at line 8157 of file chan_iax2.c.
References ao2_find, AST_CAUSE_CALL_REJECTED, AST_FRAME_IAX, ast_random(), ast_set_flag64, ast_string_field_set, ast_test_flag64, chan_iax2_pvt::authmethods, iax_ie_data::buf, chan_iax2_pvt::challenge, challenge(), chan_iax2_pvt::encmethods, IAX_AUTH_MD5, IAX_AUTH_RSA, IAX_COMMAND_AUTHREQ, IAX_COMMAND_REJECT, IAX_ENCRYPTED, iax_ie_append_byte(), iax_ie_append_short(), iax_ie_append_str(), IAX_IE_AUTHMETHODS, IAX_IE_CAUSE, IAX_IE_CAUSECODE, IAX_IE_CHALLENGE, IAX_IE_ENCRYPTION, IAX_IE_USERNAME, IAX_MAXAUTHREQ, iaxs, OBJ_KEY, iax_ie_data::pos, send_command(), send_command_final(), user, user_unref(), and chan_iax2_pvt::username.
Referenced by socket_process_helper().
|
static |
Definition at line 8208 of file chan_iax2.c.
References ao2_find, ast_atomic_fetchadd_int(), ast_check_signature(), ast_clear_flag64, ast_copy_string(), ast_free, ast_key_get(), AST_KEY_PUBLIC, ast_log, ast_strdup, ast_strdupa, ast_string_field_set, ast_strlen_zero(), ast_test_flag, ast_test_flag64, authdebug, chan_iax2_pvt::authmethods, chan_iax2_pvt::authrej, chan_iax2_pvt::challenge, chan_iax2_pvt::eff_auth_method, chan_iax2_pvt::encmethods, IAX_AUTH_MD5, IAX_AUTH_PLAINTEXT, IAX_AUTH_RSA, IAX_FORCE_ENCRYPT, IAX_MAXAUTHREQ, IAX_STATE_AUTHENTICATED, chan_iax2_pvt::inkeys, LOG_ERROR, LOG_WARNING, md5(), iax_ies::md5_result, MD5Final(), MD5Init(), MD5Update(), NULL, OBJ_KEY, iax_ies::password, iax_ies::rsa_result, iax2_user::secret, chan_iax2_pvt::secret, chan_iax2_pvt::state, strsep(), user, user_unref(), and chan_iax2_pvt::username.
Referenced by socket_process_helper().
|
static |
Definition at line 4795 of file chan_iax2.c.
References __auto_congest(), ast_frame::data, and schedule_action.
Referenced by iax2_call().
|
static |
Definition at line 9488 of file chan_iax2.c.
References __auto_hangup(), ast_mutex_lock, ast_mutex_unlock, chan_iax2_pvt::autoid, iaxs, iaxsl, and schedule_action.
Referenced by iax2_dprequest(), and iax2_provision().
|
static |
Definition at line 2787 of file chan_iax2.c.
References ao2_alloc, ao2_find, ao2_link, ao2_lock, ao2_ref, ao2_unlock, ast_append_ha(), ast_copy_ha(), ast_free_ha(), ast_log, callno_limits, addr_range::delme, error(), addr_range::ha, addr_range::limit, LOG_ERROR, ast_variable::name, ast_variable::next, NULL, OBJ_POINTER, tmp(), and ast_variable::value.
Referenced by set_config().
|
static |
Definition at line 12818 of file chan_iax2.c.
References ast_calloc, ast_copy_string(), iax2_context::context, and voicemailpwcheck::context.
Referenced by build_user().
|
static |
Definition at line 6465 of file chan_iax2.c.
References ast_aes_set_decrypt_key(), ast_aes_set_encrypt_key(), build_rand_pad(), chan_iax2_pvt::ecx, chan_iax2_pvt::mydcx, and chan_iax2_pvt::semirand.
Referenced by build_encryption_keys(), and iax2_key_rotate().
|
static |
Definition at line 6459 of file chan_iax2.c.
References ast_aes_set_decrypt_key(), build_ecx_key(), and chan_iax2_pvt::dcx.
Referenced by authenticate(), and decrypt_frame().
|
static |
Create peer structure based on configuration.
Definition at line 12967 of file chan_iax2.c.
References iax2_peer::acl, acl_change_stasis_subscribe(), iax2_peer::addr, adsi, iax2_peer::adsi, ao2_alloc, ao2_find, AST_AF_UNSPEC, ast_append_acl(), ast_callerid_split(), ast_clear_flag64, ast_copy_flags64, ast_dnsmgr_lookup(), ast_dnsmgr_refresh(), ast_endpoint_create(), ast_false(), ast_free_acl_list(), ast_get_ip(), ast_log, ast_mwi_subscribe_pool(), ast_parse_arg(), AST_SCHED_DEL, ast_set2_flag64, ast_set_flag64, ast_set_flags_to64, ast_sockaddr_copy(), ast_sockaddr_is_ipv4_mapped(), ast_sockaddr_is_ipv6(), ast_sockaddr_isnull(), ast_sockaddr_parse(), ast_sockaddr_port, ast_sockaddr_set_port, ast_sockaddr_setnull(), ast_string_field_build, ast_string_field_init, ast_string_field_set, ast_strlen_zero(), ast_test_flag64, ast_true(), iax2_peer::authmethods, CALLTOKEN_AUTO, CALLTOKEN_DEFAULT, CALLTOKEN_NO, iax2_peer::calltoken_required, CALLTOKEN_YES, iax2_peer::capability, voicemailpwcheck::context, iax2_peer::defaddr, DEFAULT_FREQ_NOTOK, DEFAULT_FREQ_OK, DEFAULT_MAXMS, defaultsockfd, iax2_peer::dnsmgr, iax2_peer::encmethods, iax2_peer::endpoint, iax2_peer::expire, iax2_peer::expiry, get_auth_methods(), get_encrypt_methods(), globalflags, iax2_authmethods, iax2_capability, iax2_encryption, iax2_parse_allow_disallow(), IAX_AUTH_MD5, IAX_AUTH_PLAINTEXT, IAX_DEFAULT_PORTNO, IAX_DELME, IAX_DYNAMIC, IAX_FORCE_ENCRYPT, IAX_HASCALLERID, IAX_NOTRANSFER, IAX_RECVCONNECTEDLINE, IAX_SENDANI, IAX_SENDCONNECTEDLINE, IAX_TRANSFERMEDIA, IAX_TRUNK, IAX_USEJITTERBUF, ast_variable::lineno, LOG_WARNING, iax2_peer::mailbox, voicemailpwcheck::mailbox, iax2_peer::mask, iax2_peer::maxcallno, iax2_peer::maxms, min_reg_expire, mohinterpret, mohsuggest, iax2_peer::mwi_event_sub, name, iax2_peer::name, ast_variable::name, ast_variable::next, NULL, OBJ_KEY, PARSE_IN_RANGE, PARSE_UINT32, peer_destructor(), peer_set_srcaddr(), peer_unref(), peercnt_modify(), iax2_peer::pokeexpire, iax2_peer::pokefreqnotok, iax2_peer::pokefreqok, iax2_peer::prefs, prefs_global, S_OR, iax2_peer::smoothing, iax2_peer::sockfd, srvlookup, ast_sockaddr::ss, stasis_subscription_cb_noop(), timer, unlink_peer(), ast_variable::value, and zonetag.
Referenced by realtime_peer(), and set_config().
|
static |
Definition at line 6433 of file chan_iax2.c.
References ast_random(), buf, len(), and tmp().
Referenced by build_ecx_key(), and update_packet().
|
static |
Create in-memory user structure from configuration.
Definition at line 13292 of file chan_iax2.c.
References accountcode, acl_change_stasis_subscribe(), adsi, ao2_alloc, ao2_find, ao2_unlink, ast_append_acl(), ast_callerid_split(), ast_channel_string2amaflag(), ast_clear_flag64, ast_copy_flags64, ast_false(), ast_free_acl_list(), ast_log, ast_set2_flag64, ast_set_flag64, ast_set_flags_to64, ast_strdupa, ast_string_field_build, ast_string_field_free_memory, ast_string_field_init, ast_string_field_set, ast_strlen_zero(), ast_test_flag64, ast_true(), ast_variable_list_replace(), ast_variable_new, build_context(), CALLTOKEN_AUTO, CALLTOKEN_DEFAULT, CALLTOKEN_NO, CALLTOKEN_YES, cleanup(), free_context(), get_auth_methods(), get_encrypt_methods(), globalflags, iax2_authmethods, iax2_capability, iax2_encryption, iax2_parse_allow_disallow(), IAX_AUTH_MD5, IAX_AUTH_PLAINTEXT, IAX_AUTH_RSA, IAX_CODEC_NOCAP, IAX_CODEC_NOPREFS, IAX_CODEC_USER_FIRST, IAX_DELME, IAX_FORCE_ENCRYPT, IAX_HASCALLERID, IAX_IMMEDIATE, IAX_NOTRANSFER, IAX_RECVCONNECTEDLINE, IAX_SENDCONNECTEDLINE, IAX_TRANSFERMEDIA, IAX_TRUNK, IAX_USEJITTERBUF, language, ast_variable::lineno, LOG_WARNING, maxauthreq, mohinterpret, mohsuggest, name, ast_variable::name, iax2_context::next, ast_variable::next, NULL, OBJ_KEY, prefs_global, timer, user, user_destructor(), user_unref(), and ast_variable::value.
Referenced by realtime_user(), and set_config().
|
static |
Definition at line 14237 of file chan_iax2.c.
References add_empty_calltoken_ie(), ARRAY_LEN, ast_debug, AST_FRAME_IAX, ast_log, ast_mutex_trylock, ast_mutex_unlock, ast_strdupa, ast_string_field_set, ast_strlen_zero(), iax_ie_data::buf, chan_iax2_pvt::capability, parsed_dial_string::context, create_addr(), parsed_dial_string::exten, find_callno_locked(), IAX_CAPABILITY_FULLBANDWIDTH, IAX_COMMAND_NEW, iax_ie_append_int(), iax_ie_append_short(), iax_ie_append_str(), IAX_IE_CALLED_CONTEXT, IAX_IE_CALLED_NUMBER, IAX_IE_CAPABILITY, IAX_IE_FORMAT, IAX_IE_USERNAME, IAX_IE_VERSION, IAX_PROTO_VERSION, iaxs, iaxsl, parsed_dial_string::key, LOG_WARNING, NEW_FORCE, NULL, parse_dial_string(), parsed_dial_string::password, parsed_dial_string::peer, iax_ie_data::pos, send_command(), create_addr_info::sockfd, and parsed_dial_string::username.
Referenced by find_cache().
|
static |
Definition at line 6284 of file chan_iax2.c.
References ast_debug, ast_random(), ast_samp2tv(), ast_tvdiff_ms(), ast_tvnow(), ast_tvsub(), ast_tvzero(), chan_iax2_pvt::callno, iaxdebug, and chan_iax2_pvt::rxcore.
Referenced by schedule_delivery().
|
static |
Definition at line 6149 of file chan_iax2.c.
References abs, ast_debug, ast_format_get_sample_rate(), AST_FRAME_CNG, AST_FRAME_IAX, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_samp2tv(), ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), ast_tvsub(), ast_tvzero(), chan_iax2_pvt::callno, ast_frame::delivery, ast_frame_subclass::format, ast_frame::frametype, iaxdebug, iaxs, chan_iax2_pvt::lastsent, MAX_TIMESTAMP_SKEW, chan_iax2_pvt::nextpred, chan_iax2_pvt::notsilenttx, NULL, chan_iax2_pvt::offset, chan_iax2_pvt::peercallno, ast_frame::samples, and ast_frame::subclass.
Referenced by iax2_send(), and socket_process_helper().
|
static |
Definition at line 6105 of file chan_iax2.c.
References ast_tvdiff_ms(), ast_tvzero(), iax2_trunk_peer::lastsent, iax2_trunk_peer::lasttxtime, MAX_TIMESTAMP_SKEW, iax2_trunk_peer::trunkact, and iax2_trunk_peer::txtrunktime.
Referenced by send_trunk().
|
static |
Definition at line 2541 of file chan_iax2.c.
References addr_range_match_address_cb(), ao2_callback, ao2_ref, ast_debug, ast_sockaddr_stringify_addr(), CALLTOKEN_AUTO, CALLTOKEN_DEFAULT, calltoken_ignores, CALLTOKEN_NO, iax2_peer::calltoken_required, calltoken_required(), find_peer(), find_user(), IAX_COMMAND_NEW, name, NULL, peer_unref(), realtime_peer(), realtime_user(), S_OR, and user_unref().
Referenced by calltoken_required(), and handle_call_token().
|
static |
Definition at line 7887 of file chan_iax2.c.
References accountcode, chan_iax2_pvt::adsi, iax_ies::adsicpe, chan_iax2_pvt::amaflags, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, apply_context(), ast_apply_acl(), ast_copy_flags64, ast_db_get(), ast_log, AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, AST_PRES_NUMBER_NOT_AVAILABLE, AST_SENSE_ALLOW, AST_SENSE_DENY, ast_set2_flag64, ast_set_flag64, ast_shrink_phone_number(), ast_sockaddr_stringify_addr(), ast_strdupa, ast_string_field_set, ast_strlen_zero(), ast_test_flag64, ast_variable_list_replace(), ast_variable_new, chan_iax2_pvt::authmethods, chan_iax2_pvt::authrej, buf, iax_ies::called_context, iax_ies::called_number, iax_ies::calling_ani, chan_iax2_pvt::calling_ani2, iax_ies::calling_ani2, iax_ies::calling_name, iax_ies::calling_number, chan_iax2_pvt::calling_pres, iax_ies::calling_pres, chan_iax2_pvt::calling_tns, iax_ies::calling_tns, chan_iax2_pvt::calling_ton, iax_ies::calling_ton, chan_iax2_pvt::capability, iax_ies::capability, iax_ies::codec_prefs, chan_iax2_pvt::context, voicemailpwcheck::context, DEFAULT_CONTEXT, iax_ies::dnid, chan_iax2_pvt::encmethods, ast_variable::file, iax_ies::format, globalflags, iax2_codec_pref_convert(), iax2_getpeertrunk(), IAX_AUTH_MD5, IAX_CODEC_NOCAP, IAX_CODEC_NOPREFS, IAX_CODEC_USER_FIRST, IAX_FORCE_ENCRYPT, IAX_HASCALLERID, IAX_IMMEDIATE, IAX_MAXAUTHREQ, IAX_NOTRANSFER, IAX_PROTO_VERSION, IAX_RECVCONNECTEDLINE, IAX_SENDCONNECTEDLINE, IAX_SHRINKCALLERID, IAX_TRANSFERMEDIA, IAX_TRUNK, IAX_USEJITTERBUF, iaxs, language, iax_ies::language, last_authmethod, LOG_WARNING, mohinterpret, mohsuggest, ast_variable::name, ast_variable::next, NULL, chan_iax2_pvt::peeradsicpe, chan_iax2_pvt::peercapability, chan_iax2_pvt::peerformat, chan_iax2_pvt::prefs, iax_ies::rdnis, realtime_user(), chan_iax2_pvt::rprefs, user, user_unref(), iax_ies::username, ast_variable::value, chan_iax2_pvt::vars, version, and iax_ies::version.
Referenced by socket_process_helper().
|
static |
Definition at line 9741 of file chan_iax2.c.
References ast_debug, iax2_provision(), iax_provision_version(), and NULL.
Referenced by socket_process_helper().
|
static |
Check if address can be used as packet source.
0 | address available |
1 | address unavailable |
-1 | error |
Definition at line 12846 of file chan_iax2.c.
References ast_bind(), ast_debug, ast_log, errno, LOG_ERROR, and ast_sockaddr::ss.
Referenced by peer_set_srcaddr().
|
static |
Definition at line 14746 of file chan_iax2.c.
References AST_LIST_HEAD, AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, iax2_thread::list, NULL, signal_condition(), and thread.
Referenced by __unload_module().
|
static |
Definition at line 1894 of file chan_iax2.c.
References ao2_cleanup, ARRAY_LEN, ast_debug, ast_format_cap_get_compatible_format(), ast_format_compatibility_bitfield2format(), ast_format_get_type(), AST_MEDIA_TYPE_AUDIO, iax2_codec_pref_order_value_to_format_bitfield(), NULL, and iax2_codec_pref::order.
Referenced by iax2_codec_choose().
|
static |
Definition at line 8744 of file chan_iax2.c.
References ARRAY_LEN, ast_copy_string(), AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, CACHE_FLAG_CANEXIST, CACHE_FLAG_EXISTS, CACHE_FLAG_MATCHMORE, CACHE_FLAG_NONEXISTENT, CACHE_FLAG_PENDING, CACHE_FLAG_UNKNOWN, iax_ies::called_number, iax2_dpcache::callno, iax_ies::dpstatus, iax2_dpcache::expiry, iax2_dpcache::exten, iax2_dpcache::flags, IAX_DPSTATUS_CANEXIST, IAX_DPSTATUS_EXISTS, IAX_DPSTATUS_MATCHMORE, IAX_DPSTATUS_NONEXISTENT, iaxdefaultdpcache, matchmore(), NULL, iax2_dpcache::orig, iax2_dpcache::peer_list, iax_ies::refresh, status, and iax2_dpcache::waiters.
Referenced by socket_process_helper().
|
static |
Definition at line 3938 of file chan_iax2.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_strdup, ast_test_flag64, ao2_iterator::flags, iax2_peer::name, NULL, and peer_unref().
Referenced by handle_cli_iax2_prune_realtime(), handle_cli_iax2_set_debug(), and handle_cli_iax2_show_peer().
|
static |
Definition at line 7248 of file chan_iax2.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_strdup, iax2_peer::expire, iax2_peer::name, NULL, and peer_unref().
Referenced by handle_cli_iax2_unregister().
|
static |
Definition at line 8791 of file chan_iax2.c.
References chan_iax2_pvt::addr, chan_iax2_pvt::aseqno, AST_LIST_TRAVERSE, ast_log, chan_iax2_pvt::callno, iax_ies::callno, iax_frame::callno, jb_frame::data, DEFAULT_RETRY_TIME, frame_queue, iax2_frame_free(), iaxs, chan_iax2_pvt::iseqno, chan_iax2_pvt::jb, jb_getall(), JB_OK, jb_reset(), chan_iax2_pvt::lag, chan_iax2_pvt::last, chan_iax2_pvt::lastsent, iax_frame::list, LOG_WARNING, chan_iax2_pvt::nextpred, chan_iax2_pvt::offset, chan_iax2_pvt::oseqno, chan_iax2_pvt::peercallno, peercnt_add(), peercnt_remove_by_addr(), chan_iax2_pvt::pingtime, remove_by_peercallno(), remove_by_transfercallno(), iax_frame::retries, chan_iax2_pvt::rseqno, chan_iax2_pvt::rxcore, store_by_peercallno(), chan_iax2_pvt::svideoformat, chan_iax2_pvt::svoiceformat, chan_iax2_pvt::transfer, TRANSFER_NONE, chan_iax2_pvt::transfercallno, chan_iax2_pvt::transferring, chan_iax2_pvt::videoformat, and chan_iax2_pvt::voiceformat.
Referenced by socket_process_helper().
|
static |
Definition at line 1860 of file chan_iax2.c.
References ast_log, IAX_FLAG_SC_LOG, IAX_MAX_SHIFT, and LOG_WARNING.
Referenced by iax2_send(), raw_hangup(), and send_apathetic_reply().
|
static |
Definition at line 9754 of file chan_iax2.c.
References jb_info::current, jb_info::frames_dropped, jb_info::frames_in, jb_info::frames_lost, jb_info::frames_ooo, iax_ie_append_int(), iax_ie_append_short(), IAX_IE_RR_DELAY, IAX_IE_RR_DROPPED, IAX_IE_RR_JITTER, IAX_IE_RR_LOSS, IAX_IE_RR_OOO, IAX_IE_RR_PKTS, chan_iax2_pvt::jb, jb_getinfo(), jb_info::jitter, jb_info::losspct, and jb_info::min.
Referenced by socket_process_helper().
|
static |
Definition at line 4666 of file chan_iax2.c.
References iax2_peer::addr, iax2_peer::adsi, create_addr_info::adsi, ao2_ref, AST_AF_UNSPEC, ast_channel_nativeformats(), ast_clear_flag64, ast_copy_flags64, ast_copy_string(), ast_db_get(), ast_format_cap_count(), ast_format_cap_get_format(), ast_format_cap_get_format_framing(), ast_get_ip_or_srv(), ast_log, ast_sockaddr_copy(), ast_sockaddr_isnull(), ast_sockaddr_port, ast_sockaddr_set_port, ast_strdupa, ast_strlen_zero(), iax2_peer::authmethods, create_addr_info::authmethods, c, iax2_peer::capability, create_addr_info::capability, iax2_peer::cid_name, create_addr_info::cid_name, iax2_peer::cid_num, create_addr_info::cid_num, iax2_peer::context, create_addr_info::context, iax2_peer::dbsecret, iax2_peer::defaddr, defaultsockfd, iax2_peer::encmethods, create_addr_info::encmethods, find_peer(), create_addr_info::found, iax2_codec_pref_prepend(), IAX_DEFAULT_PORTNO, IAX_FORCE_ENCRYPT, IAX_NOTRANSFER, IAX_RECVCONNECTEDLINE, IAX_SENDANI, IAX_SENDCONNECTEDLINE, IAX_TRANSFERMEDIA, IAX_TRUNK, IAX_USEJITTERBUF, iax2_peer::lastms, LOG_WARNING, iax2_peer::maxms, create_addr_info::maxtime, iax2_peer::mohinterpret, create_addr_info::mohinterpret, iax2_peer::mohsuggest, create_addr_info::mohsuggest, NULL, iax2_peer::outkey, create_addr_info::outkey, peer_unref(), iax2_peer::peercontext, create_addr_info::peercontext, iax2_peer::prefs, create_addr_info::prefs, prefs_global, iax2_peer::secret, create_addr_info::secret, iax2_peer::sockfd, create_addr_info::sockfd, srvlookup, ast_sockaddr::ss, create_addr_info::timezone, iax2_peer::username, create_addr_info::username, and iax2_peer::zonetag.
Referenced by cache_get_callno_locked(), iax2_call(), iax2_provision(), and iax2_request().
|
static |
Definition at line 3068 of file chan_iax2.c.
References ast_assert, call_number_pool::available, callno_pool, callno_pool_trunk, call_number_pool::capacity, IAX_MAX_CALLS, call_number_pool::numbers, and TRUNK_CALL_START.
Referenced by load_objects().
|
static |
Definition at line 6523 of file chan_iax2.c.
References ast_alloca, ast_debug, ast_format_compatibility_bitfield2format(), ast_format_none, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_iax2_full_hdr::csub, ast_iax2_full_enc_hdr::encdata, ast_iax2_mini_enc_hdr::encdata, ast_frame_subclass::format, ast_frame::frametype, IAX_FLAG_FULL, iaxdebug, ast_frame_subclass::integer, memcpy_decrypt(), ast_iax2_full_hdr::scallno, ast_frame::subclass, ast_iax2_full_hdr::type, and uncompress_subclass().
Referenced by decrypt_frame(), and update_packet().
|
static |
Definition at line 6615 of file chan_iax2.c.
References ast_set_flag64, ast_strdupa, ast_test_flag64, build_encryption_keys(), ast_iax2_mini_enc_hdr::callno, challenge(), decode_frame(), IAX_KEYPOPULATED, iaxs, md5(), MD5Final(), MD5Init(), MD5Update(), and strsep().
Referenced by socket_process_helper().
|
static |
Queue the last read full frame for processing by a certain thread.
If there are already any full frames queued, they are sorted by sequence number.
Definition at line 9884 of file chan_iax2.c.
References ast_calloc, ast_cond_signal, AST_LIST_INSERT_BEFORE_CURRENT, AST_LIST_INSERT_TAIL, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_mutex_lock, ast_mutex_unlock, iax2_pkt_buf::buf, iax2_thread::buf, iax2_thread::buf_len, iax2_thread::cond, iax2_thread::full_frames, IAX_IOSTATE_READY, if(), iax2_thread::iostate, iax2_pkt_buf::len, iax2_thread::lock, and ast_iax2_full_hdr::oseqno.
Referenced by socket_read().
|
static |
Definition at line 13572 of file chan_iax2.c.
References ao2_callback, ast_dnsmgr_release(), ast_free, AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, ast_mutex_lock, ast_mutex_unlock, AST_SCHED_DEL, iax2_registry::callno, iax2_registry::dnsmgr, iax2_registry::expire, iax2_destroy(), iaxs, iaxsl, NULL, OBJ_NODATA, peer_delme_cb(), chan_iax2_pvt::reg, and user_delme_cb().
Referenced by __unload_module(), and set_config_destroy().
|
static |
Definition at line 9680 of file chan_iax2.c.
References ast_canmatch_extension(), ast_exists_extension(), AST_FRAME_IAX, ast_ignore_pattern(), ast_matchmore_extension(), ast_mutex_lock, ast_mutex_unlock, iax_ie_data::buf, voicemailpwcheck::context, IAX_COMMAND_DPREP, IAX_DPSTATUS_CANEXIST, IAX_DPSTATUS_EXISTS, IAX_DPSTATUS_IGNOREPAT, IAX_DPSTATUS_MATCHMORE, IAX_DPSTATUS_NONEXISTENT, iax_ie_append_short(), iax_ie_append_str(), IAX_IE_CALLED_NUMBER, IAX_IE_DPSTATUS, IAX_IE_REFRESH, iaxdefaultdpcache, iaxs, iaxsl, NULL, iax_ie_data::pos, and send_command().
Referenced by dp_lookup_thread(), and socket_process_helper().
|
static |
Definition at line 9712 of file chan_iax2.c.
References ast_free, dpreq_data::callednum, dpreq_data::callerid, dpreq_data::callno, dpreq_data::context, dp_lookup(), and NULL.
Referenced by spawn_dp_lookup().
|
static |
Definition at line 1797 of file chan_iax2.c.
References ast_str_append(), ast_str_set(), ast_str_strlen(), buf, IAX_ENCRYPT_AES128, and IAX_ENCRYPT_KEYROTATE.
Referenced by _iax2_show_peers_one(), and handle_cli_iax2_show_peer().
|
static |
Definition at line 6576 of file chan_iax2.c.
References ast_alloca, ast_debug, ast_iax2_full_hdr::csub, ast_iax2_full_enc_hdr::encdata, ast_iax2_mini_enc_hdr::encdata, IAX_FLAG_FULL, iaxdebug, memcpy_encrypt(), ast_iax2_full_hdr::scallno, and ast_iax2_full_hdr::type.
Referenced by iax2_send(), and update_packet().
|
static |
Definition at line 9081 of file chan_iax2.c.
References __expire_registry(), and schedule_action.
Referenced by handle_cli_iax2_prune_realtime(), handle_cli_iax2_unregister(), realtime_peer(), reg_source_db(), and update_registry().
|
static |
Definition at line 14310 of file chan_iax2.c.
References ARRAY_LEN, ast_calloc, ast_check_hangup(), ast_copy_string(), ast_free, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_log, ast_mutex_unlock, ast_poll, ast_test_flag, ast_tvcmp(), ast_tvnow(), CACHE_FLAG_PENDING, CACHE_FLAG_TIMEOUT, cache_get_callno_locked(), iax2_dpcache::callno, errno, iax2_dpcache::expiry, iax2_dpcache::exten, iax2_dpcache::flags, iax2_dprequest(), IAX_STATE_STARTED, iaxdefaultdpcache, iaxdefaulttimeout, iaxs, iaxsl, LOG_WARNING, NULL, iax2_dpcache::orig, iax2_dpcache::peercontext, and iax2_dpcache::waiters.
Referenced by iax2_canmatch(), iax2_exec(), iax2_exists(), and iax2_matchmore().
|
static |
Definition at line 3281 of file chan_iax2.c.
References __find_callno(), chan_iax2_pvt::addr, chan_iax2_pvt::callno, and chan_iax2_pvt::sockfd.
Referenced by iax2_poke_peer(), and socket_process_helper().
|
static |
Definition at line 3285 of file chan_iax2.c.
References __find_callno(), chan_iax2_pvt::addr, chan_iax2_pvt::callno, and chan_iax2_pvt::sockfd.
Referenced by cache_get_callno_locked(), iax2_do_register(), iax2_provision(), iax2_request(), and socket_process_meta().
|
static |
Definition at line 1632 of file chan_iax2.c.
References ast_atomic_fetchadd_int(), ast_calloc, ast_cond_destroy, ast_cond_init, ast_cond_wait, ast_free, AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, ast_mutex_destroy, ast_mutex_init, ast_mutex_lock, ast_mutex_unlock, ast_pthread_create_background, iax2_process_thread(), IAX_THREAD_TYPE_DYNAMIC, iaxdynamicthreadcount, iaxdynamicthreadnum, iaxmaxthreadcount, iax2_thread::list, NULL, and thread.
Referenced by __schedule_action(), and socket_read().
|
static |
Definition at line 2056 of file chan_iax2.c.
References ao2_find, name, NULL, OBJ_KEY, and realtime_peer().
Referenced by ast_iax2_new(), calltoken_required(), create_addr(), function_iaxpeer(), handle_cli_iax2_prune_realtime(), handle_cli_iax2_set_debug(), handle_cli_iax2_show_peer(), handle_cli_iax2_unregister(), iax2_devicestate(), register_verify(), registry_authrequest(), requirecalltoken_mark_auto(), and update_registry().
|
static |
Definition at line 6324 of file chan_iax2.c.
References iax2_trunk_peer::addr, ast_calloc, ast_debug, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_mutex_init, ast_mutex_lock, ast_sockaddr_cmp(), ast_sockaddr_copy(), ast_sockaddr_stringify(), ast_tvnow(), iax2_trunk_peer::lastsent, iax2_trunk_peer::list, iax2_trunk_peer::lock, NULL, iax2_trunk_peer::sockfd, and iax2_trunk_peer::trunkact.
Referenced by iax2_trunk_queue(), and socket_process_meta().
|
static |
Definition at line 2081 of file chan_iax2.c.
References ao2_find, name, and OBJ_KEY.
Referenced by calltoken_required(), handle_cli_iax2_prune_realtime(), and requirecalltoken_mark_auto().
|
static |
Definition at line 7305 of file chan_iax2.c.
References ast_cli().
Referenced by handle_cli_iax2_show_firmware().
|
static |
Definition at line 6134 of file chan_iax2.c.
References ast_tvdiff_ms(), ast_tvnow(), ast_tvzero(), iaxs, and chan_iax2_pvt::rxcore.
Referenced by socket_process_meta().
|
static |
Definition at line 12619 of file chan_iax2.c.
References ast_free, and iax2_context::next.
Referenced by build_user(), and user_destructor().
|
static |
Definition at line 2195 of file chan_iax2.c.
References ast_free, ast_frame::data, ast_frame::datalen, signaling_queue_entry::f, and ast_frame::ptr.
Referenced by pvt_destructor(), queue_signalling(), and send_signaling().
|
static |
Definition at line 14555 of file chan_iax2.c.
References iax2_peer::addr, ast_channel_tech(), ast_channel_tech_pvt(), ast_copy_string(), AST_FORMAT_CAP_NAMES_LEN, ast_format_get_name(), ast_sockaddr_isnull(), ast_sockaddr_stringify_addr(), ast_str_alloca, ast_str_buffer(), ast_strdupa, ast_test_flag64, buf, iax2_peer::callno, iax2_peer::capability, iax2_peer::cid_name, iax2_peer::cid_num, iax2_peer::context, iax2_peer::expire, find_peer(), iax2_codec_pref_index(), iax2_getformatname_multiple(), iax2_tech, IAX_DYNAMIC, iaxs, len(), iax2_peer::mailbox, peer_status(), peer_unref(), iax2_peer::prefs, and PTR_TO_CALLNO.
|
static |
Definition at line 12828 of file chan_iax2.c.
References IAX_AUTH_MD5, IAX_AUTH_PLAINTEXT, IAX_AUTH_RSA, methods, and value.
Referenced by build_peer(), build_user(), and set_config().
|
static |
Definition at line 1813 of file chan_iax2.c.
References ast_true(), IAX_ENCRYPT_AES128, and IAX_ENCRYPT_KEYROTATE.
Referenced by build_peer(), build_user(), and set_config().
|
static |
Definition at line 4261 of file chan_iax2.c.
References __get_from_jb(), ast_frame::data, and schedule_action.
Referenced by update_jbsched().
|
static |
Definition at line 2952 of file chan_iax2.c.
References ast_assert, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_random(), call_number_pool::available, CALLNO_ENTRY_SET_VALIDATED, callno_pool, callno_pool_lock, callno_pool_trunk, CALLNO_TYPE_NORMAL, CALLNO_TYPE_TRUNK, global_maxcallno_nonval, LOG_WARNING, NULL, call_number_pool::numbers, total_nonval_callno_used, and type.
Referenced by __find_callno(), and make_trunk().
|
static |
Definition at line 4990 of file chan_iax2.c.
References ast_log, ast_sha1_hash(), ast_sockaddr_stringify(), ast_str_alloca, ast_str_buffer(), ast_str_set(), iax_ie_data::buf, buf, iax_ies::calltoken, CALLTOKEN_HASH_FORMAT, CALLTOKEN_IE_FORMAT, calltoken_required(), iax_ies::calltokendata, ast_iax2_full_hdr::csub, IAX_COMMAND_CALLTOKEN, IAX_COMMAND_REGREJ, IAX_COMMAND_REGREL, IAX_COMMAND_REGREQ, IAX_COMMAND_REJECT, iax_ie_append_str(), IAX_IE_CALLTOKEN, ast_iax2_full_hdr::iseqno, LOG_ERROR, LOG_WARNING, max_calltoken_delay, NULL, randomcalltokendata, requirecalltoken_mark_auto(), S_OR, ast_iax2_full_hdr::scallno, send_apathetic_reply(), ast_iax2_full_hdr::ts, uncompress_subclass(), and iax_ies::username.
Referenced by socket_process_helper().
|
static |
Definition at line 12449 of file chan_iax2.c.
References a, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, iax2_provision(), iax_prov_complete_template(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 3687 of file chan_iax2.c.
References a, ao2_unlink, ast_cli(), ast_cli_complete(), ast_set_flag64, ast_test_flag64, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_iax2_peers(), expire_registry(), find_peer(), find_user(), IAX_RTAUTOCLEAR, IAX_RTCACHEFRIENDS, NULL, peer_ref(), peer_unref(), prune_peers(), prune_users(), ast_cli_entry::usage, and user_unref().
|
static |
Definition at line 14214 of file chan_iax2.c.
References CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, NULL, reload_config(), and ast_cli_entry::usage.
|
static |
Definition at line 7684 of file chan_iax2.c.
References a, iax2_peer::addr, ao2_ref, ast_cli_entry::args, ast_cli(), ast_sockaddr_copy(), ast_sockaddr_stringify_port(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_iax2_peers(), debugaddr, find_peer(), iaxdebug, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 7757 of file chan_iax2.c.
References a, ast_cli_entry::args, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, jb_debug_output(), jb_error_output(), jb_setoutput(), jb_warning_output(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 7731 of file chan_iax2.c.
References a, ast_cli_entry::args, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, iaxtrunkdebug, NULL, and ast_cli_entry::usage.
|
static |
Set trunk MTU from CLI.
Definition at line 4007 of file chan_iax2.c.
References a, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, global_max_trunk_mtu, MAX_TRUNK_MTU, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 4048 of file chan_iax2.c.
References a, ARRAY_LEN, ast_cli(), ast_copy_string(), AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_strlen_zero(), ast_tvnow(), CACHE_FLAG_CANEXIST, CACHE_FLAG_EXISTS, CACHE_FLAG_MATCHMORE, CACHE_FLAG_NONEXISTENT, CACHE_FLAG_PENDING, CACHE_FLAG_TIMEOUT, CACHE_FLAG_TRANSMITTED, CACHE_FLAG_UNKNOWN, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, iax2_dpcache::expiry, iax2_dpcache::exten, iax2_dpcache::flags, NULL, iax2_dpcache::peercontext, tmp(), ast_cli_entry::usage, and iax2_dpcache::waiters.
|
static |
Definition at line 2883 of file chan_iax2.c.
References a, peercnt::addr, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_cli(), ast_sockaddr_copy(), ast_sockaddr_stringify(), call_number_pool::available, callno_pool, callno_pool_trunk, CLI_GENERATE, CLI_HANDLER, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, peercnt::cur, global_maxcallno_nonval, peercnt::limit, NULL, peercnts, total_nonval_callno_used, and ast_cli_entry::usage.
|
static |
Definition at line 7511 of file chan_iax2.c.
References a, iax2_registry::addr, ARRAY_LEN, ast_channel_name(), ast_cli(), ast_mutex_lock, ast_mutex_unlock, ast_sockaddr_stringify_addr(), ast_test_flag64, iax2_registry::callno, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, jb_info::current, iax_rr::delay, FORMAT, FORMAT2, iax2_getformatname(), iax_frame_subclass2str(), IAX_USEJITTERBUF, iaxs, iaxsl, jb_getinfo(), jb_info::jitter, MARK_IAX_SUBCLASS_TX, jb_info::min, NULL, chan_iax2_pvt::owner, chan_iax2_pvt::remote_rr, S_OR, ast_cli_entry::usage, and iax2_registry::username.
|
static |
Definition at line 7318 of file chan_iax2.c.
References a, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, firmware_show_callback(), iax_firmware_traverse(), NULL, and ast_cli_entry::usage.
|
static |
Definition at line 7661 of file chan_iax2.c.
References a, ast_cli(), ast_cli_netstats(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, and ast_cli_entry::usage.
|
static |
Show one peer in detail.
Definition at line 3862 of file chan_iax2.c.
References a, iax2_peer::acl, iax2_peer::addr, ast_acl_list_is_empty(), ast_callerid_merge(), ast_cli(), AST_FORMAT_CAP_NAMES_LEN, ast_sockaddr_stringify_addr(), ast_sockaddr_stringify_port(), ast_str_alloca, ast_str_buffer(), ast_strdupa, ast_strlen_zero(), ast_test_flag64, CALLTOKEN_AUTO, iax2_peer::calltoken_required, CALLTOKEN_YES, iax2_peer::capability, iax2_peer::cid_name, iax2_peer::cid_num, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_iax2_peers(), iax2_peer::context, iax2_peer::defaddr, iax2_peer::description, iax2_peer::encmethods, encmethods_to_str(), iax2_peer::expire, find_peer(), iax2_codec_pref_string(), iax2_getformatname_multiple(), IAX_DYNAMIC, IAX_TRUNK, iax2_peer::mailbox, iax2_peer::maxcallno, iax2_peer::name, NULL, iax2_peer::parkinglot, peer_status(), peer_unref(), iax2_peer::pokefreqnotok, iax2_peer::pokefreqok, iax2_peer::prefs, iax2_peer::secret, iax2_peer::smoothing, status, ast_cli_entry::usage, and iax2_peer::username.
|
static |
Definition at line 7273 of file chan_iax2.c.
References __iax2_show_peers(), a, CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, RESULT_FAILURE, RESULT_SHOWUSAGE, and ast_cli_entry::usage.
|
static |
Definition at line 7428 of file chan_iax2.c.
References a, iax2_registry::addr, ast_cli(), AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_sockaddr_isnull(), ast_sockaddr_stringify(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, iax2_registry::dnsmgr, FORMAT, FORMAT2, NULL, iax2_registry::refresh, iax2_registry::regstate, regstate2str(), iax2_registry::us, ast_cli_entry::usage, and iax2_registry::username.
|
static |
Definition at line 3961 of file chan_iax2.c.
References a, ARRAY_LEN, ast_cli(), AST_LIST_TRAVERSE, ast_mutex_lock, ast_mutex_unlock, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, iax_frame::final, frame_queue, global_max_trunk_mtu, iax_get_frames(), iax_get_iframes(), iax_get_oframes(), iaxsl, iax_frame::list, NULL, iax_frame::retries, trunk_maxmtu, trunk_nmaxmtu, trunk_timed, trunk_untimed, and ast_cli_entry::usage.
|
static |
Definition at line 7138 of file chan_iax2.c.
References a, ast_cli(), AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, IAX_THREAD_TYPE_DYNAMIC, iaxthreadcount, iax2_thread::list, NULL, thread, type, and ast_cli_entry::usage.
|
static |
Definition at line 6857 of file chan_iax2.c.
References a, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_acl_list_is_empty(), ast_cli(), ast_copy_string(), ast_strlen_zero(), ast_test_flag64, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, DEFAULT_CONTEXT, FORMAT, FORMAT2, IAX_CODEC_NOCAP, IAX_CODEC_NOPREFS, IAX_CODEC_USER_FIRST, NULL, ast_cli_entry::usage, and user_unref().
|
static |
Definition at line 3748 of file chan_iax2.c.
References a, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, test_losspct, and ast_cli_entry::usage.
|
static |
Definition at line 7207 of file chan_iax2.c.
References a, ao2_find, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_iax2_unregister(), iax2_peer::expire, expire_registry(), find_peer(), NULL, OBJ_KEY, peer_ref(), peer_unref(), and ast_cli_entry::usage.
|
static |
Handle any deferred full frames for this thread.
Definition at line 9854 of file chan_iax2.c.
References ast_free, AST_LIST_REMOVE_HEAD, ast_mutex_lock, ast_mutex_unlock, iax2_pkt_buf::buf, iax2_pkt_buf::len, NULL, socket_process(), and thread.
Referenced by iax2_process_thread().
|
static |
Definition at line 3402 of file chan_iax2.c.
References ast_inet_ntoa(), ast_log, errno, LOG_WARNING, netsocket, and NULL.
Referenced by send_packet(), socket_read(), and transmit_trunk().
|
static |
Acknowledgment received for OUR registration.
Definition at line 8858 of file chan_iax2.c.
References iax2_registry::addr, iax_ies::apparent_addr, ast_copy_string(), ast_log, ast_sockaddr_cmp(), ast_sockaddr_copy(), ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_verb, iax_ies::calling_number, iax2_registry::expire, iax2_do_register_s(), iax2_publish_registry(), iax2_sched_replace(), iaxs, LOG_WARNING, iax2_registry::messages, iax_ies::msgcount, NULL, iax2_registry::refresh, iax_ies::refresh, refresh, chan_iax2_pvt::reg, REG_STATE_REGISTERED, iax2_registry::regstate, iax2_registry::us, iax2_registry::username, and iax_ies::username.
Referenced by socket_process_helper().
|
inlinestatic |
Definition at line 3132 of file chan_iax2.c.
References AST_FRAME_IAX, IAX_COMMAND_FWDOWNL, IAX_COMMAND_NEW, IAX_COMMAND_POKE, IAX_COMMAND_REGREL, and IAX_COMMAND_REGREQ.
Referenced by resend_with_token(), and socket_process_helper().
|
static |
Definition at line 5804 of file chan_iax2.c.
References ast_channel_tech_pvt(), AST_CONTROL_ANSWER, ast_debug, AST_FRAME_CONTROL, c, NULL, PTR_TO_CALLNO, and send_command_locked().
|
static |
Definition at line 8924 of file chan_iax2.c.
References iax2_registry::addr, AST_AF_UNSPEC, ast_calloc, ast_copy_string(), ast_dnsmgr_lookup(), ast_free, AST_LIST_INSERT_HEAD, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_sockaddr_port, ast_sockaddr_set_port, iax2_registry::dnsmgr, iax2_registry::expire, iax2_registry::hostname, hostname, IAX_DEFAULT_PORTNO, IAX_DEFAULT_REG_EXPIRE, NULL, iax2_registry::port, iax2_registry::refresh, iax2_registry::secret, srvlookup, ast_sockaddr::ss, and iax2_registry::username.
Referenced by iax2_register().
|
static |
Definition at line 5152 of file chan_iax2.c.
References add_empty_calltoken_ie(), chan_iax2_pvt::adsi, create_addr_info::adsi, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL, ast_channel_connected(), ast_channel_context(), ast_channel_context_set(), ast_channel_datastore_find(), ast_channel_dialed(), ast_channel_hangupcause_set(), ast_channel_language(), ast_channel_name(), ast_channel_nativeformats(), ast_channel_redirecting(), ast_channel_tech_pvt(), ast_debug, AST_FRAME_IAX, AST_LIST_HEAD, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_parse_arg(), ast_party_id_presentation(), AST_PRES_NUMBER_NOT_AVAILABLE, ast_setstate(), ast_sockaddr_set_port, AST_STATE_DOWN, AST_STATE_RESERVED, AST_STATE_RINGING, ast_strdupa, ast_string_field_set, ast_strlen_zero(), ast_test_flag64, ast_var_name(), ast_var_value(), create_addr_info::authmethods, auto_congest(), autokill, iax_ie_data::buf, c, CALLNO_TO_PTR, create_addr_info::context, parsed_dial_string::context, voicemailpwcheck::context, create_addr(), ast_datastore::data, chan_iax2_pvt::encmethods, create_addr_info::encmethods, parsed_dial_string::exten, iax2_authmethods, iax2_codec_pref_convert(), iax2_datetime(), iax2_encryption, iax2_format_compatibility_cap2bitfield(), iax2_sched_add(), iax2_variable_datastore_info, IAX_AUTH_MD5, IAX_AUTH_PLAINTEXT, IAX_AUTH_RSA, IAX_COMMAND_NEW, IAX_FORCE_ENCRYPT, IAX_IE_ADSICPE, iax_ie_append(), iax_ie_append_byte(), iax_ie_append_int(), iax_ie_append_raw(), iax_ie_append_short(), iax_ie_append_str(), iax_ie_append_versioned_uint64(), IAX_IE_AUTOANSWER, IAX_IE_CALLED_CONTEXT, IAX_IE_CALLED_NUMBER, IAX_IE_CALLING_ANI, IAX_IE_CALLING_NAME, IAX_IE_CALLING_NUMBER, IAX_IE_CALLINGANI2, IAX_IE_CALLINGPRES, IAX_IE_CALLINGTNS, IAX_IE_CALLINGTON, IAX_IE_CAPABILITY, IAX_IE_CAPABILITY2, IAX_IE_CODEC_PREFS, IAX_IE_DATETIME, IAX_IE_DNID, IAX_IE_ENCRYPTION, IAX_IE_FORMAT, IAX_IE_FORMAT2, IAX_IE_LANGUAGE, IAX_IE_OSPTOKEN, IAX_IE_RDNIS, IAX_IE_USERNAME, IAX_IE_VARIABLE, IAX_IE_VERSION, IAX_MAX_OSPBLOCK_SIZE, IAX_MAX_OSPTOKEN_SIZE, IAX_PROTO_VERSION, IAX_SENDANI, iaxdebug, iaxs, iaxsl, ast_party_connected_line::id, chan_iax2_pvt::initid, parsed_dial_string::key, LOG_WARNING, chan_iax2_pvt::maxtime, mohinterpret, create_addr_info::mohinterpret, mohsuggest, create_addr_info::mohsuggest, ast_party_id::name, NULL, ast_party_id::number, parsed_dial_string::options, create_addr_info::outkey, parse_dial_string(), PARSE_IN_RANGE, PARSE_UINT32, parsed_dial_string::password, pbx_builtin_getvar_helper(), parsed_dial_string::peer, create_addr_info::peercontext, chan_iax2_pvt::pingtime, parsed_dial_string::port, iax_ie_data::pos, create_addr_info::prefs, PTR_TO_CALLNO, create_addr_info::secret, send_command(), chan_iax2_pvt::sockfd, create_addr_info::sockfd, ast_party_name::str, ast_party_number::str, create_addr_info::timezone, tmp(), create_addr_info::username, parsed_dial_string::username, ast_party_name::valid, ast_party_number::valid, and var.
|
static |
part of the IAX2 dial plan switch interface
Definition at line 14458 of file chan_iax2.c.
References AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, CACHE_FLAG_CANEXIST, voicemailpwcheck::context, iax2_dpcache::exten, find_cache(), iax2_dpcache::flags, LOG_NOTICE, LOG_WARNING, NULL, and priority.
|
static |
Definition at line 1928 of file chan_iax2.c.
References ao2_ref, ast_format_cap_alloc, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_compatibility_format2bitfield(), codec_choose_from_prefs(), and iax2_format_compatibility_bitfield2cap().
Referenced by socket_process_helper().
|
static |
Definition at line 4804 of file chan_iax2.c.
References ast_localtime(), ast_strlen_zero(), ast_tvnow(), NULL, ast_tm::tm_hour, ast_tm::tm_mday, ast_tm::tm_min, ast_tm::tm_mon, ast_tm::tm_sec, ast_tm::tm_year, tmp(), and tz.
Referenced by iax2_call(), and update_registry().
|
static |
Definition at line 2124 of file chan_iax2.c.
References AST_SCHED_DEL.
Referenced by iax2_destroy_helper().
|
static |
Definition at line 3506 of file chan_iax2.c.
References ao2_ref, ast_channel_trylock, ast_channel_unlock, ast_debug, ast_queue_hangup(), DEADLOCK_AVOIDANCE, iax2_destroy_helper(), iaxs, iaxsl, NULL, chan_iax2_pvt::owner, chan_iax2_pvt::peercallno, remove_by_peercallno(), remove_by_transfercallno(), and chan_iax2_pvt::transfercallno.
Referenced by __attempt_transmit(), __iax2_poke_noanswer(), __unload_module(), delete_users(), iax2_do_register(), iax2_hangup(), iax2_poke_peer(), peer_destructor(), scheduled_destroy(), and socket_process_helper().
|
static |
Definition at line 2135 of file chan_iax2.c.
References ao2_find, ast_atomic_fetchadd_int(), ast_clear_flag64, AST_SCHED_DEL, ast_test_flag64, chan_iax2_pvt::authid, chan_iax2_pvt::autoid, chan_iax2_pvt::destroy_initiated, iax2_delete_from_sched(), iax2_sched_add(), IAX_MAXAUTHREQ, chan_iax2_pvt::initid, chan_iax2_pvt::jbid, chan_iax2_pvt::keyrotateid, chan_iax2_pvt::lagid, OBJ_KEY, chan_iax2_pvt::pingid, user, user_unref(), and chan_iax2_pvt::username.
Referenced by iax2_destroy(), iax2_predestroy(), pvt_destructor(), and stop_stuff().
|
static |
Part of the device state notification system —.
Definition at line 14668 of file chan_iax2.c.
References iax2_peer::addr, ast_debug, AST_DEVICE_INVALID, AST_DEVICE_UNAVAILABLE, AST_DEVICE_UNKNOWN, ast_log, ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_strdupa, ast_strlen_zero(), iax2_peer::defaddr, find_peer(), iax2_peer::historicms, iax2_peer::lastms, LOG_WARNING, iax2_peer::maxms, parse_dial_string(), parsed_dial_string::peer, peer_unref(), and tmp().
|
static |
Definition at line 4374 of file chan_iax2.c.
References ast_channel_tech_pvt(), AST_FRAME_DTMF_BEGIN, c, digit, NULL, PTR_TO_CALLNO, and send_command_locked().
|
static |
Definition at line 4379 of file chan_iax2.c.
References ast_channel_tech_pvt(), AST_FRAME_DTMF_END, c, digit, NULL, PTR_TO_CALLNO, and send_command_locked().
|
static |
Definition at line 12307 of file chan_iax2.c.
References add_empty_calltoken_ie(), iax2_registry::addr, ast_debug, ast_dnsmgr_changed(), ast_dnsmgr_refresh(), AST_FRAME_IAX, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_sockaddr_isnull(), ast_sockaddr_port, ast_sockaddr_set_port, iax_ie_data::buf, iax2_registry::callno, defaultsockfd, iax2_registry::dnsmgr, iax2_registry::expire, find_callno_locked(), iax2_destroy(), iax2_do_register_s(), iax2_sched_replace(), IAX_COMMAND_REGREQ, iax_ie_append_short(), iax_ie_append_str(), IAX_IE_REFRESH, IAX_IE_USERNAME, iaxdebug, iaxs, iaxsl, LOG_WARNING, NEW_FORCE, iax2_registry::port, iax_ie_data::pos, iax2_registry::refresh, chan_iax2_pvt::reg, REG_STATE_REGSENT, REG_STATE_TIMEOUT, iax2_registry::regstate, send_command(), and iax2_registry::username.
Referenced by __iax2_do_register_s(), load_module(), network_change_sched_cb(), and reload_config().
|
static |
Definition at line 8701 of file chan_iax2.c.
References __iax2_do_register_s(), and schedule_action.
Referenced by iax2_ack_registry(), and iax2_do_register().
|
static |
Definition at line 9503 of file chan_iax2.c.
References AST_FRAME_IAX, auto_hangup(), chan_iax2_pvt::autoid, iax_ie_data::buf, CACHE_FLAG_TRANSMITTED, iax2_dpcache::exten, iax2_dpcache::flags, iax2_sched_replace(), IAX_COMMAND_DPREQ, iax_ie_append_str(), IAX_IE_CALLED_NUMBER, iaxs, iax_ie_data::pos, and send_command().
Referenced by find_cache(), and socket_process_helper().
|
static |
Definition at line 1575 of file chan_iax2.c.
References ast_calloc, AST_LIST_HEAD, AST_LIST_HEAD_INIT, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_var_assign, ast_var_name(), ast_var_value(), ast_var_t::entries, LOG_ERROR, and NULL.
|
static |
Execute IAX2 dialplan switch.
Definition at line 14504 of file chan_iax2.c.
References ast_copy_string(), AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, AST_MAX_CONTEXT, AST_MAX_EXTENSION, ast_verb, CACHE_FLAG_EXISTS, voicemailpwcheck::context, find_cache(), iax2_dpcache::flags, LOG_NOTICE, LOG_WARNING, NULL, pbx_builtin_getvar_helper(), pbx_exec(), pbx_findapp(), and priority.
|
static |
Part of the IAX2 switch interface.
Definition at line 14435 of file chan_iax2.c.
References AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, CACHE_FLAG_EXISTS, voicemailpwcheck::context, iax2_dpcache::exten, find_cache(), iax2_dpcache::flags, LOG_NOTICE, LOG_WARNING, NULL, and priority.
|
static |
Definition at line 4401 of file chan_iax2.c.
References ast_channel_tech_pvt(), ast_log, ast_mutex_lock, ast_mutex_unlock, iax_frame::callno, iaxs, iaxsl, LOG_WARNING, chan_iax2_pvt::owner, and PTR_TO_CALLNO.
|
static |
Definition at line 2177 of file chan_iax2.c.
References AST_SCHED_DEL, iax_frame_free(), and iax_frame::retrans.
Referenced by __attempt_transmit(), __do_deliver(), __get_from_jb(), complete_transfer(), pvt_destructor(), resend_with_token(), and schedule_delivery().
|
static |
Definition at line 1599 of file chan_iax2.c.
References ast_free, AST_LIST_HEAD, AST_LIST_HEAD_DESTROY, AST_LIST_LOCK, AST_LIST_REMOVE_HEAD, AST_LIST_UNLOCK, and ast_var_t::entries.
const char * iax2_getformatname | ( | iax2_format | format | ) |
iax2 wrapper function for ast_getformatname
Definition at line 1950 of file chan_iax2.c.
References ast_format_compatibility_bitfield2format(), and ast_format_get_name().
Referenced by dump_versioned_codec(), handle_cli_iax2_show_channels(), iax_show_provisioning(), and socket_process_helper().
|
static |
Definition at line 1962 of file chan_iax2.c.
References ao2_ref, ast_format_cap_alloc, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_names(), ast_str_buffer(), and iax2_format_compatibility_bitfield2cap().
Referenced by function_iaxpeer(), handle_cli_iax2_show_peer(), and socket_process_helper().
|
static |
Definition at line 2092 of file chan_iax2.c.
References iax2_peer::addr, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_copy_string(), ast_sockaddr_cmp(), len(), iax2_peer::name, NULL, peer_unref(), and realtime_peer().
Referenced by __find_callno().
|
static |
Definition at line 5884 of file chan_iax2.c.
References iax2_peer::addr, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_sockaddr_cmp(), ast_test_flag64, IAX_TRUNK, and peer_unref().
Referenced by check_access().
|
static |
Definition at line 5377 of file chan_iax2.c.
References ast_channel_hangupcause(), ast_channel_name(), ast_channel_tech_pvt(), ast_channel_tech_pvt_set(), ast_debug, AST_FRAME_IAX, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_sched_add(), ast_test_flag64, ast_verb, iax_ie_data::buf, c, CALLNO_TO_PTR, error(), iax2_destroy(), iax2_predestroy(), IAX_ALREADYGONE, IAX_COMMAND_HANGUP, iax_ie_append_byte(), IAX_IE_CAUSECODE, iaxs, iaxsl, LOG_ERROR, LOG_WARNING, NULL, iax_ie_data::pos, PTR_TO_CALLNO, scheduled_destroy(), and send_command_final().
|
static |
Definition at line 5811 of file chan_iax2.c.
References ast_channel_tech_pvt(), AST_CONTROL_CONNECTED_LINE, AST_CONTROL_HOLD, AST_CONTROL_MASQUERADE_NOTIFY, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_REDIRECTING, AST_CONTROL_UNHOLD, ast_debug, AST_FRAME_CONTROL, ast_moh_start(), ast_moh_stop(), ast_mutex_lock, ast_mutex_unlock, ast_test_flag64, c, chan_iax2_pvt::callno, done, IAX_SENDCONNECTEDLINE, iaxdebug, iaxs, iaxsl, chan_iax2_pvt::mohinterpret, PTR_TO_CALLNO, send_command(), and wait_for_peercallno().
|
static |
Definition at line 1405 of file chan_iax2.c.
References _XXX_AST_CONTROL_T38, AST_CONTROL_ANSWER, AST_CONTROL_AOC, AST_CONTROL_BUSY, AST_CONTROL_CC, AST_CONTROL_CONGESTION, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_END_OF_Q, AST_CONTROL_FLASH, AST_CONTROL_HANGUP, AST_CONTROL_HOLD, AST_CONTROL_INCOMPLETE, AST_CONTROL_MASQUERADE_NOTIFY, AST_CONTROL_MCID, AST_CONTROL_OFFHOOK, AST_CONTROL_OPTION, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_RADIO_KEY, AST_CONTROL_RADIO_UNKEY, AST_CONTROL_READ_ACTION, AST_CONTROL_RECORD_CANCEL, AST_CONTROL_RECORD_MUTE, AST_CONTROL_RECORD_STOP, AST_CONTROL_RECORD_SUSPEND, AST_CONTROL_REDIRECTING, AST_CONTROL_RING, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_STREAM_FORWARD, AST_CONTROL_STREAM_RESTART, AST_CONTROL_STREAM_REVERSE, AST_CONTROL_STREAM_STOP, AST_CONTROL_STREAM_SUSPEND, AST_CONTROL_STREAM_TOPOLOGY_CHANGED, AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, AST_CONTROL_STREAM_TOPOLOGY_SOURCE_CHANGED, AST_CONTROL_T38_PARAMETERS, AST_CONTROL_TAKEOFFHOOK, AST_CONTROL_TRANSFER, AST_CONTROL_UNHOLD, AST_CONTROL_UPDATE_RTP_PEER, AST_CONTROL_VIDUPDATE, and AST_CONTROL_WINK.
Referenced by send_command(), and socket_process_helper().
|
static |
Definition at line 5539 of file chan_iax2.c.
References AST_FRAME_IAX, ast_mutex_lock, ast_mutex_unlock, ast_random(), ast_sched_add(), iax_ie_data::buf, build_ecx_key(), chan_iax2_pvt::callno, iax2_key_rotate(), IAX_COMMAND_RTKEY, IAX_DEBUGDIGEST, iax_ie_append_raw(), IAX_IE_CHALLENGE, iaxsl, chan_iax2_pvt::keyrotateid, md5(), MD5Final(), MD5Init(), MD5Update(), iax_ie_data::pos, and send_command().
Referenced by iax2_key_rotate(), and iax2_send().
|
static |
Acquire the iaxsl[callno] if call exists and not having ongoing hangup.
callno | Call number to lock. |
0 | If call disappeared or has ongoing hangup procedure. |
1 | If call found and mutex is locked. |
Definition at line 1745 of file chan_iax2.c.
References ast_debug, ast_mutex_lock, ast_mutex_unlock, iax2_thread::callno, iaxs, and iaxsl.
Referenced by __send_lagrq(), and __send_ping().
|
static |
Definition at line 1381 of file chan_iax2.c.
References ast_channel_trylock, DEADLOCK_AVOIDANCE, iaxs, and iaxsl.
Referenced by iax2_queue_frame(), iax2_queue_hangup(), iax2_queue_hold(), iax2_queue_unhold(), set_hangup_source_and_cause(), and socket_process_helper().
|
static |
Part of the IAX2 Switch interface.
Definition at line 14481 of file chan_iax2.c.
References AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, CACHE_FLAG_MATCHMORE, voicemailpwcheck::context, iax2_dpcache::exten, find_cache(), iax2_dpcache::flags, LOG_NOTICE, LOG_WARNING, NULL, and priority.
|
static |
Definition at line 1976 of file chan_iax2.c.
References ao2_cleanup, ao2_ref, ast_format_cap_alloc, ast_format_cap_count(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_format(), ast_format_cap_get_format_framing(), ast_format_cap_update_by_allow_disallow(), iax2_codec_pref_append(), iax2_codec_pref_remove_missing(), iax2_codec_pref_to_cap(), and iax2_format_compatibility_cap2bitfield().
Referenced by build_peer(), build_user(), and set_config().
|
static |
Definition at line 12517 of file chan_iax2.c.
References __iax2_poke_noanswer(), peer_unref(), iax2_peer::pokeexpire, and schedule_action.
Referenced by iax2_poke_peer().
|
static |
Definition at line 12538 of file chan_iax2.c.
References add_empty_calltoken_ie(), iax2_peer::addr, AST_FRAME_IAX, ast_log, ast_mutex_lock, ast_mutex_unlock, AST_SCHED_DEL, ast_sockaddr_isnull(), iax_ie_data::buf, iax2_peer::callno, iax2_peer::dnsmgr, find_callno(), iax2_peer::historicms, iax2_destroy(), iax2_poke_noanswer(), iax2_sched_add(), IAX_COMMAND_POKE, iaxs, iaxsl, iax2_peer::lastms, LOG_NOTICE, LOG_WARNING, MAX_RETRY_TIME, iax2_peer::maxms, MIN, iax2_peer::name, NEW_FORCE, peer_ref(), peer_unref(), chan_iax2_pvt::peerpoke, chan_iax2_pvt::pingtime, iax2_peer::pokeexpire, iax2_peer::pokefreqnotok, iax2_peer::pokefreqok, iax_ie_data::pos, send_command(), and iax2_peer::sockfd.
Referenced by __iax2_poke_peer_s(), iax2_poke_peer_cb(), poke_all_peers(), reg_source_db(), and update_registry().
|
static |
Definition at line 12529 of file chan_iax2.c.
References iax2_poke_peer().
Referenced by load_module().
|
static |
Definition at line 9540 of file chan_iax2.c.
References __iax2_poke_peer_s(), iax2_peer::pokeexpire, and schedule_action.
Referenced by __iax2_poke_noanswer(), and socket_process_helper().
|
static |
Definition at line 3483 of file chan_iax2.c.
References ast_channel_tech_pvt_set(), ast_module_unref, ast_set_flag64, ast_test_flag64, c, chan_iax2_pvt::callno, iax2_destroy_helper(), iax2_queue_hangup(), IAX_ALREADYGONE, iaxs, NULL, chan_iax2_pvt::owner, and ast_module_info::self.
Referenced by iax2_hangup(), and send_command_final().
|
static |
Definition at line 12161 of file chan_iax2.c.
References ast_atomic_fetchadd_int(), ast_cond_timedwait, ast_cond_wait, AST_LIST_LOCK, AST_LIST_REMOVE, AST_LIST_UNLOCK, ast_mutex_lock, ast_mutex_unlock, ast_samp2tv(), ast_tvadd(), ast_tvnow(), handle_deferred_full_frames(), iax2_process_thread_cleanup(), IAX_IOSTATE_IDLE, IAX_IOSTATE_PROCESSING, IAX_IOSTATE_READY, IAX_IOSTATE_SCHEDREADY, IAX_THREAD_TYPE_DYNAMIC, iaxactivethreadcount, iaxdynamicthreadcount, insert_idle_thread(), iax2_thread::list, NULL, signal_condition(), socket_process(), and thread.
Referenced by find_idle_thread(), and start_network_thread().
|
static |
Definition at line 12149 of file chan_iax2.c.
References ast_atomic_dec_and_test(), ast_cond_destroy, ast_free, ast_mutex_destroy, iaxactivethreadcount, and thread.
Referenced by iax2_process_thread().
|
static |
Definition at line 12368 of file chan_iax2.c.
References ast_debug, AST_FRAME_IAX, ast_mutex_unlock, ast_set_flag64, ast_sockaddr_copy(), auto_hangup(), chan_iax2_pvt::autoid, iax_ie_data::buf, create_addr(), end, find_callno_locked(), iax2_sched_replace(), IAX_COMMAND_PROVISION, iax_ie_append_raw(), IAX_IE_PROVISIONING, IAX_PROVISION, iax_provision_build(), iaxs, iaxsl, NEW_FORCE, NULL, iax_ie_data::pos, send_command(), and create_addr_info::sockfd.
Referenced by check_provisioning(), handle_cli_iax2_provision(), and iax2_prov_app().
|
static |
Definition at line 8852 of file chan_iax2.c.
References ast_system_publish_registry(), and status.
Referenced by iax2_ack_registry(), and socket_process_helper().
|
static |
Definition at line 5516 of file chan_iax2.c.
References ast_channel_tech_pvt(), ast_mutex_lock, ast_mutex_unlock, AST_OPTION_SECURE_MEDIA, AST_OPTION_SECURE_SIGNALING, ast_test_flag64, c, chan_iax2_pvt::callno, IAX_FORCE_ENCRYPT, iaxs, iaxsl, and PTR_TO_CALLNO.
|
static |
Queue a frame to a call's owning asterisk channel.
Definition at line 3300 of file chan_iax2.c.
References ast_channel_unlock, ast_queue_frame(), chan_iax2_pvt::callno, iax2_lock_owner(), iaxs, and chan_iax2_pvt::owner.
Referenced by __attempt_transmit(), __auto_congest(), __do_deliver(), __get_from_jb(), and socket_process_helper().
|
static |
Queue a hangup frame on the ast_channel owner.
This function queues a hangup frame on the owner of the IAX2 pvt struct that is active for the given call number.
Definition at line 3369 of file chan_iax2.c.
References ast_channel_unlock, ast_queue_hangup(), chan_iax2_pvt::callno, iax2_lock_owner(), iaxs, and chan_iax2_pvt::owner.
Referenced by iax2_predestroy().
|
static |
Queue a hold frame on the ast_channel owner.
This function queues a hold frame on the owner of the IAX2 pvt struct that is active for the given call number.
Definition at line 3323 of file chan_iax2.c.
References ast_channel_unlock, ast_queue_hold(), chan_iax2_pvt::callno, iax2_lock_owner(), iaxs, and chan_iax2_pvt::owner.
Referenced by socket_process_helper().
|
static |
Queue an unhold frame on the ast_channel owner.
This function queues an unhold frame on the owner of the IAX2 pvt struct that is active for the given call number.
Definition at line 3346 of file chan_iax2.c.
References ast_channel_unlock, ast_queue_unhold(), chan_iax2_pvt::callno, iax2_lock_owner(), iaxs, and chan_iax2_pvt::owner.
Referenced by socket_process_helper().
|
static |
|
static |
Definition at line 8966 of file chan_iax2.c.
References ast_copy_string(), ast_log, copy(), hostname, iax2_append_register(), LOG_WARNING, NULL, iax2_registry::secret, strsep(), iax2_registry::username, and value.
Referenced by set_config().
|
static |
Definition at line 12629 of file chan_iax2.c.
References ao2_ref, AST_CAUSE_CONGESTION, AST_CAUSE_UNREGISTERED, ast_channel_callid_set(), ast_channel_lock, ast_channel_name(), ast_channel_nativeformats(), ast_channel_nativeformats_set(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_unlock, ast_copy_flags64, ast_format_cap_alloc, ast_format_cap_append, ast_format_cap_count(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_compatible(), ast_format_cap_get_format(), ast_format_cap_get_names(), AST_FORMAT_CAP_NAMES_LEN, ast_hangup(), ast_iax2_new(), ast_log, ast_mutex_unlock, ast_parse_arg(), ast_read_threadstorage_callid(), ast_sockaddr_set_port, AST_STATE_DOWN, ast_str_alloca, ast_strdupa, ast_string_field_set, ast_strlen_zero(), ast_test_flag64, ast_translator_best_choice(), c, create_addr_info::capability, create_addr(), find_callno_locked(), create_addr_info::found, globalflags, iax2_capability, IAX_NOTRANSFER, iax_pvt_callid_set(), IAX_RECVCONNECTEDLINE, IAX_SENDANI, IAX_SENDCONNECTEDLINE, IAX_TRANSFERMEDIA, IAX_TRUNK, IAX_USEJITTERBUF, iaxs, iaxsl, LOG_WARNING, make_trunk(), chan_iax2_pvt::maxtime, create_addr_info::maxtime, NEW_FORCE, NULL, parse_dial_string(), PARSE_IN_RANGE, PARSE_UINT32, parsed_dial_string::peer, parsed_dial_string::port, create_addr_info::prefs, and create_addr_info::sockfd.
|
static |
Definition at line 1733 of file chan_iax2.c.
References ast_sched_add().
Referenced by __attempt_transmit(), __find_callno(), __iax2_poke_noanswer(), __send_lagrq(), __send_ping(), iax2_call(), iax2_destroy_helper(), iax2_poke_peer(), make_trunk(), network_change_stasis_cb(), realtime_peer(), reg_source_db(), sched_delay_remove(), socket_process_helper(), transmit_frame(), and update_registry().
|
static |
Definition at line 1727 of file chan_iax2.c.
References ast_sched_replace().
Referenced by auth_fail(), iax2_ack_registry(), iax2_do_register(), iax2_dprequest(), iax2_provision(), and update_jbsched().
|
static |
Definition at line 6643 of file chan_iax2.c.
References chan_iax2_pvt::addr, iax_frame::af, iax_frame::afdatalen, chan_iax2_pvt::aseqno, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_compatibility_bitfield2format(), ast_format_compatibility_format2bitfield(), AST_FRAME_IAX, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_log, ast_test_flag64, calc_timestamp(), chan_iax2_pvt::callno, ast_iax2_mini_hdr::callno, ast_iax2_video_hdr::callno, iax_frame::callno, compress_subclass(), ast_iax2_full_hdr::csub, iax_frame::data, ast_frame::data, iax_frame::datalen, ast_frame::datalen, ast_iax2_full_hdr::dcallno, iax_frame::dcallno, DIRECTION_OUTGRESS, chan_iax2_pvt::ecx, iax_frame::ecx, chan_iax2_pvt::encmethods, iax_frame::encmethods, encrypt_frame(), iax_frame::final, chan_iax2_pvt::first_iax_message, ast_frame_subclass::format, ast_frame_subclass::frame_ending, ast_frame::frametype, iax2_key_rotate(), iax2_transmit(), iax2_trunk_queue(), IAX_CALLENCRYPTED, IAX_COMMAND_ACK, IAX_ENCRYPTED, IAX_FLAG_FULL, iax_frame_new(), iax_frame_wrap(), IAX_KEYPOPULATED, iax_outputframe(), IAX_TRUNK, ast_frame_subclass::integer, chan_iax2_pvt::iseqno, ast_iax2_full_hdr::iseqno, iax_frame::iseqno, chan_iax2_pvt::keyrotateid, chan_iax2_pvt::last_iax_message, chan_iax2_pvt::lastsent, chan_iax2_pvt::lastvsent, LOG_NOTICE, LOG_WARNING, MARK_IAX_SUBCLASS_TX, MAX_RETRY_TIME, MIN_RETRY_TIME, chan_iax2_pvt::mydcx, iax_frame::mydcx, NULL, chan_iax2_pvt::oseqno, ast_iax2_full_hdr::oseqno, iax_frame::oseqno, chan_iax2_pvt::peercallno, chan_iax2_pvt::pingtime, ast_frame::ptr, iax_frame::retries, iax_frame::retrytime, ast_iax2_full_hdr::scallno, chan_iax2_pvt::semirand, iax_frame::semirand, send_packet(), ast_frame::subclass, chan_iax2_pvt::svideoformat, chan_iax2_pvt::svoiceformat, chan_iax2_pvt::transfer, transfer(), iax_frame::transfer, TRANSFER_MEDIAPASS, chan_iax2_pvt::transfercallno, chan_iax2_pvt::transferring, ast_iax2_full_hdr::ts, ast_iax2_mini_hdr::ts, ast_iax2_video_hdr::ts, iax_frame::ts, ast_iax2_full_hdr::type, and ast_iax2_video_hdr::zeros.
Referenced by __send_command(), iax2_write(), send_signaling(), and socket_process_helper().
|
static |
Definition at line 4396 of file chan_iax2.c.
References ast_channel_tech_pvt(), AST_FRAME_HTML, c, iax_frame::data, iax_frame::datalen, PTR_TO_CALLNO, and send_command_locked().
|
static |
Definition at line 4391 of file chan_iax2.c.
References ast_channel_tech_pvt(), AST_FRAME_IMAGE, c, ast_frame::data, ast_frame::datalen, ast_frame_subclass::integer, ast_frame::ptr, PTR_TO_CALLNO, send_command_locked(), and ast_frame::subclass.
|
static |
Definition at line 4384 of file chan_iax2.c.
References ast_channel_tech_pvt(), AST_FRAME_TEXT, c, PTR_TO_CALLNO, send_command_locked(), and text.
|
static |
Definition at line 5444 of file chan_iax2.c.
References ast_channel_tech_pvt(), ast_clear_flag64, AST_CONTROL_OPTION, AST_FRAME_CONTROL, ast_free, ast_malloc, ast_mutex_lock, ast_mutex_unlock, AST_OPTION_AUDIO_MODE, AST_OPTION_DIGIT_DETECT, AST_OPTION_FAX_DETECT, AST_OPTION_FLAG_REQUEST, AST_OPTION_OPRMODE, AST_OPTION_RELAXDTMF, AST_OPTION_RXGAIN, AST_OPTION_SECURE_MEDIA, AST_OPTION_SECURE_SIGNALING, AST_OPTION_TDD, AST_OPTION_TONE_VERIFY, AST_OPTION_TXGAIN, ast_set_flag64, c, chan_iax2_pvt::callno, ast_option_header::data, errno, IAX_FORCE_ENCRYPT, iaxs, iaxsl, PTR_TO_CALLNO, send_command_locked(), and wait_for_peercallno().
|
static |
Definition at line 5864 of file chan_iax2.c.
References ast_channel_name(), ast_channel_tech_pvt(), AST_CONTROL_TRANSFER, ast_copy_string(), ast_debug, AST_FRAME_IAX, ast_queue_control_data(), AST_TRANSFER_SUCCESS, iax_ie_data::buf, c, chan_iax2_pvt::callno, voicemailpwcheck::context, IAX_COMMAND_TRANSFER, iax_ie_append_str(), IAX_IE_CALLED_CONTEXT, IAX_IE_CALLED_NUMBER, iax_ie_data::pos, PTR_TO_CALLNO, send_command_locked(), and tmp().
|
static |
Definition at line 4367 of file chan_iax2.c.
References ast_taskprocessor_push(), iax_frame::sentyet, transmit_frame(), and transmit_processor.
Referenced by iax2_send().
|
inlinestatic |
Definition at line 9594 of file chan_iax2.c.
References iax2_trunk_peer::trunkact.
Referenced by timing_read().
|
static |
Definition at line 6360 of file chan_iax2.c.
References iax2_trunk_peer::addr, chan_iax2_pvt::addr, iax_frame::af, ast_debug, ast_log, ast_mutex_unlock, ast_realloc, ast_sockaddr_stringify(), ast_test_flag64, ast_tvnow(), chan_iax2_pvt::callno, ast_iax2_mini_hdr::callno, ast_iax2_meta_trunk_entry::callno, iax2_trunk_peer::calls, ast_frame::data, ast_frame::datalen, DEFAULT_TRUNKDATA, find_tpeer(), global_max_trunk_mtu, globalflags, IAX2_TRUNK_PREFACE, IAX_TRUNKTIMESTAMPS, ast_iax2_meta_trunk_entry::len, ast_iax2_meta_trunk_mini::len, iax2_trunk_peer::lock, LOG_WARNING, ast_iax2_meta_trunk_mini::mini, ast_frame::ptr, send_trunk(), chan_iax2_pvt::sockfd, tmp(), trunk_maxmtu, trunk_untimed, iax2_trunk_peer::trunkdata, iax2_trunk_peer::trunkdataalloc, iax2_trunk_peer::trunkdatalen, trunkmaxsize, ast_iax2_mini_hdr::ts, and iax_frame::ts.
Referenced by iax2_send().
|
static |
Definition at line 9515 of file chan_iax2.c.
References AST_FRAME_IAX, IAX_COMMAND_VNAK, iaxs, NULL, and send_command_immediate().
Referenced by socket_process_helper(), and socket_process_meta().
|
static |
Definition at line 7783 of file chan_iax2.c.
References ast_channel_tech_pvt(), ast_debug, AST_FRAME_NULL, AST_FRAME_VOICE, ast_mutex_lock, ast_mutex_unlock, ast_test_flag, ast_test_flag64, c, iax2_peer::callno, errno, error(), ast_frame::frametype, iax2_send(), IAX_ALREADYGONE, IAX_QUELCH, IAX_STATE_STARTED, iaxs, iaxsl, and PTR_TO_CALLNO.
|
static |
Definition at line 1245 of file chan_iax2.c.
References ast_verbose(), and iaxdebug.
Referenced by load_module().
|
static |
Definition at line 1251 of file chan_iax2.c.
References ast_log, and LOG_WARNING.
Referenced by load_module().
|
static |
Definition at line 1227 of file chan_iax2.c.
References ast_sockaddr_cmp_addr(), ast_sockaddr_isnull(), ast_sockaddr_port, debugaddr, iax_showframe(), and iaxdebug.
Referenced by iax2_send(), raw_hangup(), send_apathetic_reply(), send_packet(), and socket_process_helper().
|
static |
Definition at line 1175 of file chan_iax2.c.
References chan_iax2_pvt::callid, chan_iax2_pvt::callno, and iaxs.
Referenced by socket_process_helper().
|
static |
Definition at line 1185 of file chan_iax2.c.
References AST_CALLID_BUFFER_LENGTH, ast_callid_strnprint(), ast_create_callid(), chan_iax2_pvt::callid, chan_iax2_pvt::callno, and iax_pvt_callid_set().
Referenced by socket_process_helper().
|
static |
Definition at line 1180 of file chan_iax2.c.
References chan_iax2_pvt::callid, chan_iax2_pvt::callno, and iaxs.
Referenced by iax2_request(), and iax_pvt_callid_new().
Definition at line 2333 of file chan_iax2.c.
References iax_frame::af, iax_frame::afdatalen, iax_frame::cacheable, ast_frame::datalen, DIRECTION_INGRESS, iax_frame_new(), iax_frame_wrap(), and NULL.
Referenced by socket_process_helper(), and socket_process_meta().
|
static |
Definition at line 1617 of file chan_iax2.c.
References AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_UNLOCK, IAX_THREAD_TYPE_DYNAMIC, and thread.
Referenced by iax2_process_thread().
|
static |
Definition at line 6443 of file chan_iax2.c.
References aes_key::raw.
Referenced by authenticate_reply().
|
static |
Definition at line 1280 of file chan_iax2.c.
References args, ast_verbose(), and buf.
Referenced by handle_cli_iax2_set_debug_jb().
|
static |
Definition at line 1256 of file chan_iax2.c.
References args, ast_log, buf, and LOG_ERROR.
Referenced by handle_cli_iax2_set_debug_jb(), and load_module().
|
static |
Definition at line 1268 of file chan_iax2.c.
References args, ast_log, buf, and LOG_WARNING.
Referenced by handle_cli_iax2_set_debug_jb(), and load_module().
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 14993 of file chan_iax2.c.
References __unload_module(), ao2_callback, ao2_ref, ARRAY_LEN, ast_channel_register(), ast_cli_register_multiple, ast_custom_function_register, ast_format_cap_alloc, ast_format_cap_append_by_type(), AST_FORMAT_CAP_FLAG_DEFAULT, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_manager_register_xml, AST_MEDIA_TYPE_UNKNOWN, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_mutex_init, ast_netsock_init(), ast_netsock_list_alloc(), ast_random(), ast_realtime_require_field(), ast_register_application_xml, ast_register_switch(), ast_sched_context_create(), ast_sched_context_destroy(), ast_sched_start_thread(), ast_timer_close(), ast_timer_open(), ast_timer_set_rate(), ast_verb, ast_channel_tech::capabilities, cli_iax2, config, EVENT_FLAG_REPORTING, EVENT_FLAG_SYSTEM, iax2_do_register(), iax2_poke_peer_cb(), iax2_prov_app(), iax2_switch, iax2_tech, iax_debug_output(), iax_error_output(), iax_firmware_reload(), iax_provision_reload(), iax_set_error(), iax_set_output(), iaxpeer_function, iaxs, iaxsl, iaxvar_function, io, io_context_create(), io_context_destroy(), jb_error_output(), jb_setoutput(), jb_warning_output(), load_objects(), LOG_ERROR, manager_iax2_show_netstats(), manager_iax2_show_peer_list(), manager_iax2_show_peers(), manager_iax2_show_registry(), netsock, network_change_stasis_subscribe(), NULL, outsock, papp, peer_set_sock_cb(), randomcalltokendata, RQ_CHAR, RQ_UINTEGER2, SENTINEL, set_config(), start_network_thread(), timer, and trunkfreq.
|
static |
Definition at line 14900 of file chan_iax2.c.
References addr_range_cmp_cb(), addr_range_hash_cb(), AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_ref, ast_taskprocessor_get(), callno_limits, calltoken_ignores, create_callno_pools(), IAX_MAX_CALLS, iax_peercallno_pvts, iax_transfercallno_pvts, MAX_PEER_BUCKETS, MAX_USER_BUCKETS, NULL, peer_cmp_cb(), peer_hash_cb(), peercnt_cmp_cb(), peercnt_hash_cb(), peercnts, pvt_cmp_cb(), pvt_hash_cb(), TPS_REF_DEFAULT, transfercallno_pvt_cmp_cb(), transfercallno_pvt_hash_cb(), transmit_processor, user_cmp_cb(), and user_hash_cb().
Referenced by load_module().
|
static |
Definition at line 9811 of file chan_iax2.c.
References ast_channel_name(), ast_debug, ast_mutex_lock, ast_mutex_unlock, ast_test_flag64, dpreq_data::callno, jb_info::current, iax_rr::delay, iax_rr::dropped, jb_info::frames_dropped, jb_info::frames_in, jb_info::frames_lost, jb_info::frames_ooo, IAX_USEJITTERBUF, iaxs, iaxsl, jb_getinfo(), jb_info::jitter, iax_rr::losscnt, iax_rr::losspct, jb_info::losspct, jb_info::min, iax_rr::ooo, iax_rr::packets, and chan_iax2_pvt::remote_rr.
Referenced by socket_process_helper().
|
static |
Definition at line 2380 of file chan_iax2.c.
References ast_debug, ast_log, ast_mutex_lock, ast_mutex_unlock, AST_SCHED_DEL, chan_iax2_pvt::callno, iax_frame::callno, chan_iax2_pvt::callno_entry, CALLNO_ENTRY_GET_CALLNO, CALLNO_ENTRY_IS_VALIDATED, CALLNO_ENTRY_TO_PTR, CALLNO_TYPE_TRUNK, get_unused_callno(), iax2_sched_add(), iaxs, iaxsl, chan_iax2_pvt::lagid, lagrq_time, LOG_WARNING, MIN_REUSE_TIME, NULL, iax_frame::oseqno, ping_time, chan_iax2_pvt::pingid, replace_callno(), send_lagrq(), send_ping(), and TRUNK_CALL_START.
Referenced by iax2_request(), and socket_process_helper().
|
static |
Definition at line 7298 of file chan_iax2.c.
References ast_cli_netstats(), astman_append(), and RESULT_SUCCESS.
Referenced by load_module().
|
static |
callback to display iax peers in manager format
Definition at line 7367 of file chan_iax2.c.
References _iax2_show_peers_one(), ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_strlen_zero(), astman_get_header(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), show_peers_context::havepattern, show_peers_context::idtext, NULL, peer_unref(), RESULT_SUCCESS, and show_peers_context::total_peers.
Referenced by load_module().
|
static |
callback to display iax peers in manager
Definition at line 7345 of file chan_iax2.c.
References __iax2_show_peers(), a, ast_strlen_zero(), astman_get_header(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), and total.
Referenced by load_module().
|
static |
Definition at line 7469 of file chan_iax2.c.
References iax2_registry::addr, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_strlen_zero(), astman_append(), astman_get_header(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), iax2_registry::dnsmgr, NULL, iax2_registry::refresh, iax2_registry::regstate, regstate2str(), total, iax2_registry::us, and iax2_registry::username.
Referenced by load_module().
|
static |
Definition at line 2362 of file chan_iax2.c.
References chan_iax2_pvt::addr, ast_sockaddr_cmp(), chan_iax2_pvt::callno, iax_frame::callno, iax_frame::dcallno, chan_iax2_pvt::peercallno, chan_iax2_pvt::transfer, TRANSFER_MEDIAPASS, chan_iax2_pvt::transfercallno, and chan_iax2_pvt::transferring.
Referenced by __find_callno(), aco_process_config(), action_listcategories(), ast_category_insert(), ast_cdr_generic_unregister(), ast_msg_handler_register(), ast_msg_handler_unregister(), ast_msg_tech_register(), ast_msg_tech_unregister(), ast_namedgroups_intersect(), ast_parse_device_state(), ast_refer_tech_register(), ast_refer_tech_unregister(), ast_sched_clean_by_callback(), ast_srtp_add_stream(), ast_srtp_change_source(), ast_variable_delete(), ast_variable_retrieve(), ast_variable_update(), ast_xml_doc_item_cmp(), check_blacklist(), cli_print_body(), cli_show_module_options(), cli_show_module_type(), common_identify(), detect_callback(), does_category_match(), filter_cmp_fn(), find_command(), find_option_cb(), generic_mute_unmute_helper(), get_device_state_causing_channels(), handle_updates(), has_destination_cb(), help1(), help_workhorse(), internal_aco_type_category_check(), internal_aco_type_find(), internal_ao2_traverse(), kick_conference_participant(), lua_find_extension(), namedgroup_match(), pbx_find_extension(), pvt_cmp_cb(), read_dirs_cb(), realtime_switch_common(), scan_exec(), skel_level_cmp(), test_item_cmp(), transfercallno_pvt_cmp_cb(), xmldoc_attribute_match(), xmldoc_get_syntax_config_object(), and xmpp_config_cmp().
|
static |
Definition at line 6475 of file chan_iax2.c.
References ast_aes_decrypt(), ast_log, len(), and LOG_WARNING.
Referenced by decode_frame().
|
static |
Definition at line 6499 of file chan_iax2.c.
References ast_aes_encrypt(), ast_log, len(), and LOG_WARNING.
Referenced by encrypt_frame().
|
static |
Definition at line 8136 of file chan_iax2.c.
References chan_iax2_pvt::encmethods, IAX_ENCRYPT_AES128, IAX_ENCRYPT_KEYROTATE, and chan_iax2_pvt::keyrotateid.
Referenced by authenticate_reply(), and socket_process_helper().
|
static |
Definition at line 1531 of file chan_iax2.c.
References AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, iax2_do_register(), and network_change_sched_id.
Referenced by network_change_stasis_cb().
|
static |
Definition at line 1544 of file chan_iax2.c.
References ast_network_change_type(), ast_verb, iax2_sched_add(), network_change_sched_cb(), network_change_sched_id, NULL, and stasis_message_type().
Referenced by network_change_stasis_subscribe().
|
static |
Definition at line 1501 of file chan_iax2.c.
References ast_network_change_type(), ast_system_topic(), network_change_stasis_cb(), network_change_sub, NULL, stasis_subscribe, stasis_subscription_accept_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, and stasis_subscription_set_filter().
Referenced by load_module(), and set_config().
|
static |
Definition at line 1511 of file chan_iax2.c.
References network_change_sub, and stasis_unsubscribe_and_join().
Referenced by __unload_module(), and set_config().
|
static |
Definition at line 12746 of file chan_iax2.c.
References ast_io_add(), AST_IO_IN, AST_IO_PRI, ast_io_wait(), ast_log, ast_timer_fd(), errno, io, LOG_ERROR, NULL, timer, and timing_read().
Referenced by start_network_thread().
|
static |
Definition at line 2290 of file chan_iax2.c.
References ao2_alloc, ao2_ref, AST_LIST_HEAD_INIT_NOLOCK, ast_string_field_init, ast_string_field_set, chan_iax2_pvt::exten, chan_iax2_pvt::host, jb_new(), jb_setconf(), jittertargetextra, jb_conf::max_contig_interp, jb_conf::max_jitterbuf, maxjitterbuffer, maxjitterinterps, NULL, prefs_global, pvt_destructor(), jb_conf::resync_threshold, resyncthreshold, jb_conf::target_extra, and tmp().
Referenced by __find_callno().
|
static |
Parses an IAX dial string into its component parts.
data | the string to be parsed |
pds | pointer to a struct parsed_dial_string to be filled in |
This function parses the string and fills the structure with pointers to its component parts. The input string will be modified.
[username[:password]@]peer[:port][/exten[@context]][/options]
Definition at line 5092 of file chan_iax2.c.
References ast_debug, ast_strip_quoted(), ast_strlen_zero(), parsed_dial_string::context, parsed_dial_string::exten, parsed_dial_string::key, NULL, parsed_dial_string::options, parsed_dial_string::password, parsed_dial_string::peer, parsed_dial_string::port, strsep(), and parsed_dial_string::username.
Referenced by cache_get_callno_locked(), iax2_call(), iax2_devicestate(), and iax2_request().
|
static |
Definition at line 2020 of file chan_iax2.c.
References CMP_MATCH, CMP_STOP, iax2_peer::flags, name, iax2_peer::name, and OBJ_KEY.
Referenced by load_objects().
|
static |
Definition at line 13554 of file chan_iax2.c.
References ast_set_flag64, and IAX_DELME.
Referenced by delete_users().
|
static |
Definition at line 12939 of file chan_iax2.c.
References iax2_peer::acl, ast_dnsmgr_release(), ast_endpoint_shutdown(), ast_free_acl_list(), ast_mutex_lock, ast_mutex_unlock, ast_mwi_unsubscribe(), ast_string_field_free_memory, iax2_peer::callno, iax2_peer::dnsmgr, iax2_peer::endpoint, iax2_destroy(), iaxsl, iax2_peer::mwi_event_sub, and register_peer_exten().
Referenced by build_peer().
|
static |
Definition at line 2009 of file chan_iax2.c.
References ast_str_hash(), iax2_peer::flags, name, iax2_peer::name, and OBJ_KEY.
Referenced by load_objects().
Definition at line 2069 of file chan_iax2.c.
References ao2_ref.
Referenced by __iax2_poke_noanswer(), handle_cli_iax2_prune_realtime(), handle_cli_iax2_unregister(), iax2_poke_peer(), realtime_peer(), reg_source_db(), socket_process_helper(), and update_registry().
|
static |
Definition at line 14854 of file chan_iax2.c.
References defaultsockfd, and iax2_peer::sockfd.
Referenced by load_module().
|
static |
Parse the "sourceaddress" value, lookup in netsock list and set peer's sockfd. Defaults to defaultsockfd if not found.
Definition at line 12869 of file chan_iax2.c.
References AST_AF_UNSPEC, ast_debug, ast_get_ip(), ast_log, ast_netsock_bind(), ast_netsock_find(), ast_netsock_sockfd(), ast_netsock_unref(), ast_sockaddr_parse(), ast_sockaddr_set_port, ast_sockaddr_split_hostport(), ast_strdupa, check_srcaddr(), defaultsockfd, IAX_DEFAULT_PORTNO, io, LOG_WARNING, iax2_peer::name, netsock, NULL, outsock, qos, socket_read(), iax2_peer::sockfd, ast_netsock::sockfd, ast_sockaddr::ss, and tmp().
Referenced by build_peer().
|
static |
peer_status: Report Peer status in character string
Definition at line 3839 of file chan_iax2.c.
References ast_copy_string(), iax2_peer::lastms, iax2_peer::maxms, and status.
Referenced by _iax2_show_peers_one(), function_iaxpeer(), and handle_cli_iax2_show_peer().
Definition at line 2075 of file chan_iax2.c.
Referenced by __expire_registry(), __iax2_poke_noanswer(), __iax2_poke_peer_s(), __iax2_show_peers(), authenticate_reply(), build_peer(), calltoken_required(), complete_iax2_peers(), complete_iax2_unregister(), create_addr(), function_iaxpeer(), handle_cli_iax2_prune_realtime(), handle_cli_iax2_show_peer(), handle_cli_iax2_unregister(), iax2_devicestate(), iax2_getpeername(), iax2_getpeertrunk(), iax2_poke_noanswer(), iax2_poke_peer(), manager_iax2_show_peer_list(), poke_all_peers(), prune_peers(), realtime_peer(), reg_source_db(), register_verify(), registry_authrequest(), requirecalltoken_mark_auto(), set_config(), socket_process_helper(), unlink_peer(), and update_registry().
|
static |
Definition at line 2678 of file chan_iax2.c.
References peercnt::addr, ao2_alloc, ao2_find, ao2_link, ao2_lock, ao2_ref, ao2_unlock, ast_debug, ast_log, ast_sockaddr_copy(), ast_sockaddr_stringify_addr(), peercnt::cur, peercnt::limit, LOG_ERROR, NULL, OBJ_POINTER, peercnts, set_peercnt_limit(), and tmp().
Referenced by __find_callno(), and complete_transfer().
|
static |
Definition at line 2516 of file chan_iax2.c.
References peercnt::addr, ast_sockaddr_cmp_addr(), CMP_MATCH, and CMP_STOP.
Referenced by load_objects().
|
static |
Definition at line 2506 of file chan_iax2.c.
References peercnt::addr, ast_sockaddr_hash(), and ast_sockaddr_isnull().
Referenced by load_objects().
|
static |
Definition at line 2650 of file chan_iax2.c.
References ao2_find, ao2_ref, ast_debug, ast_sockaddr_copy(), ast_sockaddr_stringify_addr(), peercnt::limit, OBJ_POINTER, peercnts, peercnt::reg, set_peercnt_limit(), and tmp().
Referenced by __expire_registry(), build_peer(), and update_registry().
|
static |
Definition at line 2729 of file chan_iax2.c.
References peercnt::addr, ao2_lock, ao2_unlink, ao2_unlock, ast_debug, ast_sockaddr_copy(), ast_sockaddr_stringify_addr(), peercnt::cur, and peercnts.
Referenced by peercnt_remove_by_addr(), and peercnt_remove_cb().
|
static |
Definition at line 2769 of file chan_iax2.c.
References peercnt::addr, ao2_find, ao2_ref, ast_sockaddr_copy(), OBJ_POINTER, peercnt_remove(), peercnts, and tmp().
Referenced by __find_callno(), and complete_transfer().
|
static |
Definition at line 2755 of file chan_iax2.c.
References ao2_ref, and peercnt_remove().
Referenced by __unload_module(), and sched_delay_remove().
|
static |
Definition at line 14171 of file chan_iax2.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, iax2_poke_peer(), and peer_unref().
Referenced by reload_config().
|
static |
Definition at line 2639 of file chan_iax2.c.
References CMP_MATCH, and addr_range::delme.
Referenced by reload_config().
|
static |
Definition at line 13617 of file chan_iax2.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_test_flag64, IAX_DELME, IAX_RTCACHEFRIENDS, peer_unref(), and unlink_peer().
Referenced by handle_cli_iax2_prune_realtime(), and reload_config().
|
static |
Definition at line 13601 of file chan_iax2.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_unlink, ast_test_flag64, IAX_DELME, IAX_RTCACHEFRIENDS, user, and user_unref().
Referenced by handle_cli_iax2_prune_realtime(), and reload_config().
|
static |
Definition at line 14871 of file chan_iax2.c.
References CMP_MATCH, CMP_STOP, chan_iax2_pvt::frames_received, and match().
Referenced by load_objects().
|
static |
Definition at line 2243 of file chan_iax2.c.
References chan_iax2_pvt::addr, AST_LIST_REMOVE_HEAD, AST_LIST_TRAVERSE, ast_mutex_lock, ast_mutex_unlock, ast_set_flag64, ast_string_field_free_memory, ast_variables_destroy(), iax2_registry::callno, chan_iax2_pvt::callno, chan_iax2_pvt::callno_entry, jb_frame::data, frame_queue, free_signaling_queue_entry(), iax2_destroy_helper(), iax2_frame_free(), IAX_ALREADYGONE, iaxsl, chan_iax2_pvt::jb, jb_destroy(), jb_getall(), JB_OK, signaling_queue_entry::next, NULL, chan_iax2_pvt::owner, chan_iax2_pvt::reg, iax_frame::retries, sched_delay_remove(), chan_iax2_pvt::signaling_queue, and chan_iax2_pvt::vars.
Referenced by new_iax().
|
static |
Definition at line 14864 of file chan_iax2.c.
References chan_iax2_pvt::peercallno.
Referenced by load_objects().
|
static |
All frames other than that of type AST_FRAME_IAX must be held until we have received a destination call number.
Definition at line 2218 of file chan_iax2.c.
References ast_calloc, AST_FRAME_IAX, AST_LIST_INSERT_TAIL, ast_malloc, ast_frame::data, ast_frame::datalen, signaling_queue_entry::f, ast_frame::frametype, free_signaling_queue_entry(), chan_iax2_pvt::hold_signaling, signaling_queue_entry::next, ast_frame::ptr, and chan_iax2_pvt::signaling_queue.
Referenced by __send_command().
|
static |
Definition at line 8120 of file chan_iax2.c.
References ast_debug, AST_FRAME_IAX, ast_sendto(), ast_sockaddr_stringify(), compress_subclass(), ast_iax2_full_hdr::csub, ast_iax2_full_hdr::dcallno, IAX_COMMAND_INVAL, IAX_FLAG_FULL, iax_outputframe(), ast_iax2_full_hdr::iseqno, NULL, ast_iax2_full_hdr::oseqno, ast_iax2_full_hdr::scallno, ast_iax2_full_hdr::ts, and ast_iax2_full_hdr::type.
Referenced by socket_process_helper().
|
static |
Definition at line 4417 of file chan_iax2.c.
References iax2_peer::addr, ao2_link, AST_AF_UNSPEC, ast_copy_flags64, ast_debug, ast_free, ast_get_time_t(), ast_load_realtime(), ast_log, ast_parse_arg(), AST_SCHED_DEL, ast_set_flag64, ast_sockaddr_cmp_addr(), ast_sockaddr_isnull(), ast_sockaddr_parse(), ast_sockaddr_port, ast_sockaddr_resolve(), ast_sockaddr_set_port, ast_sockaddr_stringify_addr(), ast_sockaddr_stringify_port(), ast_strdupa, ast_test_flag64, ast_variables_destroy(), build_peer(), iax2_peer::expire, expire_registry(), global_rtautoclear, globalflags, iax2_sched_add(), IAX_DEFAULT_PORTNO, IAX_DEFAULT_REG_EXPIRE, IAX_DYNAMIC, IAX_RTAUTOCLEAR, IAX_RTCACHEFRIENDS, IAX_RTIGNOREREGEXPIRE, IAX_TEMPONLY, LOG_WARNING, iax2_peer::name, NULL, PARSE_ADDR, PARSE_IN_RANGE, PARSE_PORT_FORBID, PARSE_UINT32, peer_ref(), peer_unref(), realtime_update_peer(), reg_source_db(), SENTINEL, tmp(), and var.
Referenced by authenticate_reply(), calltoken_required(), find_peer(), and iax2_getpeername().
|
static |
Definition at line 4624 of file chan_iax2.c.
References ast_config_AST_SYSTEM_NAME, ast_sockaddr_isnull(), ast_sockaddr_stringify_addr(), ast_sockaddr_stringify_port(), ast_strdupa, ast_strlen_zero(), ast_test_flag64, ast_update_realtime(), globalflags, IAX_RTSAVE_SYSNAME, NULL, and SENTINEL.
Referenced by __expire_registry(), realtime_peer(), and update_registry().
|
static |
Definition at line 4549 of file chan_iax2.c.
References ao2_link, AST_AF_UNSPEC, ast_free, ast_load_realtime(), ast_set_flag64, ast_sockaddr_cmp_addr(), ast_sockaddr_isnull(), ast_sockaddr_resolve(), ast_sockaddr_stringify_addr(), ast_sockaddr_stringify_port(), ast_strdupa, ast_test_flag64, ast_variables_destroy(), build_user(), globalflags, IAX_RTCACHEFRIENDS, IAX_TEMPONLY, NULL, PARSE_PORT_FORBID, SENTINEL, tmp(), user, and var.
Referenced by calltoken_required(), and check_access().
|
static |
Definition at line 9090 of file chan_iax2.c.
References iax2_peer::addr, ast_db_get(), AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_log, AST_SCHED_DEL, ast_sockaddr_parse(), ast_sockaddr_stringify(), ast_test_flag64, ast_verb, iax2_peer::expire, expire_registry(), iax2_peer::expiry, iax2_poke_peer(), iax2_regfunk, iax2_sched_add(), IAX_TEMPONLY, LOG_NOTICE, iax2_peer::name, PARSE_PORT_REQUIRE, peer_ref(), peer_unref(), and register_peer_exten().
Referenced by realtime_peer(), and set_config().
|
static |
Definition at line 9002 of file chan_iax2.c.
References ast_add_extension(), ast_context_remove_extension(), ast_copy_string(), ast_exists_extension(), ast_free_ptr(), ast_strdup, ast_strlen_zero(), ext, iax2_peer::name, NULL, regcontext, iax2_peer::regexten, S_OR, and strsep().
Referenced by __expire_registry(), peer_destructor(), reg_source_db(), and update_registry().
|
static |
Verify inbound registration.
Definition at line 8303 of file chan_iax2.c.
References iax2_peer::acl, ast_apply_acl(), ast_check_signature(), ast_clear_flag, ast_copy_string(), AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_free, ast_key_get(), AST_KEY_PUBLIC, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_set_flag, ast_sockaddr_stringify_addr(), ast_strdup, ast_strdupa, ast_string_field_set, ast_strlen_zero(), ast_test_flag64, authdebug, iax2_peer::authmethods, challenge(), chan_iax2_pvt::expiry, find_peer(), IAX_AUTH_MD5, IAX_AUTH_PLAINTEXT, IAX_AUTH_RSA, IAX_DYNAMIC, IAX_STATE_AUTHENTICATED, iaxs, iaxsl, iax2_peer::inkeys, last_authmethod, LOG_ERROR, LOG_NOTICE, LOG_WARNING, md5(), iax_ies::md5_result, MD5Final(), MD5Init(), MD5Update(), iax2_peer::name, NULL, iax_ies::password, peer_unref(), iax_ies::refresh, iax_ies::rsa_result, iax2_peer::secret, strsep(), and iax_ies::username.
Referenced by socket_process_helper().
|
static |
Definition at line 9322 of file chan_iax2.c.
References AST_FRAME_IAX, ast_mutex_lock, ast_mutex_unlock, ast_random(), ast_strdupa, ast_string_field_set, iax2_peer::authmethods, chan_iax2_pvt::authmethods, iax_ie_data::buf, iax2_peer::callno, challenge(), find_peer(), IAX_AUTH_MD5, IAX_AUTH_RSA, IAX_COMMAND_REGAUTH, iax_ie_append_short(), iax_ie_append_str(), IAX_IE_AUTHMETHODS, IAX_IE_CHALLENGE, IAX_IE_USERNAME, iaxs, iaxsl, last_authmethod, peer_unref(), iax_ie_data::pos, and send_command().
Referenced by socket_process_helper().
|
static |
Definition at line 9370 of file chan_iax2.c.
References add_empty_calltoken_ie(), iax2_registry::addr, ast_copy_string(), AST_FRAME_IAX, ast_log, ast_sockaddr_cmp(), ast_sockaddr_stringify(), ast_strlen_zero(), authenticate(), iax_ies::authmethods, iax_ie_data::buf, iax_ies::challenge, challenge(), IAX_COMMAND_REGREQ, iax_ie_append_short(), iax_ie_append_str(), IAX_IE_REFRESH, IAX_IE_USERNAME, iaxs, LOG_NOTICE, LOG_WARNING, NULL, iax_ie_data::pos, iax2_registry::refresh, chan_iax2_pvt::reg, REG_STATE_AUTHSENT, REG_STATE_NOAUTH, iax2_registry::regstate, iax2_registry::secret, send_command(), iax2_registry::username, and iax_ies::username.
Referenced by socket_process_helper().
|
static |
Definition at line 7406 of file chan_iax2.c.
References REG_STATE_AUTHSENT, REG_STATE_NOAUTH, REG_STATE_REGISTERED, REG_STATE_REGSENT, REG_STATE_REJECTED, REG_STATE_TIMEOUT, and REG_STATE_UNREGISTERED.
Referenced by handle_cli_iax2_show_registry(), and manager_iax2_show_registry().
|
static |
Definition at line 14232 of file chan_iax2.c.
References reload_config().
Referenced by set_config().
|
static |
Definition at line 14183 of file chan_iax2.c.
References ao2_callback, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_unload_realtime(), callno_limits, calltoken_ignores, config, debugaddr, iax2_do_register(), iax_firmware_reload(), iax_provision_reload(), NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, peercnts, poke_all_peers(), prune_addr_range_cb(), prune_peers(), prune_users(), set_config(), set_peercnt_limit_all_cb(), trunk_maxmtu, trunk_nmaxmtu, trunk_timed, and trunk_untimed.
Referenced by acl_change_stasis_cb(), handle_cli_iax2_reload(), and reload().
|
static |
Definition at line 2475 of file chan_iax2.c.
References ao2_unlink, ast_log, iax_peercallno_pvts, LOG_ERROR, and chan_iax2_pvt::peercallno.
Referenced by complete_transfer(), iax2_destroy(), resend_with_token(), and socket_process_helper().
|
static |
Definition at line 2456 of file chan_iax2.c.
References ao2_unlink, ast_log, iax_transfercallno_pvts, LOG_ERROR, and chan_iax2_pvt::transfercallno.
Referenced by complete_transfer(), and iax2_destroy().
|
static |
Definition at line 3029 of file chan_iax2.c.
References ast_assert, ast_log, ast_mutex_lock, ast_mutex_unlock, call_number_pool::available, CALLNO_ENTRY_GET_CALLNO, CALLNO_ENTRY_IS_VALIDATED, callno_pool, callno_pool_lock, callno_pool_trunk, call_number_pool::capacity, LOG_ERROR, call_number_pool::numbers, PTR_TO_CALLNO_ENTRY, total_nonval_callno_used, and TRUNK_CALL_START.
Referenced by __find_callno(), make_trunk(), and sched_delay_remove().
|
static |
Definition at line 4950 of file chan_iax2.c.
References ast_strlen_zero(), CALLTOKEN_AUTO, iax2_peer::calltoken_required, CALLTOKEN_YES, find_peer(), find_user(), IAX_COMMAND_NEW, name, NULL, peer_unref(), and user_unref().
Referenced by handle_call_token().
|
static |
Definition at line 4868 of file chan_iax2.c.
References iax_frame::af, chan_iax2_pvt::aseqno, AST_FRAME_IAX, AST_LIST_REMOVE, iax_ie_data::buf, chan_iax2_pvt::callno, chan_iax2_pvt::calltoken_ie_len, iax_frame::data, iax_frame::datalen, iax_frame::dcallno, iax_frame::encmethods, frame_queue, ast_frame::frametype, iax2_allow_new(), iax2_frame_free(), iax_ie_append_str(), IAX_IE_CALLTOKEN, iaxs, ast_frame_subclass::integer, chan_iax2_pvt::iseqno, chan_iax2_pvt::oseqno, chan_iax2_pvt::peercallno, remove_by_peercallno(), chan_iax2_pvt::rseqno, send_command(), and ast_frame::subclass.
Referenced by socket_process_helper().
Definition at line 9781 of file chan_iax2.c.
References ast_string_field_set, iax_frame::callno, IAX_MAX_OSPBLOCK_NUM, IAX_MAX_OSPBLOCK_SIZE, IAX_MAX_OSPBUFF_SIZE, iaxs, iax_ies::ospblocklength, and iax_ies::osptokenblock.
Referenced by socket_process_helper().
Definition at line 9770 of file chan_iax2.c.
References iax_frame::callno, iax_rr::delay, iax_rr::dropped, iaxs, iax_rr::jitter, iax_rr::losscnt, iax_rr::losspct, iax_rr::ooo, iax_rr::packets, chan_iax2_pvt::remote_rr, iax_ies::rr_delay, iax_ies::rr_dropped, iax_ies::rr_jitter, iax_ies::rr_loss, iax_ies::rr_ooo, and iax_ies::rr_pkts.
Referenced by socket_process_helper().
|
static |
Definition at line 3101 of file chan_iax2.c.
References peercnt::addr, ao2_find, ao2_ref, ast_debug, ast_sockaddr_copy(), ast_sockaddr_stringify_addr(), CALLNO_ENTRY_TO_PTR, iax2_sched_add(), MIN_REUSE_TIME, OBJ_POINTER, peercnt_remove_cb(), peercnts, replace_callno(), and tmp().
Referenced by pvt_destructor().
|
static |
Definition at line 4276 of file chan_iax2.c.
References __do_deliver(), iax_frame::af, ast_codec_samples_count(), ast_debug, ast_format_get_sample_rate(), AST_FRAME_CNG, AST_FRAME_VOICE, ast_samp2tv(), ast_test_flag64, ast_tv(), ast_tvadd(), ast_tvzero(), calc_rxstamp(), iax_frame::callno, ast_frame::data, ast_frame::datalen, ast_frame::delivery, ast_frame_subclass::format, ast_frame::frametype, iax2_frame_free(), IAX_USEJITTERBUF, iaxs, chan_iax2_pvt::jb, JB_DROP, jb_put(), JB_SCHED, JB_TYPE_CONTROL, JB_TYPE_SILENCE, JB_TYPE_VOICE, len(), chan_iax2_pvt::rxcore, ast_frame::subclass, iax_frame::ts, type, unwrap_timestamp(), and update_jbsched().
Referenced by socket_process_helper(), and socket_process_meta().
|
static |
Definition at line 2183 of file chan_iax2.c.
References ast_debug, ast_mutex_lock, ast_mutex_unlock, iax2_destroy(), iaxs, iaxsl, and PTR_TO_CALLNO.
Referenced by iax2_hangup().
|
static |
Definition at line 4830 of file chan_iax2.c.
References AST_FRAME_IAX, ast_sendto(), iax_ie_data::buf, compress_subclass(), ast_iax2_full_hdr::dcallno, IAX_FLAG_RETRANS, iax_outputframe(), NULL, iax_ie_data::pos, and ast_iax2_full_hdr::ts.
Referenced by handle_call_token(), and socket_process_helper().
|
static |
Definition at line 7831 of file chan_iax2.c.
References __send_command(), ast_debug, AST_FRAME_CONTROL, chan_iax2_pvt::callno, ast_frame::data, ast_frame::datalen, iax2_is_control_frame_allowed(), ast_frame::seqno, ast_frame::ts, and type.
Referenced by __attempt_transmit(), __send_lagrq(), __send_ping(), authenticate_reply(), authenticate_request(), cache_get_callno_locked(), dp_lookup(), iax2_call(), iax2_do_register(), iax2_dprequest(), iax2_indicate(), iax2_key_rotate(), iax2_poke_peer(), iax2_provision(), registry_authrequest(), registry_rerequest(), resend_with_token(), send_command_locked(), and socket_process_helper().
|
static |
Definition at line 7856 of file chan_iax2.c.
References __send_command(), chan_iax2_pvt::callno, ast_frame::data, ast_frame::datalen, iax2_predestroy(), iaxs, ast_frame::seqno, ast_frame::ts, and type.
Referenced by __auth_reject(), __auto_hangup(), authenticate_request(), iax2_hangup(), socket_process_helper(), and update_registry().
|
static |
Definition at line 7866 of file chan_iax2.c.
References __send_command(), ast_frame::data, ast_frame::datalen, ast_frame::seqno, ast_frame::ts, and type.
Referenced by iax2_vnak(), and socket_process_helper().
|
static |
Definition at line 7842 of file chan_iax2.c.
References ast_mutex_lock, ast_mutex_unlock, ast_frame::data, ast_frame::datalen, iaxs, iaxsl, send_command(), ast_frame::seqno, ast_frame::ts, and type.
Referenced by iax2_answer(), iax2_digit_begin(), iax2_digit_end(), iax2_sendhtml(), iax2_sendimage(), iax2_sendtext(), iax2_setoption(), and iax2_transfer().
|
static |
Definition at line 7871 of file chan_iax2.c.
References __send_command(), ast_frame::data, ast_frame::datalen, ast_frame::ts, and type.
Referenced by socket_process_helper(), and try_transfer().
|
static |
Definition at line 1851 of file chan_iax2.c.
References __send_lagrq(), and schedule_action.
Referenced by __find_callno(), __send_lagrq(), and make_trunk().
|
static |
Definition at line 3449 of file chan_iax2.c.
References chan_iax2_pvt::addr, ast_debug, ast_sendto(), ast_sockaddr_stringify(), iax_frame::callno, iax_frame::data, iax_frame::datalen, errno, error(), handle_error(), iax_outputframe(), iaxdebug, iaxs, NULL, chan_iax2_pvt::peercallno, chan_iax2_pvt::transfer, transfer(), iax_frame::transfer, and iax_frame::ts.
Referenced by __attempt_transmit(), iax2_send(), transmit_frame(), and vnak_retransmit().
|
static |
Definition at line 1787 of file chan_iax2.c.
References __send_ping(), and schedule_action.
Referenced by __find_callno(), __send_ping(), and make_trunk().
|
static |
This function must be called once we are sure the other side has given us a call number. All signaling is held here until that point.
Definition at line 2205 of file chan_iax2.c.
References AST_LIST_REMOVE_HEAD, signaling_queue_entry::f, free_signaling_queue_entry(), chan_iax2_pvt::hold_signaling, iax2_send(), signaling_queue_entry::next, NULL, and chan_iax2_pvt::signaling_queue.
Referenced by socket_process_helper().
|
static |
Definition at line 9551 of file chan_iax2.c.
References iax2_trunk_peer::addr, iax_frame::afdata, ast_debug, ast_inet_ntoa(), ast_test_flag64, calc_txpeerstamp(), iax2_trunk_peer::calls, iax_frame::data, iax_frame::datalen, iax_frame::direction, DIRECTION_OUTGRESS, globalflags, IAX_META_TRUNK, IAX_META_TRUNK_MINI, IAX_META_TRUNK_SUPERMINI, IAX_TRUNKTIMESTAMPS, if(), env::meta, iax_frame::retrans, iax2_trunk_peer::sockfd, iax_frame::transfer, transmit_trunk(), iax2_trunk_peer::trunkdata, iax2_trunk_peer::trunkdatalen, trunkfreq, and ast_iax2_meta_trunk_hdr::ts.
Referenced by iax2_trunk_queue(), and timing_read().
|
static |
Load configuration.
Definition at line 13649 of file chan_iax2.c.
References accountcode, add_calltoken_ignore(), adsi, amaflags, ao2_link, ast_category_browse(), ast_channel_string2amaflag(), ast_clear_flag, ast_clear_flag64, ast_config_destroy(), ast_config_load, ast_context_find_or_create(), ast_copy_string(), ast_false(), AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, ast_netsock_bindaddr(), ast_netsock_init(), ast_netsock_list_alloc(), ast_netsock_release(), ast_netsock_sockfd(), ast_netsock_unref(), ast_parse_arg(), ast_set2_flag64, ast_set_flag64, ast_set_flags_to64, ast_sockaddr_parse(), ast_sockaddr_port, ast_sockaddr_set_port, ast_sockaddr_stringify(), ast_str2cos(), ast_str2tos(), ast_strlen_zero(), ast_test_flag64, ast_timer_set_rate(), ast_true(), ast_variable_browse(), ast_variable_retrieve(), ast_verb, authdebug, autokill, bindaddr, build_callno_limits(), build_peer(), build_user(), config_file, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, DEFAULT_MAXCALLNO_LIMIT, DEFAULT_MAXCALLNO_LIMIT_NONVAL, DEFAULT_MAXMS, default_parkinglot, defaultsockfd, delayreject, errno, gen, get_auth_methods(), get_encrypt_methods(), global_max_trunk_mtu, global_maxcallno, global_maxcallno_nonval, global_rtautoclear, globalflags, iax2_authmethods, iax2_capability, iax2_codec_pref_from_bitfield(), iax2_encryption, iax2_parse_allow_disallow(), iax2_register(), IAX_ALLOWFWDOWNLOAD, IAX_AUTH_PLAINTEXT, IAX_CAPABILITY_FULLBANDWIDTH, IAX_CAPABILITY_LOWBANDWIDTH, IAX_CAPABILITY_MEDBANDWIDTH, IAX_CODEC_NOCAP, IAX_CODEC_NOPREFS, IAX_CODEC_USER_FIRST, IAX_DEFAULT_PORTNO, IAX_DEFAULT_REG_EXPIRE, IAX_DYNAMIC, IAX_FORCE_ENCRYPT, IAX_NOTRANSFER, IAX_RECVCONNECTEDLINE, IAX_RTAUTOCLEAR, IAX_RTCACHEFRIENDS, IAX_RTIGNOREREGEXPIRE, IAX_RTSAVE_SYSNAME, IAX_RTUPDATE, IAX_SENDCONNECTEDLINE, IAX_SHRINKCALLERID, IAX_TRANSFERMEDIA, IAX_TRUNKTIMESTAMPS, IAX_USEJITTERBUF, iaxcompat, iaxmaxthreadcount, iaxthreadcount, io, jittertargetextra, lagrq_time, language, ast_variable::lineno, LOG_ERROR, LOG_NOTICE, LOG_WARNING, max_calltoken_delay, max_reg_expire, MAX_TRUNK_MTU, MAX_TRUNKDATA, maxauthreq, maxjitterbuffer, maxjitterinterps, min_reg_expire, mohinterpret, mohsuggest, ast_variable::name, netsock, network_change_stasis_subscribe(), network_change_stasis_unsubscribe(), ast_variable::next, NULL, outsock, PARSE_ADDR, PARSE_IN_RANGE, PARSE_UINT32, peer_unref(), ping_time, prefs_global, qos, reg_source_db(), regcontext, reload(), resyncthreshold, set_config_destroy(), socket_read(), srvlookup, timer, tmp(), trunkfreq, trunkmaxsize, user, user_unref(), and ast_variable::value.
Referenced by load_module(), and reload_config().
|
static |
Definition at line 13632 of file chan_iax2.c.
References accountcode, addr_range_delme_cb(), amaflags, ao2_callback, ast_clear_flag64, callno_limits, calltoken_ignores, delayreject, delete_users(), globalflags, IAX_NOTRANSFER, IAX_RECVCONNECTEDLINE, IAX_SENDCONNECTEDLINE, IAX_TRANSFERMEDIA, IAX_USEJITTERBUF, language, MAX_TRUNKDATA, mohinterpret, mohsuggest, NULL, OBJ_NODATA, and trunkmaxsize.
Referenced by set_config().
|
static |
Definition at line 10204 of file chan_iax2.c.
References ast_channel_hangupcause_set(), ast_channel_name(), ast_channel_ref, ast_channel_unlock, ast_channel_unref, ast_mutex_lock, ast_mutex_unlock, ast_set_hangupsource(), ast_strdupa, iax2_lock_owner(), iaxs, iaxsl, name, and chan_iax2_pvt::owner.
Referenced by socket_process_helper().
|
static |
Definition at line 2600 of file chan_iax2.c.
References peercnt::addr, addr_range_match_address_cb(), ao2_callback, ao2_ref, ast_debug, ast_sockaddr_copy(), ast_sockaddr_stringify(), callno_limits, global_maxcallno, peercnt::limit, addr_range::limit, and peercnt::reg.
Referenced by peercnt_add(), peercnt_modify(), and set_peercnt_limit_all_cb().
|
static |
Definition at line 2625 of file chan_iax2.c.
References ast_debug, and set_peercnt_limit().
Referenced by reload_config().
|
static |
Definition at line 1158 of file chan_iax2.c.
References ast_cond_signal, ast_mutex_lock, ast_mutex_unlock, cond, and lock.
Referenced by __schedule_action(), cleanup_thread_list(), iax2_process_thread(), and socket_read().
|
static |
Definition at line 12139 of file chan_iax2.c.
References ast_callid_threadassoc_remove(), ast_read_threadstorage_callid(), socket_process_helper(), and thread.
Referenced by handle_deferred_full_frames(), and iax2_process_thread().
|
static |
Definition at line 10225 of file chan_iax2.c.
References chan_iax2_pvt::addr, iax_frame::af, iax_frame::afdatalen, ao2_cleanup, ao2_ref, chan_iax2_pvt::aseqno, ast_aes_set_decrypt_key(), ast_alloca, ast_bridge_transfer_blind(), AST_BRIDGE_TRANSFER_SUCCESS, ast_callid_threadassoc_add(), ast_calloc, ast_control_pvt_cause_code::ast_cause, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL, AST_CAUSE_BUSY, AST_CAUSE_CONGESTION, AST_CAUSE_FACILITY_NOT_SUBSCRIBED, AST_CAUSE_NO_ROUTE_DESTINATION, ast_channel_caller(), ast_channel_datastore_add(), ast_channel_hangupcause_hash_set(), ast_channel_hangupcause_set(), AST_CHANNEL_NAME, ast_channel_name(), ast_channel_nativeformats(), ast_channel_nativeformats_set(), ast_channel_readformat(), ast_channel_ref, ast_channel_unlock, ast_channel_unref, ast_channel_writeformat(), ast_clear_flag, ast_clear_flag64, ast_codec_samples_count(), ast_connected_line_parse_data(), AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_HANGUP, AST_CONTROL_PROGRESS, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_REDIRECTING, ast_copy_string(), ast_datastore_alloc, ast_datastore_free(), ast_debug, AST_DEVICE_NOT_INUSE, AST_DEVICE_UNAVAILABLE, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_endpoint_blob_publish(), AST_ENDPOINT_ONLINE, ast_endpoint_set_state(), ast_endpoint_state_type(), ast_exists_extension(), ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_names(), AST_FORMAT_CAP_NAMES_LEN, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_compatibility_bitfield2format(), ast_format_compatibility_format2bitfield(), ast_format_get_name(), ast_format_slin, ast_frame_byteswap_be, AST_FRAME_CONTROL, AST_FRAME_IAX, AST_FRAME_NULL, AST_FRAME_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_free, ast_iax2_new(), ast_json_pack(), ast_json_unref(), AST_LIST_HEAD, AST_LIST_HEAD_INIT, AST_LIST_INSERT_TAIL, AST_LIST_LAST, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_mutex_lock, ast_mutex_trylock, ast_mutex_unlock, ast_party_connected_line_free(), ast_party_connected_line_init(), ast_party_id_presentation(), ast_queue_control_data(), AST_SCHED_DEL, ast_set_callerid(), ast_set_flag, ast_set_flag64, ast_set_read_format(), ast_set_write_format(), ast_sockaddr_cmp(), ast_sockaddr_copy(), ast_sockaddr_isnull(), ast_sockaddr_setnull(), ast_sockaddr_stringify(), AST_STATE_RING, ast_str_alloca, ast_strdupa, ast_string_field_set, ast_strlen_zero(), ast_test_flag, ast_test_flag64, ast_var_assign, ast_variables_destroy(), ast_verb, auth_fail(), auth_method_labels, auth_method_names(), AUTH_METHOD_NAMES_BUFSIZE, authdebug, authenticate_reply(), authenticate_request(), authenticate_verify(), chan_iax2_pvt::authmethods, chan_iax2_pvt::bridgecallno, iax_ie_data::buf, c, CACHE_FLAG_TRANSMITTED, iax_frame::cacheable, calc_timestamp(), iax_ies::called_number, chan_iax2_pvt::calling_pres, iax2_peer::callno, chan_iax2_pvt::callno, iax_frame::callno, iax_ies::calltoken, iax_ies::calltokendata, chan_iax2_pvt::capability, iax_ies::cause, iax_ies::causecode, iax_ies::challenge, ast_control_pvt_cause_code::chan_name, check_access(), check_provisioning(), chan_iax2_pvt::chosenformat, chan_iax2_pvt::cid_num, ast_control_pvt_cause_code::code, iax_ies::codec_prefs, complete_dpreply(), complete_transfer(), connected, construct_rr(), chan_iax2_pvt::context, voicemailpwcheck::context, ast_iax2_full_hdr::csub, ast_datastore::data, ast_frame::data, ast_frame::datalen, DATASTORE_INHERIT_FOREVER, ast_iax2_full_hdr::dcallno, chan_iax2_pvt::dcx, DEADLOCK_AVOIDANCE, decrypt_frame(), delayreject, iax_ies::devicetype, dp_lookup(), chan_iax2_pvt::dpentries, chan_iax2_pvt::eff_auth_method, chan_iax2_pvt::encmethods, iax_ies::encmethods, iax2_peer::endpoint, ast_var_t::entries, chan_iax2_pvt::error, exists(), chan_iax2_pvt::exten, iax_frame::final, find_callno(), chan_iax2_pvt::first_iax_message, iax2_dpcache::flags, iax_ies::format, ast_frame_subclass::format, ast_frame_subclass::frame_ending, frame_queue, chan_iax2_pvt::frames_received, ast_frame::frametype, iax_ies::fwdesc, globalflags, handle_call_token(), iax2_peer::historicms, chan_iax2_pvt::hold_signaling, iax2_ack_registry(), iax2_allow_new(), iax2_codec_choose(), iax2_codec_pref_best_bitfield2cap(), iax2_codec_pref_convert(), iax2_codec_pref_index(), iax2_codec_pref_string(), iax2_destroy(), iax2_dprequest(), iax2_format_compatibility_best(), iax2_format_compatibility_cap2bitfield(), iax2_getformatname(), iax2_getformatname_multiple(), iax2_is_control_frame_allowed(), iax2_lock_owner(), iax2_poke_peer_s(), iax2_publish_registry(), iax2_queue_frame(), iax2_queue_hold(), iax2_queue_unhold(), iax2_sched_add(), iax2_send(), iax2_variable_datastore_info, iax2_vnak(), IAX_ALLOWFWDOWNLOAD, IAX_ALREADYGONE, IAX_AUTH_MD5, IAX_AUTH_RSA, IAX_CALLENCRYPTED, IAX_CODEC_NOCAP, IAX_CODEC_NOPREFS, IAX_CODEC_USER_FIRST, IAX_COMMAND_ACCEPT, IAX_COMMAND_ACK, IAX_COMMAND_AUTHREP, IAX_COMMAND_AUTHREQ, IAX_COMMAND_CALLTOKEN, IAX_COMMAND_DIAL, IAX_COMMAND_DPREP, IAX_COMMAND_DPREQ, IAX_COMMAND_FWDATA, IAX_COMMAND_FWDOWNL, IAX_COMMAND_HANGUP, IAX_COMMAND_INVAL, IAX_COMMAND_LAGRP, IAX_COMMAND_LAGRQ, IAX_COMMAND_NEW, IAX_COMMAND_PING, IAX_COMMAND_POKE, IAX_COMMAND_PONG, IAX_COMMAND_QUELCH, IAX_COMMAND_REGACK, IAX_COMMAND_REGAUTH, IAX_COMMAND_REGREJ, IAX_COMMAND_REGREL, IAX_COMMAND_REGREQ, IAX_COMMAND_REJECT, IAX_COMMAND_RTKEY, IAX_COMMAND_TRANSFER, IAX_COMMAND_TXACC, IAX_COMMAND_TXCNT, IAX_COMMAND_TXMEDIA, IAX_COMMAND_TXREADY, IAX_COMMAND_TXREJ, IAX_COMMAND_TXREL, IAX_COMMAND_TXREQ, IAX_COMMAND_UNQUELCH, IAX_COMMAND_UNSUPPORT, IAX_COMMAND_VNAK, IAX_DEBUGDIGEST, IAX_DELAYPBXSTART, IAX_ENCRYPTED, iax_firmware_append(), IAX_FLAG_FULL, IAX_FLAG_RETRANS, IAX_FORCE_ENCRYPT, iax_frame_subclass2str(), iax_frame_wrap(), iax_ie_append_byte(), iax_ie_append_int(), iax_ie_append_short(), iax_ie_append_str(), iax_ie_append_versioned_uint64(), IAX_IE_CALLNO, IAX_IE_CAUSE, IAX_IE_CAUSECODE, IAX_IE_FORMAT, IAX_IE_FORMAT2, IAX_IE_IAX_UNKNOWN, IAX_IMMEDIATE, iax_outputframe(), iax_parse_ies(), IAX_PROVISION, iax_pvt_callid_get(), iax_pvt_callid_new(), IAX_QUELCH, IAX_RECVCONNECTEDLINE, IAX_STATE_AUTHENTICATED, IAX_STATE_STARTED, IAX_STATE_TBD, IAX_TRUNK, iax_ies::iax_unknown, iaxcompat, iaxdebug, iaxfrdup2(), iaxs, iaxsl, chan_iax2_pvt::iaxvars, ast_party_caller::id, ast_datastore::inheritance, chan_iax2_pvt::initid, chan_iax2_pvt::inkeys, ast_frame_subclass::integer, chan_iax2_pvt::iseqno, ast_iax2_full_hdr::iseqno, iax_frame::iseqno, chan_iax2_pvt::lag, chan_iax2_pvt::last, chan_iax2_pvt::last_iax_message, iax2_peer::lastms, ast_frame::len, LOG_ERROR, log_jitterstats(), LOG_NOTICE, LOG_WARNING, make_trunk(), ast_frame::mallocd, iax2_peer::maxms, merge_encryption(), env::meta, chan_iax2_pvt::mohsuggest, iax_ies::musiconhold, iax2_peer::name, ast_party_id::name, NEW_ALLOW, NEW_ALLOW_CALLTOKEN_VALIDATED, NEW_PREVENT, NULL, ast_party_id::number, ast_frame::offset, chan_iax2_pvt::oseqno, ast_iax2_full_hdr::oseqno, iax_frame::oseqno, chan_iax2_pvt::outkey, iax_frame::outoforder, chan_iax2_pvt::owner, peer_ref(), peer_unref(), chan_iax2_pvt::peercallno, chan_iax2_pvt::peercapability, chan_iax2_pvt::peerformat, chan_iax2_pvt::peerpoke, chan_iax2_pvt::pingtime, iax2_peer::pokeexpire, iax2_peer::pokefreqnotok, iax2_peer::pokefreqok, iax_ie_data::pos, chan_iax2_pvt::prefs, ast_party_name::presentation, ast_party_number::presentation, iax_ies::provver, iax_ies::provverpres, ast_frame::ptr, RAII_VAR, raw_hangup(), iax_ies::refresh, chan_iax2_pvt::reg, REG_STATE_REJECTED, register_verify(), registry_authrequest(), registry_rerequest(), iax2_registry::regstate, remove_by_peercallno(), resend_with_token(), iax_frame::retries, chan_iax2_pvt::rprefs, chan_iax2_pvt::rseqno, S_COR, S_OR, ast_frame::samples, save_osptoken(), save_rr(), ast_iax2_full_hdr::scallno, schedule_delivery(), chan_iax2_pvt::secret, send_apathetic_reply(), send_command(), send_command_final(), send_command_immediate(), send_command_transfer(), send_signaling(), iax_ies::serviceident, set_hangup_source_and_cause(), iax2_peer::smoothing, socket_process_meta(), spawn_dp_lookup(), ast_frame::src, chan_iax2_pvt::state, stop_stuff(), store_by_peercallno(), ast_frame::subclass, thread, chan_iax2_pvt::transfer, iax_frame::transfer, TRANSFER_BEGIN, TRANSFER_MBEGIN, TRANSFER_MEDIA, TRANSFER_MEDIAPASS, TRANSFER_MREADY, TRANSFER_NONE, TRANSFER_READY, TRANSFER_RELEASED, chan_iax2_pvt::transferring, try_transfer(), ast_iax2_full_hdr::ts, iax_frame::ts, ast_iax2_full_hdr::type, uncompress_subclass(), update_registry(), iax2_registry::username, chan_iax2_pvt::username, iax_ies::username, var, iax_ies::vars, VERBOSE_PREFIX_4, chan_iax2_pvt::videoformat, vnak_retransmit(), and chan_iax2_pvt::voiceformat.
Referenced by socket_process().
|
static |
Definition at line 9993 of file chan_iax2.c.
References ast_codec_samples_count(), ast_format_compatibility_bitfield2format(), AST_FRAME_VOICE, ast_log, ast_mutex_unlock, ast_sockaddr_stringify(), ast_test_flag, ast_tvnow(), ast_tvzero(), ast_iax2_mini_hdr::callno, ast_iax2_meta_trunk_entry::callno, iax_frame::callno, ast_iax2_meta_trunk_hdr::data, ast_frame::data, ast_frame::datalen, find_callno_locked(), find_tpeer(), fix_peerts(), ast_frame_subclass::format, ast_frame::frametype, iax2_vnak(), IAX_FLAG_FULL, iax_frame_wrap(), IAX_META_TRUNK, IAX_META_TRUNK_MINI, IAX_META_TRUNK_SUPERMINI, IAX_STATE_STARTED, iaxfrdup2(), iaxs, iaxsl, chan_iax2_pvt::last, ast_iax2_meta_trunk_entry::len, ast_iax2_meta_trunk_mini::len, len(), iax2_trunk_peer::lock, LOG_WARNING, ast_frame::mallocd, env::meta, ast_iax2_meta_trunk_mini::mini, NEW_PREVENT, NULL, ast_frame::offset, iax_frame::outoforder, ast_frame::ptr, iax2_trunk_peer::rxtrunktime, ast_frame::samples, schedule_delivery(), ast_frame::src, chan_iax2_pvt::state, ast_frame::subclass, iax2_trunk_peer::trunkact, ast_iax2_mini_hdr::ts, ast_iax2_meta_trunk_hdr::ts, iax_frame::ts, and chan_iax2_pvt::voiceformat.
Referenced by socket_process_helper().
|
static |
Definition at line 9915 of file chan_iax2.c.
References iax2_thread::addr, ast_copy_string(), ast_debug, AST_LIST_INSERT_HEAD, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, ast_log, ast_random(), ast_recvfrom(), ast_sockaddr_cmp_addr(), ast_sockaddr_copy(), iax2_thread::callno, ast_iax2_full_hdr::csub, defer_full_frame(), errno, iax2_thread::ffinfo, find_idle_thread(), handle_error(), IAX_FLAG_FULL, IAX_IOSTATE_IDLE, IAX_IOSTATE_READY, if(), iax2_thread::list, LOG_WARNING, NULL, ast_iax2_full_hdr::scallno, signal_condition(), test_losspct, thread, and ast_iax2_full_hdr::type.
Referenced by peer_set_srcaddr(), and set_config().
|
static |
Definition at line 9723 of file chan_iax2.c.
References ast_calloc, ast_copy_string(), ast_log, ast_pthread_create_detached, ast_strdup, dpreq_data::callednum, dpreq_data::callerid, dpreq_data::callno, dpreq_data::context, voicemailpwcheck::context, dp_lookup_thread(), LOG_WARNING, and NULL.
Referenced by socket_process_helper().
|
static |
Definition at line 12771 of file chan_iax2.c.
References ast_calloc, ast_cond_destroy, ast_cond_init, ast_cond_wait, ast_free, AST_LIST_INSERT_TAIL, AST_LIST_LOCK, AST_LIST_UNLOCK, ast_log, ast_mutex_destroy, ast_mutex_init, ast_mutex_lock, ast_mutex_unlock, ast_pthread_create_background, ast_verb, iax2_process_thread(), IAX_THREAD_TYPE_POOL, iaxthreadcount, iax2_thread::list, LOG_ERROR, LOG_WARNING, netthreadid, network_thread(), NULL, and thread.
Referenced by load_module().
|
static |
Definition at line 9419 of file chan_iax2.c.
References iax2_destroy_helper(), and iaxs.
Referenced by socket_process_helper().
|
static |
Definition at line 2465 of file chan_iax2.c.
References ao2_link, ast_log, iax_peercallno_pvts, LOG_ERROR, and chan_iax2_pvt::peercallno.
Referenced by __find_callno(), complete_transfer(), and socket_process_helper().
|
static |
Definition at line 2446 of file chan_iax2.c.
References ao2_link, ast_log, iax_transfercallno_pvts, LOG_ERROR, and chan_iax2_pvt::transfercallno.
Referenced by try_transfer().
|
static |
Definition at line 9602 of file chan_iax2.c.
References iax2_trunk_peer::addr, ast_debug, ast_free, AST_LIST_LOCK, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_LIST_UNLOCK, ast_log, ast_mutex_destroy, ast_mutex_lock, ast_mutex_unlock, ast_sockaddr_stringify(), ast_timer_ack(), ast_tvnow(), ast_verbose(), iax2_trunk_expired(), iaxtrunkdebug, iax2_trunk_peer::lock, LOG_ERROR, NULL, send_trunk(), timer, totalcalls, trunk_timed, iax2_trunk_peer::trunkdataalloc, iax2_trunk_peer::trunkdatalen, and trunkmaxsize.
Referenced by network_thread().
|
static |
Definition at line 14889 of file chan_iax2.c.
References CMP_MATCH, CMP_STOP, chan_iax2_pvt::frames_received, and match().
Referenced by load_objects().
|
static |
Definition at line 14882 of file chan_iax2.c.
References chan_iax2_pvt::transfercallno.
Referenced by load_objects().
|
static |
Definition at line 4340 of file chan_iax2.c.
References AST_LIST_INSERT_TAIL, ast_mutex_lock, ast_mutex_unlock, attempt_transmit(), iax_frame::callno, iax_frame::data, frame_queue, iax2_sched_add(), iax_frame_free(), iaxs, iaxsl, iax_frame::list, iax_frame::retrans, iax_frame::retries, iax_frame::retrytime, send_packet(), and iax_frame::sentyet.
Referenced by iax2_transmit().
|
static |
Definition at line 3436 of file chan_iax2.c.
References ast_debug, ast_sendto(), iax_frame::data, iax_frame::datalen, errno, and handle_error().
Referenced by send_trunk().
|
static |
Definition at line 8710 of file chan_iax2.c.
References iax_ies::apparent_addr, AST_FRAME_IAX, ast_log, ast_sockaddr_copy(), ast_sockaddr_isnull(), iax_ie_data::buf, iax_ies::callno, IAX_COMMAND_TXCNT, iax_ie_append_int(), IAX_IE_TRANSFERID, LOG_WARNING, iax_ie_data::pos, send_command_transfer(), store_by_transfercallno(), chan_iax2_pvt::transfer, TRANSFER_BEGIN, TRANSFER_NONE, chan_iax2_pvt::transfercallno, chan_iax2_pvt::transferid, iax_ies::transferid, and chan_iax2_pvt::transferring.
Referenced by socket_process_helper().
|
static |
Definition at line 1880 of file chan_iax2.c.
References iax2_thread::csub, IAX_FLAG_SC_LOG, and IAX_MAX_SHIFT.
Referenced by decode_frame(), handle_call_token(), and socket_process_helper().
|
static |
Definition at line 9021 of file chan_iax2.c.
References ao2_unlink, AST_SCHED_DEL, iax2_peer::expire, peer_unref(), and iax2_peer::pokeexpire.
Referenced by __expire_registry(), build_peer(), and prune_peers().
|
static |
Definition at line 14847 of file chan_iax2.c.
References __unload_module(), ast_custom_function_unregister(), iaxpeer_function, and iaxvar_function.
|
static |
Definition at line 4120 of file chan_iax2.c.
References iax_frame::af, ast_debug, AST_FRAME_VIDEO, iax_frame::callno, ast_frame::frametype, iaxdebug, iaxs, chan_iax2_pvt::last, and iax_frame::ts.
Referenced by schedule_delivery().
|
static |
Definition at line 4155 of file chan_iax2.c.
References ast_tvdiff_ms(), ast_tvnow(), chan_iax2_pvt::callno, CALLNO_TO_PTR, get_from_jb(), iax2_sched_replace(), chan_iax2_pvt::jb, jb_next(), chan_iax2_pvt::jbid, and chan_iax2_pvt::rxcore.
Referenced by __get_from_jb(), and schedule_delivery().
|
static |
Definition at line 3568 of file chan_iax2.c.
References build_rand_pad(), iax_frame::callno, iax_frame::data, iax_frame::datalen, ast_iax2_full_hdr::dcallno, iax_frame::dcallno, decode_frame(), iax_frame::ecx, iax_frame::encmethods, encrypt_frame(), IAX_FLAG_RETRANS, iaxs, chan_iax2_pvt::iseqno, ast_iax2_full_hdr::iseqno, iax_frame::iseqno, iax_frame::mydcx, and iax_frame::semirand.
Referenced by __attempt_transmit().
|
static |
Definition at line 9144 of file chan_iax2.c.
References iax2_peer::addr, ao2_cleanup, ast_app_inboxcount(), ast_db_del(), ast_db_put(), AST_DEVICE_UNAVAILABLE, AST_DEVICE_UNKNOWN, AST_DEVSTATE_CACHABLE, ast_devstate_changed(), ast_endpoint_blob_publish(), AST_ENDPOINT_OFFLINE, AST_ENDPOINT_ONLINE, ast_endpoint_set_state(), ast_endpoint_state_type(), AST_FRAME_IAX, ast_json_pack(), ast_json_unref(), ast_log, ast_mutex_lock, ast_mutex_unlock, ast_mwi_state_cache(), ast_mwi_state_type(), AST_SCHED_DEL, ast_sockaddr_cmp(), ast_sockaddr_copy(), ast_sockaddr_isnull(), ast_sockaddr_port, ast_sockaddr_stringify(), ast_sockaddr_stringify_addr(), ast_strdupa, ast_strlen_zero(), ast_test_flag, ast_test_flag64, ast_verb, iax_ie_data::buf, iax2_peer::callno, iax2_peer::cid_name, iax2_peer::cid_num, iax2_peer::endpoint, iax2_peer::expire, expire_registry(), iax2_peer::expiry, find_peer(), globalflags, iax2_datetime(), iax2_poke_peer(), iax2_regfunk, iax2_sched_add(), IAX_COMMAND_REGACK, iax_firmware_get_version(), IAX_HASCALLERID, IAX_IE_APPARENT_ADDR, iax_ie_append_addr(), iax_ie_append_int(), iax_ie_append_short(), iax_ie_append_str(), IAX_IE_CALLING_NAME, IAX_IE_CALLING_NUMBER, IAX_IE_DATETIME, IAX_IE_FIRMWAREVER, IAX_IE_MSGCOUNT, IAX_IE_REFRESH, IAX_IE_USERNAME, IAX_RTCACHEFRIENDS, IAX_RTUPDATE, IAX_STATE_AUTHENTICATED, IAX_TEMPONLY, iaxs, iaxsl, LOG_NOTICE, LOG_WARNING, iax2_peer::mailbox, max_reg_expire, iax2_peer::maxcallno, min_reg_expire, iax2_peer::name, ast_mwi_state::new_msgs, NULL, ast_mwi_state::old_msgs, peer_ref(), peer_unref(), peercnt_modify(), iax_ie_data::pos, RAII_VAR, realtime_update_peer(), refresh, register_peer_exten(), send_command_final(), iax2_peer::sockfd, stasis_cache_get(), stasis_message_data(), version, and iax2_peer::zonetag.
Referenced by socket_process_helper().
|
static |
Definition at line 2043 of file chan_iax2.c.
References CMP_MATCH, CMP_STOP, iax2_user::flags, name, and OBJ_KEY.
Referenced by load_objects().
|
static |
Definition at line 13563 of file chan_iax2.c.
References ast_set_flag64, and IAX_DELME.
Referenced by delete_users().
|
static |
Definition at line 13278 of file chan_iax2.c.
References ast_free_acl_list(), ast_string_field_free_memory, ast_variables_destroy(), free_context(), and NULL.
Referenced by build_user().
|
static |
Definition at line 2032 of file chan_iax2.c.
References ast_str_hash(), iax2_user::flags, name, and OBJ_KEY.
Referenced by load_objects().
Definition at line 2086 of file chan_iax2.c.
Referenced by authenticate_request(), authenticate_verify(), build_user(), calltoken_required(), check_access(), handle_cli_iax2_prune_realtime(), handle_cli_iax2_show_users(), iax2_destroy_helper(), prune_users(), requirecalltoken_mark_auto(), and set_config().
|
static |
Definition at line 9520 of file chan_iax2.c.
References AST_LIST_TRAVERSE, iax_frame::callno, frame_queue, last, iax_frame::list, iax_frame::oseqno, iax_frame::retries, and send_packet().
Referenced by socket_process_helper().
|
static |
Definition at line 5425 of file chan_iax2.c.
References chan_iax2_pvt::callno, DEADLOCK_AVOIDANCE, iaxs, iaxsl, and chan_iax2_pvt::peercallno.
Referenced by iax2_indicate(), and iax2_setoption().
|
static |
Definition at line 15139 of file chan_iax2.c.
|
static |
Definition at line 473 of file chan_iax2.c.
Referenced by __find_callno(), ast_res_pjsip_initialize_configuration(), build_user(), channel_snapshot_base_create(), check_access(), func_channel_write_real(), load_module(), set_config(), set_config_destroy(), tds_log(), and verify_mock_cdr_record().
|
static |
subscription id for ACL change events
Definition at line 328 of file chan_iax2.c.
Referenced by acl_change_stasis_subscribe(), acl_change_stasis_unsubscribe(), rtp_reload(), and unload_module().
|
static |
|
static |
Definition at line 477 of file chan_iax2.c.
Referenced by build_peer(), build_user(), and set_config().
|
static |
Definition at line 476 of file chan_iax2.c.
Referenced by __find_callno(), build_radius_record(), cdr_read_callback(), cdr_write(), func_channel_write_real(), set_config(), set_config_destroy(), and verify_mock_cdr_record().
|
static |
Definition at line 15139 of file chan_iax2.c.
|
static |
Name of effective auth method.
Definition at line 399 of file chan_iax2.c.
Referenced by socket_process_helper().
|
static |
Definition at line 345 of file chan_iax2.c.
Referenced by authenticate_verify(), register_verify(), set_config(), and socket_process_helper().
|
static |
Definition at line 346 of file chan_iax2.c.
Referenced by iax2_call(), and set_config().
|
static |
Table containing custom callno limit rules for a range of ip addresses.
Definition at line 1009 of file chan_iax2.c.
Referenced by __unload_module(), build_callno_limits(), load_objects(), reload_config(), set_config_destroy(), and set_peercnt_limit().
|
static |
table of available call numbers
Definition at line 966 of file chan_iax2.c.
Referenced by create_callno_pools(), get_unused_callno(), handle_cli_iax2_show_callno_limits(), and replace_callno().
|
static |
Definition at line 963 of file chan_iax2.c.
Referenced by get_unused_callno(), and replace_callno().
|
static |
table of available trunk call numbers
Definition at line 969 of file chan_iax2.c.
Referenced by create_callno_pools(), get_unused_callno(), handle_cli_iax2_show_callno_limits(), and replace_callno().
|
static |
Table containing ip addresses not requiring calltoken validation
Definition at line 1012 of file chan_iax2.c.
Referenced by __unload_module(), add_calltoken_ignore(), calltoken_required(), load_objects(), reload_config(), and set_config_destroy().
|
static |
Definition at line 14718 of file chan_iax2.c.
Referenced by __unload_module(), and load_module().
unsigned int cos |
Definition at line 356 of file chan_iax2.c.
Referenced by a2lsf(), ast_netsock_bind(), ast_netsock_bindaddr(), ast_netsock_set_qos(), ast_playtones_start(), ast_rtp_instance_set_qos(), ast_rtp_qos_set(), ast_set_qos(), ast_sip_initialize_sorcery_transport(), ast_str2cos(), ast_udptl_setqos(), callerid_init(), goertzel_init(), lsf2a(), smath(), smb_fft(), smb_pitch_shift(), tdd_init(), and tonepair_alloc().
|
static |
Definition at line 1225 of file chan_iax2.c.
Referenced by handle_cli_iax2_set_debug(), iax_outputframe(), and reload_config().
|
static |
Definition at line 1014 of file chan_iax2.c.
Referenced by set_config().
|
static |
Definition at line 1016 of file chan_iax2.c.
Referenced by set_config().
|
static |
Definition at line 322 of file chan_iax2.c.
Referenced by __find_callno(), and set_config().
|
static |
Definition at line 368 of file chan_iax2.c.
Referenced by build_peer(), create_addr(), iax2_do_register(), peer_set_sock_cb(), peer_set_srcaddr(), and set_config().
|
static |
Definition at line 478 of file chan_iax2.c.
Referenced by auth_fail(), set_config(), set_config_destroy(), and socket_process_helper().
|
static |
|
static |
struct iax_frame* first |
Definition at line 980 of file chan_iax2.c.
struct { ... } frame_queue[IAX_MAX_CALLS] |
a list of frames that may need to be retransmitted
Referenced by __attempt_transmit(), complete_transfer(), handle_cli_iax2_show_stats(), pvt_destructor(), resend_with_token(), socket_process_helper(), transmit_frame(), and vnak_retransmit().
|
static |
Maximum MTU, 0 if not used
Definition at line 317 of file chan_iax2.c.
Referenced by handle_cli_iax2_set_mtu(), handle_cli_iax2_show_stats(), iax2_trunk_queue(), and set_config().
|
static |
Definition at line 1018 of file chan_iax2.c.
Referenced by set_config(), and set_peercnt_limit().
|
static |
Total num of call numbers allowed to be allocated without calltoken validation
Definition at line 1021 of file chan_iax2.c.
Referenced by get_unused_callno(), handle_cli_iax2_show_callno_limits(), and set_config().
|
static |
Definition at line 529 of file chan_iax2.c.
Referenced by realtime_peer(), and set_config().
|
static |
Definition at line 482 of file chan_iax2.c.
Referenced by __expire_registry(), __find_callno(), build_peer(), build_user(), check_access(), iax2_request(), iax2_trunk_queue(), realtime_peer(), realtime_update_peer(), realtime_user(), send_trunk(), set_config(), set_config_destroy(), socket_process_helper(), and update_registry().
|
static |
Definition at line 480 of file chan_iax2.c.
Referenced by build_peer(), build_user(), iax2_call(), and set_config().
|
static |
Definition at line 459 of file chan_iax2.c.
Referenced by build_peer(), build_user(), iax2_request(), and set_config().
|
static |
Definition at line 479 of file chan_iax2.c.
Referenced by build_peer(), build_user(), iax2_call(), and set_config().
|
static |
Definition at line 370 of file chan_iax2.c.
Referenced by __expire_registry(), reg_source_db(), and update_registry().
|
static |
Definition at line 14708 of file chan_iax2.c.
Referenced by __unload_module(), and load_module().
|
static |
Definition at line 1341 of file chan_iax2.c.
Referenced by __unload_module(), acf_channel_read(), ast_iax2_new(), function_iaxpeer(), iax2_prov_app(), and load_module().
|
static |
Definition at line 1569 of file chan_iax2.c.
Referenced by acf_iaxvar_read(), acf_iaxvar_write(), ast_iax2_new(), authenticate_reply(), iax2_call(), and socket_process_helper().
|
static |
Another container of iax2_pvt structures.
Active IAX2 pvt structs are also stored in this container, if they are a part of an active call where we know the remote side's call number. The reason for this is that incoming media frames do not contain our call number. So, instead of having to iterate the entire iaxs array, we use this container to look up calls where the remote side is using a given call number.
Definition at line 1202 of file chan_iax2.c.
Referenced by __find_callno(), __unload_module(), load_objects(), remove_by_peercallno(), and store_by_peercallno().
|
static |
Another container of iax2_pvt structures.
Active IAX2 pvt structs used during transfering a call are stored here.
Definition at line 1218 of file chan_iax2.c.
Referenced by __find_callno(), __unload_module(), load_objects(), remove_by_transfercallno(), and store_by_transfercallno().
|
static |
Definition at line 724 of file chan_iax2.c.
Referenced by iax2_process_thread(), and iax2_process_thread_cleanup().
|
static |
Definition at line 347 of file chan_iax2.c.
Referenced by set_config(), and socket_process_helper().
|
static |
Definition at line 461 of file chan_iax2.c.
Referenced by __find_callno(), calc_rxstamp(), calc_timestamp(), decode_frame(), encrypt_frame(), handle_cli_iax2_set_debug(), iax2_call(), iax2_do_register(), iax2_indicate(), iax_debug_output(), iax_outputframe(), send_packet(), socket_process_helper(), and unwrap_timestamp().
|
static |
Definition at line 350 of file chan_iax2.c.
Referenced by complete_dpreply(), dp_lookup(), and find_cache().
|
static |
Definition at line 352 of file chan_iax2.c.
Referenced by find_cache().
|
static |
Definition at line 722 of file chan_iax2.c.
Referenced by find_idle_thread(), and iax2_process_thread().
|
static |
Definition at line 723 of file chan_iax2.c.
Referenced by find_idle_thread().
|
static |
Definition at line 721 of file chan_iax2.c.
Referenced by find_idle_thread(), and set_config().
|
static |
Definition at line 14627 of file chan_iax2.c.
Referenced by load_module(), and unload_module().
|
static |
an array of iax2 pvt structures
The container for active chan_iax2_pvt structures is implemented as an array for extremely quick direct access to the correct pvt structure based on the local call number. The local call number is used as the index into the array where the associated pvt structure is stored.
Definition at line 1173 of file chan_iax2.c.
Referenced by __attempt_transmit(), __auth_reject(), __auto_congest(), __auto_hangup(), __do_deliver(), __find_callno(), __get_from_jb(), __send_lagrq(), __send_ping(), __unload_module(), acf_channel_read(), ast_cli_netstats(), ast_iax2_new(), auth_fail(), auth_reject(), authenticate_reply(), authenticate_request(), auto_hangup(), cache_get_callno_locked(), calc_timestamp(), check_access(), complete_transfer(), decrypt_frame(), delete_users(), dp_lookup(), find_cache(), fix_peerts(), function_iaxpeer(), handle_cli_iax2_show_channels(), iax2_ack_registry(), iax2_call(), iax2_destroy(), iax2_do_register(), iax2_dprequest(), iax2_fixup(), iax2_hangup(), iax2_indicate(), iax2_lock_callno_unless_destroyed(), iax2_lock_owner(), iax2_poke_peer(), iax2_predestroy(), iax2_prov_app(), iax2_provision(), iax2_queryoption(), iax2_queue_frame(), iax2_queue_hangup(), iax2_queue_hold(), iax2_queue_unhold(), iax2_request(), iax2_setoption(), iax2_vnak(), iax2_write(), iax_pvt_callid_get(), iax_pvt_callid_set(), load_module(), log_jitterstats(), make_trunk(), register_verify(), registry_authrequest(), registry_rerequest(), resend_with_token(), save_osptoken(), save_rr(), schedule_delivery(), scheduled_destroy(), send_command_final(), send_command_locked(), send_packet(), set_hangup_source_and_cause(), socket_process_helper(), socket_process_meta(), stop_stuff(), transmit_frame(), unwrap_timestamp(), update_packet(), update_registry(), and wait_for_peercallno().
|
static |
chan_iax2_pvt structure locks
These locks are used when accessing a pvt structure in the iaxs array. The index used here is the same as used in the iaxs array. It is the local call number for the associated pvt struct.
Definition at line 1211 of file chan_iax2.c.
Referenced by __attempt_transmit(), __auth_reject(), __auto_congest(), __auto_hangup(), __find_callno(), __get_from_jb(), __iax2_poke_noanswer(), __send_lagrq(), __send_ping(), __unload_module(), acf_channel_read(), ast_cli_netstats(), ast_iax2_new(), auth_reject(), authenticate_reply(), auto_hangup(), cache_get_callno_locked(), delete_users(), dp_lookup(), find_cache(), handle_cli_iax2_show_channels(), handle_cli_iax2_show_stats(), iax2_call(), iax2_destroy(), iax2_do_register(), iax2_fixup(), iax2_hangup(), iax2_indicate(), iax2_key_rotate(), iax2_lock_callno_unless_destroyed(), iax2_lock_owner(), iax2_poke_peer(), iax2_provision(), iax2_queryoption(), iax2_request(), iax2_setoption(), iax2_write(), load_module(), log_jitterstats(), make_trunk(), peer_destructor(), pvt_destructor(), register_verify(), registry_authrequest(), scheduled_destroy(), send_command_locked(), set_hangup_source_and_cause(), socket_process_helper(), socket_process_meta(), transmit_frame(), update_registry(), and wait_for_peercallno().
|
static |
Definition at line 720 of file chan_iax2.c.
Referenced by handle_cli_iax2_show_threads(), set_config(), and start_network_thread().
|
static |
Definition at line 463 of file chan_iax2.c.
Referenced by handle_cli_iax2_set_debug_trunk(), and timing_read().
|
static |
Definition at line 10198 of file chan_iax2.c.
Referenced by load_module(), and unload_module().
|
static |
|
static |
Definition at line 456 of file chan_iax2.c.
Referenced by load_module(), network_thread(), peer_set_srcaddr(), and set_config().
|
static |
Definition at line 338 of file chan_iax2.c.
Referenced by new_iax(), and set_config().
|
static |
Definition at line 334 of file chan_iax2.c.
Referenced by __find_callno(), __send_lagrq(), make_trunk(), and set_config().
|
static |
Definition at line 324 of file chan_iax2.c.
Referenced by add_format_information_cb(), ari_bridges_play_helper(), ari_channels_handle_play(), ast_res_pjsip_initialize_configuration(), ast_say_enumeration(), ast_say_enumeration_full_da(), ast_say_enumeration_full_de(), ast_say_enumeration_full_en(), ast_say_enumeration_full_he(), ast_say_enumeration_full_is(), ast_say_enumeration_full_vi(), ast_say_number(), ast_say_number_full_cs(), ast_say_number_full_da(), ast_say_number_full_de(), ast_say_number_full_en(), ast_say_number_full_en_GB(), ast_say_number_full_es(), ast_say_number_full_fr(), ast_say_number_full_gr(), ast_say_number_full_he(), ast_say_number_full_hu(), ast_say_number_full_is(), ast_say_number_full_it(), ast_say_number_full_ja(), ast_say_number_full_ka(), ast_say_number_full_nl(), ast_say_number_full_no(), ast_say_number_full_pl(), ast_say_number_full_pt(), ast_say_number_full_ru(), ast_say_number_full_se(), ast_say_number_full_th(), ast_say_number_full_ur(), ast_say_number_full_vi(), ast_say_number_full_zh(), ast_say_ordinal(), build_user(), channel_snapshot_base_create(), check_access(), conf_load_config(), func_channel_write_real(), load_module(), pl_odtworz_plik(), powiedz(), say_and_wait(), say_enumeration_full(), say_number_full(), say_ordinal_full(), set_config(), set_config_destroy(), set_pvt_defaults(), show_sound_info_cb(), stasis_app_control_play_uri(), store_config_core(), tds_load_module(), and xmldoc_get_node().
struct iax_frame* last |
Definition at line 980 of file chan_iax2.c.
Referenced by vnak_retransmit().
|
static |
Definition at line 348 of file chan_iax2.c.
Referenced by check_access(), register_verify(), and registry_authrequest().
|
static |
Definition at line 986 of file chan_iax2.c.
Referenced by handle_call_token(), and set_config().
|
static |
Definition at line 360 of file chan_iax2.c.
Referenced by set_config(), and update_registry().
|
static |
Definition at line 332 of file chan_iax2.c.
Referenced by __attempt_transmit(), and load_module().
|
static |
Definition at line 331 of file chan_iax2.c.
Referenced by build_user(), and set_config().
|
static |
Definition at line 335 of file chan_iax2.c.
Referenced by new_iax(), and set_config().
|
static |
Definition at line 337 of file chan_iax2.c.
Referenced by new_iax(), and set_config().
|
static |
Definition at line 359 of file chan_iax2.c.
Referenced by __expire_registry(), __find_callno(), build_peer(), set_config(), and update_registry().
|
static |
Definition at line 474 of file chan_iax2.c.
Referenced by __find_callno(), build_peer(), build_user(), check_access(), iax2_call(), set_config(), set_config_destroy(), set_pvt_defaults(), and store_config_core().
|
static |
Definition at line 475 of file chan_iax2.c.
Referenced by __find_callno(), ast_res_pjsip_initialize_configuration(), build_peer(), build_user(), check_access(), iax2_call(), set_config(), and set_config_destroy().
|
static |
Definition at line 366 of file chan_iax2.c.
Referenced by __unload_module(), ast_netsock_destroy(), load_module(), peer_set_srcaddr(), and set_config().
|
static |
Definition at line 484 of file chan_iax2.c.
Referenced by __unload_module(), and start_network_thread().
|
static |
Definition at line 329 of file chan_iax2.c.
Referenced by network_change_sched_cb(), and network_change_stasis_cb().
|
static |
subscription id for network change events
Definition at line 327 of file chan_iax2.c.
Referenced by network_change_stasis_subscribe(), and network_change_stasis_unsubscribe().
|
static |
used if sourceaddress specified and bindaddr == INADDR_ANY
Definition at line 367 of file chan_iax2.c.
Referenced by __unload_module(), load_module(), peer_set_srcaddr(), and set_config().
|
static |
Definition at line 12415 of file chan_iax2.c.
Referenced by __unload_module(), and load_module().
|
static |
Table containing peercnt objects for every ip address consuming a callno
Definition at line 1006 of file chan_iax2.c.
Referenced by __unload_module(), handle_cli_iax2_show_callno_limits(), load_objects(), peercnt_add(), peercnt_modify(), peercnt_remove(), peercnt_remove_by_addr(), reload_config(), and sched_delay_remove().
|
static |
Definition at line 1000 of file chan_iax2.c.
|
static |
Definition at line 333 of file chan_iax2.c.
Referenced by __find_callno(), __send_ping(), make_trunk(), and set_config().
|
static |
Definition at line 308 of file chan_iax2.c.
Referenced by build_peer(), build_user(), create_addr(), new_iax(), and set_config().
struct { ... } qos |
Referenced by peer_set_srcaddr(), set_config(), and set_qos().
|
static |
Definition at line 984 of file chan_iax2.c.
Referenced by handle_call_token(), and load_module().
|
static |
Definition at line 325 of file chan_iax2.c.
Referenced by __unload_module(), add_to_regcontext(), ast_sip_initialize_sorcery_global(), ast_sip_persistent_endpoint_add_to_regcontext(), ast_sip_persistent_endpoint_update_state(), conf_load_config(), register_peer_exten(), and set_config().
|
static |
Referenced by cli_complete_registration(), and get_registrations().
|
static |
Definition at line 336 of file chan_iax2.c.
Referenced by new_iax(), and set_config().
|
static |
Definition at line 457 of file chan_iax2.c.
|
static |
Definition at line 362 of file chan_iax2.c.
Referenced by __iax2_do_register_s(), build_peer(), create_addr(), iax2_append_register(), and set_config().
|
static |
Definition at line 310 of file chan_iax2.c.
|
static |
Definition at line 465 of file chan_iax2.c.
Referenced by handle_cli_iax2_test_losspct(), and socket_read().
|
static |
Definition at line 364 of file chan_iax2.c.
Referenced by __ast_channel_alloc_ap(), __unload_module(), ack_ticks(), ast_bridge_features_init(), ast_sip_session_create_outgoing(), build_peer(), build_user(), check_timer(), dahdi_timer_ack(), dahdi_timer_close(), dahdi_timer_disable_continuous(), dahdi_timer_enable_continuous(), dahdi_timer_fd(), dahdi_timer_get_event(), dahdi_timer_open(), dahdi_timer_set_rate(), kqueue_timer_ack(), kqueue_timer_close(), kqueue_timer_disable_continuous(), kqueue_timer_disable_continuous_event(), kqueue_timer_enable_continuous(), kqueue_timer_enable_continuous_event(), kqueue_timer_fd(), kqueue_timer_fini_continuous_event(), kqueue_timer_get_event(), kqueue_timer_init_continuous_event(), kqueue_timer_open(), kqueue_timer_set_rate(), load_module(), network_thread(), new_invite(), process_dahdi(), pthread_timer_ack(), pthread_timer_close(), pthread_timer_destructor(), pthread_timer_disable_continuous(), pthread_timer_enable_continuous(), pthread_timer_fd(), pthread_timer_get_event(), pthread_timer_hash(), pthread_timer_open(), pthread_timer_set_rate(), run_timer(), set_config(), signal_pipe(), softmix_mixing_loop(), timer_destroy(), timerfd_timer_ack(), timerfd_timer_disable_continuous(), timerfd_timer_enable_continuous(), timerfd_timer_fd(), timerfd_timer_get_event(), timerfd_timer_open(), timerfd_timer_set_rate(), timing_read(), timing_test(), and unsignal_pipe().
unsigned int tos |
Definition at line 355 of file chan_iax2.c.
Referenced by ast_netsock_bind(), ast_netsock_bindaddr(), ast_netsock_set_qos(), ast_rtp_instance_set_qos(), ast_rtp_qos_set(), ast_set_qos(), ast_str2tos(), ast_tos2str(), and ast_udptl_setqos().
|
static |
Definition at line 1023 of file chan_iax2.c.
Referenced by get_unused_callno(), handle_cli_iax2_show_callno_limits(), and replace_callno().
|
static |
|
static |
Definition at line 982 of file chan_iax2.c.
Referenced by __unload_module(), iax2_transmit(), and load_objects().
|
static |
Definition at line 318 of file chan_iax2.c.
Referenced by handle_cli_iax2_show_stats(), iax2_trunk_queue(), and reload_config().
|
static |
Trunk MTU statistics
Definition at line 318 of file chan_iax2.c.
Referenced by handle_cli_iax2_show_stats(), and reload_config().
|
static |
Definition at line 318 of file chan_iax2.c.
Referenced by handle_cli_iax2_show_stats(), reload_config(), and timing_read().
|
static |
Definition at line 318 of file chan_iax2.c.
Referenced by handle_cli_iax2_show_stats(), iax2_trunk_queue(), and reload_config().
|
static |
Definition at line 342 of file chan_iax2.c.
Referenced by load_module(), send_trunk(), and set_config().
|
static |
Definition at line 343 of file chan_iax2.c.
Referenced by iax2_trunk_queue(), set_config(), set_config_destroy(), and timing_read().
|
static |
Definition at line 1003 of file chan_iax2.c.