Asterisk - The Open Source Telephony Project
18.5.0
|
Implementation of Media Gateway Control Protocol. More...
#include "asterisk.h"
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <fcntl.h>
#include <netdb.h>
#include <signal.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <ctype.h>
#include "asterisk/lock.h"
#include "asterisk/channel.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/pickup.h"
#include "asterisk/pbx.h"
#include "asterisk/sched.h"
#include "asterisk/io.h"
#include "asterisk/rtp_engine.h"
#include "asterisk/acl.h"
#include "asterisk/callerid.h"
#include "asterisk/cli.h"
#include "asterisk/say.h"
#include "asterisk/astdb.h"
#include "asterisk/features.h"
#include "asterisk/app.h"
#include "asterisk/mwi.h"
#include "asterisk/musiconhold.h"
#include "asterisk/utils.h"
#include "asterisk/netsock2.h"
#include "asterisk/causes.h"
#include "asterisk/dsp.h"
#include "asterisk/devicestate.h"
#include "asterisk/stringfields.h"
#include "asterisk/abstract_jb.h"
#include "asterisk/chanvars.h"
#include "asterisk/pktccops.h"
#include "asterisk/stasis.h"
#include "asterisk/bridge.h"
#include "asterisk/features_config.h"
#include "asterisk/parking.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Data Structures | |
struct | mgcp_endpoint |
struct | mgcp_gateway |
struct | mgcp_message |
mgcp_message: MGCP message for queuing up More... | |
struct | mgcp_request |
struct | mgcp_response |
struct | mgcp_subchannel |
Macros | |
#define | DEFAULT_EXPIRY 120 |
#define | DEFAULT_MGCP_CA_PORT 2727 |
#define | DEFAULT_MGCP_GW_PORT 2427 |
#define | DEFAULT_RETRANS 1000 |
#define | DIRECTMEDIA 1 |
#define | INADDR_NONE (in_addr_t)(-1) |
#define | MAX_EXPIRY 3600 |
#define | MAX_RETRANS 5 |
#define | MAX_SUBS 2 |
#define | MGCP_CX_CONF 3 |
#define | MGCP_CX_CONFERENCE 3 |
#define | MGCP_CX_INACTIVE 4 |
#define | MGCP_CX_MUTE 4 |
#define | MGCP_CX_RECVONLY 1 |
#define | MGCP_CX_SENDONLY 0 |
#define | MGCP_CX_SENDRECV 2 |
#define | MGCP_DTMF_HYBRID (1 << 2) |
#define | MGCP_DTMF_INBAND (1 << 1) |
#define | MGCP_DTMF_RFC2833 (1 << 0) |
#define | MGCP_MAX_HEADERS 64 |
#define | MGCP_MAX_LINES 64 |
#define | MGCP_MAX_PACKET 1500 |
#define | MGCP_OFFHOOK 2 |
#define | MGCP_ONHOOK 1 |
#define | MGCP_SUBCHANNEL_MAGIC "!978!" |
#define | MGCPDUMPER |
#define | RESPONSE_TIMEOUT 30 |
#define | SUB_ALT 1 |
#define | SUB_REAL 0 |
#define | TYPE_LINE 2 |
#define | TYPE_TRUNK 1 |
Enumerations | |
enum | { MGCP_CMD_EPCF, MGCP_CMD_CRCX, MGCP_CMD_MDCX, MGCP_CMD_DLCX, MGCP_CMD_RQNT, MGCP_CMD_NTFY, MGCP_CMD_AUEP, MGCP_CMD_AUCX, MGCP_CMD_RSIP } |
Functions | |
static char * | __get_header (struct mgcp_request *req, char *name, int *start, char *def) |
static int | __mgcp_xmit (struct mgcp_gateway *gw, char *data, int len) |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | acf_channel_read (struct ast_channel *chan, const char *funcname, char *preparse, char *buf, size_t buflen) |
static int | add_header (struct mgcp_request *req, const char *var, const char *value) |
static void | add_header_offhook (struct mgcp_subchannel *sub, struct mgcp_request *resp, char *tone) |
static int | add_line (struct mgcp_request *req, char *line) |
static int | add_sdp (struct mgcp_request *resp, struct mgcp_subchannel *sub, struct ast_rtp_instance *rtp) |
static struct ast_variable * | add_var (const char *buf, struct ast_variable *list) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | attempt_transfer (struct mgcp_endpoint *p, struct mgcp_subchannel *sub) |
Complete an attended transfer. More... | |
static struct mgcp_gateway * | build_gateway (char *cat, struct ast_variable *v) |
build_gateway: parse mgcp.conf and create gateway/endpoint structures More... | |
static char * | control2str (int ind) |
static struct ast_variable * | copy_vars (struct ast_variable *src) |
duplicate a list of channel variables, More... | |
static void | destroy_endpoint (struct mgcp_endpoint *e) |
static void | destroy_gateway (struct mgcp_gateway *g) |
static void * | do_monitor (void *data) |
static void | dump_cmd_queues (struct mgcp_endpoint *p, struct mgcp_subchannel *sub) |
dump_cmd_queues: (SC:) cleanup pending commands More... | |
static void | dump_queue (struct mgcp_gateway *gw, struct mgcp_endpoint *p) |
static int | find_and_retrans (struct mgcp_subchannel *sub, struct mgcp_request *req) |
static struct mgcp_request * | find_command (struct mgcp_endpoint *p, struct mgcp_subchannel *sub, struct mgcp_request **queue, ast_mutex_t *l, int ident) |
find_command: (SC:) remove command transaction from queue More... | |
static struct mgcp_gateway * | find_realtime_gw (char *name, char *at, struct sockaddr_in *sin) |
static struct mgcp_subchannel * | find_subchannel_and_lock (char *name, int msgid, struct sockaddr_in *sin) |
static char * | get_csv (char *c, int *len, char **next) |
get_csv: (SC:) get comma separated value More... | |
static char * | get_header (struct mgcp_request *req, char *name) |
static char * | get_sdp (struct mgcp_request *req, char *name) |
static char * | get_sdp_by_line (char *line, char *name, int nameLen) |
static char * | get_sdp_iterate (int *iterator, struct mgcp_request *req, char *name) |
static void | handle_hd_hf (struct mgcp_subchannel *sub, char *ev) |
static char * | handle_mgcp_audit_endpoint (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_mgcp_set_debug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_mgcp_show_endpoints (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | handle_request (struct mgcp_subchannel *sub, struct mgcp_request *req, struct sockaddr_in *sin) |
static void | handle_response (struct mgcp_endpoint *p, struct mgcp_subchannel *sub, int result, unsigned int ident, struct mgcp_request *resp) |
static int | has_voicemail (struct mgcp_endpoint *p) |
static int | init_req (struct mgcp_endpoint *p, struct mgcp_request *req, char *verb, unsigned int oseq) |
static int | init_resp (struct mgcp_request *req, char *resp, struct mgcp_request *orig, char *resprest) |
static int | load_module (void) |
Load the module. More... | |
static int | mgcp_alloc_pktcgate (struct mgcp_subchannel *sub) |
static int | mgcp_answer (struct ast_channel *ast) |
static int | mgcp_call (struct ast_channel *ast, const char *dest, int timeout) |
static int | mgcp_devicestate (const char *data) |
mgcp_devicestate: channel callback for device status monitoring More... | |
static int | mgcp_fixup (struct ast_channel *oldchan, struct ast_channel *newchan) |
static void | mgcp_get_codec (struct ast_channel *chan, struct ast_format_cap *result) |
static enum ast_rtp_glue_result | mgcp_get_rtp_peer (struct ast_channel *chan, struct ast_rtp_instance **instance) |
static int | mgcp_hangup (struct ast_channel *ast) |
static int | mgcp_indicate (struct ast_channel *ast, int ind, const void *data, size_t datalen) |
static struct ast_channel * | mgcp_new (struct mgcp_subchannel *sub, int state, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor) |
static int | mgcp_pktcgate_open (struct cops_gate *gate) |
static int | mgcp_pktcgate_remove (struct cops_gate *gate) |
static int | mgcp_postrequest (struct mgcp_endpoint *p, struct mgcp_subchannel *sub, char *data, int len, unsigned int seqno) |
static int | mgcp_prune_realtime_gateway (struct mgcp_gateway *g) |
static void | mgcp_queue_control (struct mgcp_subchannel *sub, int control) |
static void | mgcp_queue_frame (struct mgcp_subchannel *sub, struct ast_frame *f) |
static void | mgcp_queue_hangup (struct mgcp_subchannel *sub) |
static struct ast_frame * | mgcp_read (struct ast_channel *ast) |
static char * | mgcp_reload (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static struct ast_channel * | mgcp_request (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *dest, int *cause) |
static struct ast_frame * | mgcp_rtp_read (struct mgcp_subchannel *sub) |
static int | mgcp_senddigit_begin (struct ast_channel *ast, char digit) |
static int | mgcp_senddigit_end (struct ast_channel *ast, char digit, unsigned int duration) |
static void | mgcp_set_owner (struct mgcp_subchannel *sub, struct ast_channel *chan) |
static int | mgcp_set_rtp_peer (struct ast_channel *chan, struct ast_rtp_instance *rtp, struct ast_rtp_instance *vrtp, struct ast_rtp_instance *trtp, const struct ast_format_cap *cap, int nat_active) |
static void * | mgcp_ss (void *data) |
static int | mgcp_write (struct ast_channel *ast, struct ast_frame *frame) |
static int | mgcpsock_read (int *id, int fd, short events, void *ignore) |
static void | parse (struct mgcp_request *req) |
static int | process_sdp (struct mgcp_subchannel *sub, struct mgcp_request *req) |
static void | prune_gateways (void) |
static int | reload (void) |
static int | reload_config (int reload) |
static int | reqprep (struct mgcp_request *req, struct mgcp_endpoint *p, char *verb) |
static int | resend_response (struct mgcp_subchannel *sub, struct mgcp_response *resp) |
static int | respprep (struct mgcp_request *resp, struct mgcp_endpoint *p, char *msg, struct mgcp_request *req, char *msgrest) |
static int | restart_monitor (void) |
static int | retrans_pkt (const void *data) |
static void | sdpLineNum_iterator_init (int *iterator) |
static int | send_request (struct mgcp_endpoint *p, struct mgcp_subchannel *sub, struct mgcp_request *req, unsigned int seqno) |
static int | send_response (struct mgcp_subchannel *sub, struct mgcp_request *req) |
static void | start_rtp (struct mgcp_subchannel *sub) |
static int | transmit_audit_endpoint (struct mgcp_endpoint *p) |
static int | transmit_connect (struct mgcp_subchannel *sub) |
static int | transmit_connect_with_sdp (struct mgcp_subchannel *sub, struct ast_rtp_instance *rtp) |
static int | transmit_connection_del (struct mgcp_subchannel *sub) |
static int | transmit_connection_del_w_params (struct mgcp_endpoint *p, char *callid, char *cxident) |
static int | transmit_modify_request (struct mgcp_subchannel *sub) |
static int | transmit_modify_with_sdp (struct mgcp_subchannel *sub, struct ast_rtp_instance *rtp, const struct ast_format_cap *codecs) |
static int | transmit_notify_request (struct mgcp_subchannel *sub, char *tone) |
static int | transmit_notify_request_with_callerid (struct mgcp_subchannel *sub, char *tone, char *callernum, char *callername) |
static int | transmit_response (struct mgcp_subchannel *sub, char *msg, struct mgcp_request *req, char *msgrest) |
static int | unalloc_sub (struct mgcp_subchannel *sub) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Media Gateway Control Protocol (MGCP)" , .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 = "30ef0c93b36035ec78c9cfd712d36d9b" , .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, .optional_modules = "res_pktccops", } |
static struct in_addr | __ourip |
static char | accountcode [AST_MAX_ACCOUNT_CODE] = "" |
static int | adsi = 0 |
static int | amaflags = 0 |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct sockaddr_in | bindaddr |
static int | callreturn = 0 |
static int | callwaiting = 0 |
static int | cancallforward = 0 |
static char | cid_name [AST_MAX_EXTENSION] = "" |
static char | cid_num [AST_MAX_EXTENSION] = "" |
static struct ast_cli_entry | cli_mgcp [] |
static const char | config [] = "mgcp.conf" |
static char | context [AST_MAX_EXTENSION] = "default" |
static ast_group_t | cur_callergroup = 0 |
static ast_group_t | cur_pickupgroup = 0 |
static struct ast_jb_conf | default_jbconf |
static int | directmedia = DIRECTMEDIA |
static int | dtmfmode = 0 |
static int | firstdigittimeout = 16000 |
static ast_mutex_t | gatelock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
gatelock: mutex for gateway/endpoint lists More... | |
static struct mgcp_gateway * | gateways = NULL |
static int | gendigittimeout = 8000 |
static struct ast_format_cap * | global_capability |
static struct ast_jb_conf | global_jbconf |
static int | hangupongateremove = 0 |
static int | immediate = 0 |
static struct io_context * | io |
static char | language [MAX_LANGUAGE] = "" |
static char | mailbox [AST_MAX_MAILBOX_UNIQUEID] |
static int | matchdigittimeout = 3000 |
static const char *const | mgcp_cxmodes [] |
static ast_mutex_t | mgcp_reload_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static int | mgcp_reloading = 0 |
static struct ast_rtp_glue | mgcp_rtp_glue |
static struct ast_channel_tech | mgcp_tech |
static int | mgcpdebug = 0 |
static int | mgcpsock = -1 |
static int * | mgcpsock_read_id = NULL |
static pthread_t | monitor_thread = AST_PTHREADT_NULL |
static ast_mutex_t | monlock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static char | musicclass [MAX_MUSICCLASS] = "" |
static int | nat = 0 |
static int | ncs = 0 |
static ast_mutex_t | netlock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static int | nonCodecCapability = AST_RTP_DTMF |
static unsigned int | oseq_global = 0 |
static ast_mutex_t | oseq_lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } |
static char | ourhost [MAXHOSTNAMELEN] |
static int | ourport |
static char | parkinglot [AST_MAX_CONTEXT] |
static int | pktcgatealloc = 0 |
struct { | |
unsigned int cos | |
unsigned int cos_audio | |
unsigned int tos | |
unsigned int tos_audio | |
} | qos = { 0, 0, 0, 0 } |
static struct ast_sched_context * | sched |
static int | singlepath = 0 |
static int | slowsequence = 0 |
static const char | tdesc [] = "Media Gateway Control Protocol (MGCP)" |
static int | threewaycalling = 0 |
static int | transfer = 0 |
Implementation of Media Gateway Control Protocol.
Definition in file chan_mgcp.c.
#define DEFAULT_EXPIRY 120 |
Definition at line 96 of file chan_mgcp.c.
#define DEFAULT_MGCP_CA_PORT 2727 |
#define DEFAULT_MGCP_GW_PORT 2427 |
#define DEFAULT_RETRANS 1000 |
How frequently to retransmit
Definition at line 126 of file chan_mgcp.c.
Referenced by __sip_reliable_xmit(), mgcp_postrequest(), and retrans_pkt().
#define DIRECTMEDIA 1 |
Definition at line 98 of file chan_mgcp.c.
Referenced by build_gateway().
#define INADDR_NONE (in_addr_t)(-1) |
Definition at line 101 of file chan_mgcp.c.
Referenced by build_gateway().
#define MAX_EXPIRY 3600 |
Definition at line 97 of file chan_mgcp.c.
#define MAX_RETRANS 5 |
Try only 5 times for retransmissions
Definition at line 127 of file chan_mgcp.c.
Referenced by retrans_pkt().
#define MAX_SUBS 2 |
Definition at line 291 of file chan_mgcp.c.
Referenced by build_gateway(), destroy_endpoint(), and mgcp_prune_realtime_gateway().
#define MGCP_CX_CONF 3 |
Definition at line 133 of file chan_mgcp.c.
Referenced by handle_request().
#define MGCP_CX_CONFERENCE 3 |
Definition at line 134 of file chan_mgcp.c.
#define MGCP_CX_INACTIVE 4 |
Definition at line 136 of file chan_mgcp.c.
Referenced by build_gateway(), mgcp_hangup(), and unalloc_sub().
#define MGCP_CX_MUTE 4 |
Definition at line 135 of file chan_mgcp.c.
Referenced by handle_request().
#define MGCP_CX_RECVONLY 1 |
Definition at line 131 of file chan_mgcp.c.
Referenced by handle_request(), mgcp_call(), and mgcp_hangup().
#define MGCP_CX_SENDONLY 0 |
MGCP rtp stream modes {
Definition at line 130 of file chan_mgcp.c.
#define MGCP_CX_SENDRECV 2 |
Definition at line 132 of file chan_mgcp.c.
Referenced by handle_hd_hf(), handle_request(), mgcp_answer(), and mgcp_call().
#define MGCP_DTMF_HYBRID (1 << 2) |
Definition at line 121 of file chan_mgcp.c.
Referenced by add_header_offhook(), build_gateway(), mgcp_hangup(), mgcp_new(), mgcp_senddigit_begin(), mgcp_senddigit_end(), and mgcp_ss().
#define MGCP_DTMF_INBAND (1 << 1) |
Definition at line 120 of file chan_mgcp.c.
Referenced by add_header_offhook(), build_gateway(), mgcp_hangup(), mgcp_new(), mgcp_rtp_read(), mgcp_senddigit_begin(), mgcp_senddigit_end(), and mgcp_ss().
#define MGCP_DTMF_RFC2833 (1 << 0) |
Definition at line 119 of file chan_mgcp.c.
Referenced by build_gateway(), mgcp_rtp_read(), mgcp_senddigit_begin(), and mgcp_senddigit_end().
#define MGCP_MAX_HEADERS 64 |
The private structures of the mgcp channels are linked for selecting outgoing channels
Definition at line 250 of file chan_mgcp.c.
Referenced by add_header(), init_req(), init_resp(), and parse().
#define MGCP_MAX_LINES 64 |
Definition at line 251 of file chan_mgcp.c.
Referenced by add_line(), and parse().
#define MGCP_MAX_PACKET 1500 |
Also from RFC 2543, should sub headers tho
Definition at line 125 of file chan_mgcp.c.
#define MGCP_OFFHOOK 2 |
Definition at line 327 of file chan_mgcp.c.
Referenced by handle_hd_hf(), handle_request(), handle_response(), mgcp_call(), mgcp_hangup(), transmit_modify_request(), transmit_notify_request(), and transmit_notify_request_with_callerid().
#define MGCP_ONHOOK 1 |
Definition at line 326 of file chan_mgcp.c.
Referenced by build_gateway(), do_monitor(), handle_request(), handle_response(), mgcp_call(), mgcp_hangup(), mgcp_request(), transmit_modify_request(), transmit_notify_request(), and transmit_notify_request_with_callerid().
#define MGCP_SUBCHANNEL_MAGIC "!978!" |
subchannel magic string. Needed to prove that any subchannel pointer passed by asterisk really points to a valid subchannel memory area. Ugly.. But serves the purpose for the time being.
Definition at line 302 of file chan_mgcp.c.
Referenced by build_gateway(), and mgcp_hangup().
#define MGCPDUMPER |
Definition at line 95 of file chan_mgcp.c.
#define RESPONSE_TIMEOUT 30 |
#define SUB_ALT 1 |
Definition at line 294 of file chan_mgcp.c.
#define SUB_REAL 0 |
Definition at line 293 of file chan_mgcp.c.
#define TYPE_LINE 2 |
Definition at line 330 of file chan_mgcp.c.
Referenced by build_gateway(), do_monitor(), and mgcp_call().
#define TYPE_TRUNK 1 |
Definition at line 329 of file chan_mgcp.c.
Referenced by build_gateway().
anonymous enum |
Enumerator | |
---|---|
MGCP_CMD_EPCF | |
MGCP_CMD_CRCX | |
MGCP_CMD_MDCX | |
MGCP_CMD_DLCX | |
MGCP_CMD_RQNT | |
MGCP_CMD_NTFY | |
MGCP_CMD_AUEP | |
MGCP_CMD_AUCX | |
MGCP_CMD_RSIP |
Definition at line 147 of file chan_mgcp.c.
|
static |
Definition at line 1635 of file chan_mgcp.c.
References mgcp_request::header, mgcp_request::headers, and len().
Referenced by get_header().
|
static |
Definition at line 534 of file chan_mgcp.c.
References mgcp_gateway::addr, ast_log, mgcp_gateway::defaddr, errno, LOG_WARNING, and mgcpsock.
Referenced by mgcp_postrequest(), resend_response(), retrans_pkt(), and send_response().
|
static |
Definition at line 5025 of file chan_mgcp.c.
|
static |
Definition at line 5025 of file chan_mgcp.c.
|
static |
Definition at line 4519 of file chan_mgcp.c.
References ast_channel_tech(), ast_channel_tech_pvt(), ast_log, LOG_ERROR, mgcp_endpoint::ncs, mgcp_subchannel::parent, and sub.
|
static |
Definition at line 2065 of file chan_mgcp.c.
References ast_log, mgcp_request::data, mgcp_request::header, mgcp_request::headers, mgcp_request::len, mgcp_request::lines, LOG_WARNING, and MGCP_MAX_HEADERS.
Referenced by add_header_offhook(), transmit_audit_endpoint(), transmit_connect(), transmit_connect_with_sdp(), transmit_connection_del(), transmit_connection_del_w_params(), transmit_modify_request(), transmit_modify_with_sdp(), transmit_notify_request(), and transmit_notify_request_with_callerid().
|
static |
Definition at line 2648 of file chan_mgcp.c.
References add_header(), ast_debug, AST_STATE_RINGING, mgcp_endpoint::dtmfmode, MGCP_DTMF_HYBRID, MGCP_DTMF_INBAND, mgcp_endpoint::ncs, mgcp_subchannel::owner, mgcp_subchannel::parent, and mgcp_endpoint::sub.
Referenced by transmit_modify_request(), transmit_notify_request(), and transmit_notify_request_with_callerid().
|
static |
Definition at line 2087 of file chan_mgcp.c.
References ast_copy_string(), ast_log, mgcp_request::data, mgcp_request::len, mgcp_request::line, mgcp_request::lines, LOG_WARNING, and MGCP_MAX_LINES.
Referenced by add_sdp().
|
static |
Definition at line 2201 of file chan_mgcp.c.
References a, add_line(), ao2_ref, ast_copy_string(), ast_debug, ast_format_cap_count(), ast_format_cap_get_format(), ast_format_get_name(), ast_format_get_type(), ast_inet_ntoa(), ast_log, AST_MEDIA_TYPE_AUDIO, ast_rtp_codecs_payload_code(), AST_RTP_DTMF, ast_rtp_instance_get_codecs(), ast_rtp_instance_get_local_address(), ast_rtp_instance_get_remote_address, ast_rtp_lookup_mime_subtype2(), AST_RTP_MAX, ast_sockaddr_to_sin, c, mgcp_endpoint::cap, format, len(), LOG_WARNING, mgcp_endpoint::nonCodecCapability, NULL, mgcp_gateway::ourip, mgcp_subchannel::parent, mgcp_endpoint::parent, mgcp_subchannel::rtp, and mgcp_subchannel::tmpdest.
Referenced by transmit_connect_with_sdp(), transmit_modify_request(), and transmit_modify_with_sdp().
|
static |
Definition at line 4651 of file chan_mgcp.c.
References ast_strdupa, ast_variable_new, ast_variable::next, and NULL.
Referenced by build_gateway().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 5025 of file chan_mgcp.c.
|
static |
Complete an attended transfer.
p | The endpoint performing the attended transfer |
sub | The sub-channel completing the attended transfer |
0 | when channel should be hung up |
1 | when channel should not be hung up |
Definition at line 3281 of file chan_mgcp.c.
References mgcp_subchannel::alreadygone, ast_bridge_transfer_attended(), AST_BRIDGE_TRANSFER_SUCCESS, ast_channel_softhangup_internal_flag_add(), AST_CONTROL_RINGING, ast_mutex_lock, ast_mutex_unlock, ast_queue_control(), ast_queue_unhold(), AST_SOFTHANGUP_DEV, AST_STATE_RINGING, mgcp_subchannel::lock, mgcp_queue_hangup(), mgcp_subchannel::next, mgcp_subchannel::owner, sub, mgcp_endpoint::sub, and unalloc_sub().
Referenced by handle_request().
|
static |
build_gateway: parse mgcp.conf and create gateway/endpoint structures
Definition at line 4016 of file chan_mgcp.c.
References __ourip, accountcode, mgcp_endpoint::accountcode, add_var(), mgcp_gateway::addr, adsi, mgcp_endpoint::adsi, amaflags, mgcp_endpoint::amaflags, ast_append_ha(), ast_callerid_split(), ast_calloc, ast_channel_string2amaflag(), ast_copy_string(), ast_format_cap_alloc, ast_format_cap_append_from_cap(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_free, ast_get_group(), ast_get_ip(), ast_log, AST_MEDIA_TYPE_UNKNOWN, ast_mutex_destroy, ast_mutex_init, ast_mwi_subscribe_pool(), ast_ouraddrfor(), ast_random(), AST_SCHED_DEL, ast_sockaddr_from_sin, ast_sockaddr_to_sin, ast_strlen_zero, ast_true(), ast_variables_destroy(), ast_verb, mgcp_endpoint::callgroup, callreturn, mgcp_endpoint::callreturn, callwaiting, mgcp_endpoint::callwaiting, cancallforward, mgcp_endpoint::cancallforward, mgcp_endpoint::cap, mgcp_endpoint::chanvars, cid_name, mgcp_endpoint::cid_name, cid_num, mgcp_endpoint::cid_num, mgcp_endpoint::cmd_queue_lock, context, mgcp_endpoint::context, copy_vars(), cur_callergroup, cur_pickupgroup, mgcp_subchannel::cx_queue_lock, mgcp_subchannel::cxmode, mgcp_gateway::defaddr, DEFAULT_MGCP_GW_PORT, mgcp_endpoint::delme, mgcp_gateway::delme, DIRECTMEDIA, directmedia, mgcp_endpoint::directmedia, dtmfmode, mgcp_endpoint::dtmfmode, mgcp_gateway::dynamic, mgcp_gateway::endpoints, mgcp_gateway::expire, mgcp_subchannel::gate, gateways, mgcp_gateway::ha, hangupongateremove, mgcp_endpoint::hangupongateremove, mgcp_endpoint::hascallwaiting, mgcp_endpoint::hookstate, mgcp_subchannel::id, immediate, mgcp_endpoint::immediate, INADDR_NONE, mgcp_gateway::isnamedottedip, language, mgcp_endpoint::language, ast_variable::lineno, mgcp_subchannel::lock, mgcp_endpoint::lock, LOG_ERROR, LOG_WARNING, mgcp_subchannel::magic, mailbox, mgcp_endpoint::mailbox, MAX_SUBS, MGCP_CX_INACTIVE, MGCP_DTMF_HYBRID, MGCP_DTMF_INBAND, MGCP_DTMF_RFC2833, MGCP_ONHOOK, MGCP_SUBCHANNEL_MAGIC, mgcp_gateway::msgs_lock, mgcp_endpoint::msgstate, musicclass, mgcp_endpoint::musicclass, mgcp_endpoint::mwi_event_sub, ast_variable::name, mgcp_endpoint::name, mgcp_gateway::name, nat, mgcp_subchannel::nat, ncs, mgcp_endpoint::ncs, mgcp_endpoint::needaudit, ast_variable::next, mgcp_subchannel::next, mgcp_endpoint::next, mgcp_gateway::next, NULL, mgcp_endpoint::onhooktime, mgcp_gateway::ourip, mgcp_subchannel::parent, mgcp_endpoint::parent, parkinglot, mgcp_endpoint::parkinglot, mgcp_endpoint::pickupgroup, pktcgatealloc, mgcp_endpoint::pktcgatealloc, mgcp_gateway::realtime, mgcp_gateway::retransid, mgcp_endpoint::rqnt_ident, mgcp_endpoint::rqnt_queue_lock, mgcp_subchannel::rtp, mgcp_subchannel::sdpsent, singlepath, mgcp_endpoint::singlepath, slowsequence, mgcp_endpoint::slowsequence, stasis_subscription_cb_noop(), sub, mgcp_endpoint::sub, threewaycalling, mgcp_endpoint::threewaycalling, transfer, mgcp_endpoint::transfer, mgcp_subchannel::txident, mgcp_endpoint::type, TYPE_LINE, TYPE_TRUNK, ast_variable::value, and mgcp_gateway::wcardep.
Referenced by find_realtime_gw(), and reload_config().
|
static |
Definition at line 1406 of file chan_mgcp.c.
References AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_FLASH, AST_CONTROL_HANGUP, AST_CONTROL_OFFHOOK, AST_CONTROL_OPTION, AST_CONTROL_RADIO_KEY, AST_CONTROL_RADIO_UNKEY, AST_CONTROL_RING, AST_CONTROL_RINGING, AST_CONTROL_TAKEOFFHOOK, and AST_CONTROL_WINK.
Referenced by mgcp_indicate().
|
static |
duplicate a list of channel variables,
Definition at line 4669 of file chan_mgcp.c.
References ast_variable_new, ast_variable::next, NULL, and tmp().
Referenced by build_gateway().
|
static |
Definition at line 4539 of file chan_mgcp.c.
References ao2_ref, ast_dsp_free(), ast_free, ast_mutex_destroy, ast_mutex_lock, ast_mutex_unlock, ast_mwi_unsubscribe(), ast_rtp_instance_destroy(), ast_strlen_zero, ast_variables_destroy(), mgcp_endpoint::cap, mgcp_endpoint::chanvars, mgcp_endpoint::cmd_queue_lock, mgcp_subchannel::cxident, mgcp_endpoint::dsp, dump_cmd_queues(), dump_queue(), mgcp_subchannel::gate, cops_gate::gate_open, cops_gate::gate_remove, cops_gate::got_dq_gi, mgcp_subchannel::lock, mgcp_endpoint::lock, mgcp_subchannel::magic, MAX_SUBS, mgcp_queue_hangup(), mgcp_endpoint::mwi_event_sub, mgcp_subchannel::next, NULL, mgcp_endpoint::parent, mgcp_endpoint::rqnt_queue_lock, mgcp_subchannel::rtp, sub, mgcp_endpoint::sub, cops_gate::tech_pvt, and transmit_connection_del().
Referenced by prune_gateways().
|
static |
Definition at line 4598 of file chan_mgcp.c.
References ast_free, ast_free_ha(), dump_queue(), mgcp_gateway::ha, and NULL.
Referenced by prune_gateways().
|
static |
Definition at line 3818 of file chan_mgcp.c.
References ast_free, ast_io_add(), AST_IO_IN, ast_io_wait(), ast_mutex_destroy, ast_mutex_lock, ast_mutex_unlock, ast_sched_runq(), ast_sched_wait(), ast_verb, mgcp_gateway::endpoints, gatelock, gateways, has_voicemail(), MGCP_ONHOOK, mgcp_prune_realtime_gateway(), mgcp_reload_lock, mgcp_reloading, mgcpsock, mgcpsock_read(), mgcpsock_read_id, monlock, mgcp_gateway::msgs_lock, netlock, mgcp_gateway::next, NULL, mgcp_gateway::realtime, reload_config(), transmit_notify_request(), and TYPE_LINE.
Referenced by restart_monitor().
|
static |
dump_cmd_queues: (SC:) cleanup pending commands
Definition at line 2734 of file chan_mgcp.c.
References ast_free, ast_mutex_lock, ast_mutex_unlock, mgcp_endpoint::cmd_queue, mgcp_endpoint::cmd_queue_lock, mgcp_subchannel::cx_queue, mgcp_subchannel::cx_queue_lock, mgcp_request::next, mgcp_subchannel::next, NULL, mgcp_endpoint::rqnt_queue, mgcp_endpoint::rqnt_queue_lock, and mgcp_endpoint::sub.
Referenced by destroy_endpoint(), handle_request(), handle_response(), and unalloc_sub().
|
static |
Definition at line 570 of file chan_mgcp.c.
References ast_free, ast_log, ast_mutex_lock, ast_mutex_unlock, LOG_NOTICE, mgcp_gateway::msgs, mgcp_gateway::msgs_lock, mgcp_gateway::name, mgcp_message::next, NULL, mgcp_message::owner_ep, and mgcp_message::seqno.
Referenced by destroy_endpoint(), destroy_gateway(), and handle_request().
|
static |
Definition at line 3639 of file chan_mgcp.c.
References answer(), ast_free, mgcp_request::identifier, mgcp_response::next, NULL, mgcp_subchannel::parent, mgcp_endpoint::parent, resend_response(), RESPONSE_TIMEOUT, and mgcp_gateway::responses.
Referenced by mgcpsock_read().
|
static |
find_command: (SC:) remove command transaction from queue
Definition at line 2768 of file chan_mgcp.c.
References mgcp_gateway::addr, ast_debug, ast_inet_ntoa(), ast_mutex_lock, ast_mutex_unlock, mgcp_postrequest(), mgcp_request::next, NULL, and mgcp_endpoint::parent.
Referenced by handle_response().
|
static |
Definition at line 1686 of file chan_mgcp.c.
References args, AST_APP_ARG, ast_check_realtime(), ast_copy_string(), ast_debug, AST_DECLARE_APP_ARGS, ast_load_realtime(), AST_STANDARD_APP_ARGS, ast_strlen_zero, ast_variables_destroy(), build_gateway(), mgcp_gateway::endpoints, gateways, ast_variable::name, mgcp_endpoint::needaudit, ast_variable::next, mgcp_endpoint::next, mgcp_gateway::next, NULL, mgcp_gateway::realtime, transmit_audit_endpoint(), and ast_variable::value.
Referenced by find_subchannel_and_lock().
|
static |
Definition at line 1777 of file chan_mgcp.c.
References __ourip, mgcp_gateway::addr, ast_copy_string(), ast_debug, ast_inet_ntoa(), ast_log, ast_mutex_lock, ast_mutex_unlock, ast_ouraddrfor(), ast_sockaddr_from_sin, ast_sockaddr_to_sin, ast_verb, c, mgcp_gateway::defaddr, mgcp_gateway::dynamic, mgcp_gateway::endpoints, find_realtime_gw(), gatelock, gateways, mgcp_subchannel::id, mgcp_subchannel::lock, LOG_NOTICE, mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::next, mgcp_gateway::next, NULL, mgcp_gateway::ourip, sub, mgcp_endpoint::sub, and tmp().
Referenced by mgcp_request(), and mgcpsock_read().
|
static |
get_csv: (SC:) get comma separated value
Definition at line 1662 of file chan_mgcp.c.
Referenced by handle_response().
|
static |
Definition at line 1655 of file chan_mgcp.c.
References __get_header().
Referenced by handle_request(), and handle_response().
|
static |
Definition at line 1606 of file chan_mgcp.c.
References get_sdp_by_line(), len(), mgcp_request::line, and mgcp_request::lines.
Referenced by process_sdp().
|
static |
|
static |
Definition at line 1624 of file chan_mgcp.c.
References get_sdp_by_line(), len(), and mgcp_request::line.
Referenced by process_sdp().
|
static |
Definition at line 3322 of file chan_mgcp.c.
References AST_CONTROL_ANSWER, ast_hangup(), ast_log, ast_pthread_create_detached, ast_queue_unhold(), AST_STATE_DOWN, AST_STATE_RING, c, mgcp_subchannel::cxmode, errno, has_voicemail(), mgcp_endpoint::hookstate, mgcp_endpoint::immediate, LOG_WARNING, MGCP_CX_SENDRECV, mgcp_new(), MGCP_OFFHOOK, mgcp_queue_control(), mgcp_ss(), mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::ncs, NULL, mgcp_subchannel::outgoing, mgcp_subchannel::owner, mgcp_subchannel::parent, mgcp_endpoint::parent, mgcp_subchannel::rtp, start_rtp(), transmit_modify_request(), and transmit_notify_request().
Referenced by handle_request().
|
static |
Definition at line 1060 of file chan_mgcp.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_cli(), ast_mutex_lock, ast_mutex_unlock, ast_strdupa, c, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, mgcp_gateway::endpoints, ast_cli_args::fd, gatelock, gateways, mgcpdebug, mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::next, mgcp_gateway::next, NULL, transmit_audit_endpoint(), and ast_cli_entry::usage.
|
static |
Definition at line 1121 of file chan_mgcp.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli_args::argv, ast_cli(), CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, mgcpdebug, NULL, and ast_cli_entry::usage.
|
static |
Definition at line 1018 of file chan_mgcp.c.
References mgcp_gateway::addr, ast_cli_args::argc, ast_cli(), ast_inet_ntoa(), ast_mutex_lock, ast_mutex_unlock, mgcp_endpoint::chanvars, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, mgcp_endpoint::context, mgcp_gateway::defaddr, mgcp_gateway::dynamic, mgcp_gateway::endpoints, ast_cli_args::fd, gatelock, gateways, ast_variable::name, mgcp_endpoint::name, mgcp_gateway::name, ast_variable::next, mgcp_endpoint::next, mgcp_gateway::next, NULL, mgcp_subchannel::owner, mgcp_gateway::realtime, mgcp_endpoint::sub, ast_cli_entry::usage, and ast_variable::value.
|
static |
Definition at line 3402 of file chan_mgcp.c.
References mgcp_subchannel::alreadygone, ast_debug, AST_FRAME_DTMF, ast_inet_ntoa(), ast_log, ast_mutex_lock, ast_mutex_unlock, ast_queue_hold(), ast_queue_unhold(), AST_STATE_DOWN, AST_STATE_UP, ast_verb, attempt_transfer(), mgcp_endpoint::callwaiting, mgcp_endpoint::curtone, mgcp_subchannel::cxmode, mgcp_endpoint::dtmf_buf, dump_cmd_queues(), dump_queue(), mgcp_gateway::endpoints, ast_frame::frametype, get_header(), handle_hd_hf(), has_voicemail(), mgcp_endpoint::hascallwaiting, mgcp_endpoint::hidecallerid, mgcp_endpoint::hookstate, mgcp_subchannel::id, ast_frame_subclass::integer, mgcp_subchannel::lock, LOG_NOTICE, LOG_WARNING, MGCP_CX_CONF, MGCP_CX_MUTE, MGCP_CX_RECVONLY, MGCP_CX_SENDRECV, MGCP_OFFHOOK, MGCP_ONHOOK, mgcp_queue_frame(), mgcp_queue_hangup(), mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::ncs, mgcp_subchannel::next, mgcp_endpoint::next, NULL, mgcp_subchannel::outgoing, mgcp_subchannel::owner, mgcp_subchannel::parent, mgcp_endpoint::parent, mgcp_subchannel::rtp, ast_frame::src, sub, mgcp_endpoint::sub, ast_frame::subclass, mgcp_endpoint::threewaycalling, mgcp_endpoint::transfer, transmit_audit_endpoint(), transmit_connection_del(), transmit_modify_request(), transmit_notify_request(), transmit_response(), mgcp_request::verb, and mgcp_gateway::wcardep.
Referenced by mgcpsock_read().
|
static |
Definition at line 2797 of file chan_mgcp.c.
References AST_CONTROL_RINGING, ast_copy_string(), ast_free, ast_log, ast_queue_control(), AST_STATE_RINGING, ast_strlen_zero, ast_verb, c, mgcp_request::cmd, mgcp_endpoint::cmd_queue, mgcp_endpoint::cmd_queue_lock, mgcp_subchannel::cx_queue, mgcp_subchannel::cx_queue_lock, mgcp_subchannel::cxident, dump_cmd_queues(), find_command(), get_csv(), get_header(), mgcp_endpoint::hookstate, mgcp_subchannel::id, len(), mgcp_request::lines, LOG_NOTICE, LOG_WARNING, MGCP_CMD_AUEP, MGCP_CMD_CRCX, MGCP_CMD_MDCX, MGCP_OFFHOOK, MGCP_ONHOOK, mgcp_queue_hangup(), mgcp_endpoint::name, mgcp_gateway::name, mgcp_subchannel::next, NULL, mgcp_subchannel::owner, mgcp_endpoint::parent, process_sdp(), mgcp_endpoint::rqnt_queue, mgcp_endpoint::rqnt_queue_lock, mgcp_subchannel::rtp, mgcp_endpoint::slowsequence, start_rtp(), mgcp_endpoint::sub, mgcp_subchannel::tmpdest, transmit_connection_del(), transmit_connection_del_w_params(), transmit_modify_with_sdp(), transmit_notify_request(), and transmit_response().
Referenced by mgcpsock_read(), and retrans_pkt().
|
static |
Definition at line 490 of file chan_mgcp.c.
References ao2_cleanup, ast_app_has_voicemail(), ast_mwi_state_cache(), ast_mwi_state_type(), mgcp_endpoint::mailbox, ast_mwi_state::new_msgs, NULL, RAII_VAR, stasis_cache_get(), and stasis_message_data().
Referenced by do_monitor(), handle_hd_hf(), handle_request(), mgcp_hangup(), and mgcp_request().
|
static |
Definition at line 2128 of file chan_mgcp.c.
References ast_log, mgcp_request::data, mgcp_request::header, mgcp_request::headers, mgcp_gateway::isnamedottedip, mgcp_request::len, LOG_WARNING, MGCP_MAX_HEADERS, mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::ncs, and mgcp_endpoint::parent.
Referenced by reqprep().
|
static |
Definition at line 2110 of file chan_mgcp.c.
References ast_log, mgcp_request::data, mgcp_request::header, mgcp_request::headers, mgcp_request::identifier, mgcp_request::len, LOG_WARNING, and MGCP_MAX_HEADERS.
Referenced by respprep().
|
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 4856 of file chan_mgcp.c.
References ao2_ref, ast_channel_register(), ast_cli_register_multiple, ast_format_alaw, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_ulaw, ast_log, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_rtp_glue_register, ast_sched_context_create(), ast_sched_context_destroy(), ast_channel_tech::capabilities, io_context_create(), io_context_destroy(), LOG_ERROR, LOG_WARNING, reload_config(), and restart_monitor().
Referenced by unload_module().
|
static |
Definition at line 2448 of file chan_mgcp.c.
References mgcp_gateway::addr, ast_pktccops_gate_alloc(), mgcp_subchannel::gate, cops_gate::gate_open, GATE_SET, mgcp_pktcgate_open(), mgcp_pktcgate_remove(), NULL, mgcp_subchannel::parent, mgcp_endpoint::parent, sub, and cops_gate::tech_pvt.
Referenced by start_rtp().
|
static |
Definition at line 1156 of file chan_mgcp.c.
References ast_channel_name(), ast_channel_tech_pvt(), ast_debug, ast_mutex_lock, ast_mutex_unlock, ast_setstate(), AST_STATE_UP, ast_verb, mgcp_subchannel::cxmode, mgcp_subchannel::id, mgcp_subchannel::lock, MGCP_CX_SENDRECV, mgcp_endpoint::name, mgcp_gateway::name, mgcp_subchannel::parent, mgcp_endpoint::parent, mgcp_subchannel::rtp, start_rtp(), sub, transmit_modify_request(), and transmit_notify_request().
|
static |
Definition at line 826 of file chan_mgcp.c.
References ast_channel_connected(), ast_channel_name(), ast_channel_tech_pvt(), ast_copy_string(), ast_debug, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_setstate(), AST_STATE_DOWN, AST_STATE_RESERVED, AST_STATE_RINGING, ast_strlen_zero, mgcp_subchannel::callid, mgcp_subchannel::cxident, mgcp_subchannel::cxmode, mgcp_endpoint::hookstate, mgcp_subchannel::lock, LOG_NOTICE, LOG_WARNING, MGCP_CX_RECVONLY, MGCP_CX_SENDRECV, MGCP_OFFHOOK, MGCP_ONHOOK, name, mgcp_endpoint::ncs, mgcp_subchannel::next, mgcp_subchannel::outgoing, mgcp_subchannel::owner, mgcp_subchannel::parent, pbx_builtin_getvar_helper(), mgcp_subchannel::rtp, S_COR, start_rtp(), sub, transmit_modify_request(), transmit_notify_request_with_callerid(), mgcp_endpoint::type, and TYPE_LINE.
|
static |
mgcp_devicestate: channel callback for device status monitoring
data | tech/resource name of MGCP device to query |
Callback for device state management in channel subsystem to obtain device status (up/down) of a specific MGCP endpoint
Definition at line 1360 of file chan_mgcp.c.
References AST_DEVICE_INVALID, AST_DEVICE_UNKNOWN, ast_mutex_lock, ast_mutex_unlock, ast_strdupa, mgcp_gateway::endpoints, error(), gatelock, gateways, mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::next, mgcp_gateway::next, NULL, and tmp().
|
static |
Definition at line 1282 of file chan_mgcp.c.
References ast_channel_name(), ast_channel_tech_pvt(), ast_log, ast_mutex_lock, ast_mutex_unlock, mgcp_subchannel::lock, LOG_NOTICE, LOG_WARNING, mgcp_set_owner(), mgcp_subchannel::owner, and sub.
|
static |
Definition at line 4503 of file chan_mgcp.c.
References ast_channel_tech_pvt(), ast_format_cap_append_from_cap(), AST_MEDIA_TYPE_UNKNOWN, mgcp_endpoint::cap, mgcp_subchannel::parent, and sub.
|
static |
Definition at line 4475 of file chan_mgcp.c.
References ao2_ref, ast_channel_tech_pvt(), AST_RTP_GLUE_RESULT_FORBID, AST_RTP_GLUE_RESULT_LOCAL, AST_RTP_GLUE_RESULT_REMOTE, mgcp_endpoint::directmedia, NULL, mgcp_subchannel::parent, mgcp_subchannel::rtp, and sub.
|
static |
Definition at line 902 of file chan_mgcp.c.
References mgcp_subchannel::alreadygone, ast_channel_bridge_peer(), ast_channel_caller(), ast_channel_cleanup, ast_channel_name(), ast_channel_tech_pvt(), ast_channel_tech_pvt_set(), ast_debug, ast_dsp_free(), ast_module_unref, ast_mutex_lock, ast_mutex_unlock, ast_pktccops_gate_alloc(), ast_rtp_instance_destroy(), ast_strlen_zero, ast_verb, mgcp_subchannel::callid, mgcp_endpoint::callwaiting, mgcp_subchannel::cxident, mgcp_subchannel::cxmode, cops_gate::deltimer, mgcp_endpoint::dsp, mgcp_endpoint::dtmf_buf, mgcp_endpoint::dtmfmode, mgcp_subchannel::gate, GATE_ALLOC_PROGRESS, GATE_ALLOCATED, GATE_DEL, cops_gate::gate_open, cops_gate::gate_remove, cops_gate::got_dq_gi, has_voicemail(), mgcp_endpoint::hascallwaiting, mgcp_endpoint::hidecallerid, mgcp_endpoint::hookstate, mgcp_subchannel::lock, mgcp_subchannel::magic, MGCP_CX_INACTIVE, MGCP_CX_RECVONLY, MGCP_DTMF_HYBRID, MGCP_DTMF_INBAND, MGCP_OFFHOOK, MGCP_ONHOOK, mgcp_set_owner(), MGCP_SUBCHANNEL_MAGIC, name, mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::ncs, mgcp_subchannel::next, NULL, mgcp_subchannel::outgoing, mgcp_subchannel::owner, mgcp_subchannel::parent, mgcp_endpoint::parent, mgcp_endpoint::pktcgatealloc, RAII_VAR, mgcp_subchannel::rtp, S_COR, ast_module_info::self, cops_gate::state, sub, mgcp_endpoint::sub, cops_gate::tech_pvt, mgcp_subchannel::tmpdest, transmit_connection_del(), transmit_modify_request(), transmit_notify_request(), and transmit_notify_request_with_callerid().
|
static |
Definition at line 1438 of file chan_mgcp.c.
References ast_channel_name(), ast_channel_tech_pvt(), AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_HOLD, AST_CONTROL_INCOMPLETE, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_UNHOLD, ast_debug, ast_log, ast_moh_start(), ast_moh_stop(), ast_mutex_lock, ast_mutex_unlock, ast_rtp_instance_change_source(), ast_rtp_instance_update_source(), control2str(), mgcp_subchannel::lock, LOG_WARNING, mgcp_endpoint::ncs, NULL, mgcp_subchannel::parent, mgcp_subchannel::rtp, mgcp_subchannel::sdpsent, sub, transmit_modify_request(), and transmit_notify_request().
|
static |
Definition at line 1494 of file chan_mgcp.c.
References mgcp_endpoint::accountcode, mgcp_endpoint::adsi, mgcp_endpoint::amaflags, ast_party_caller::ani, ao2_ref, AST_ADSI_UNAVAILABLE, ast_channel_adsicpe_set(), ast_channel_alloc, ast_channel_amaflags_set(), ast_channel_caller(), ast_channel_callgroup_set(), ast_channel_context_set(), ast_channel_exten_set(), ast_channel_name(), ast_channel_nativeformats(), ast_channel_nativeformats_set(), ast_channel_pickupgroup_set(), ast_channel_priority_set(), ast_channel_rings_set(), ast_channel_set_fd(), 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_dsp_new(), ast_dsp_set_digitmode(), ast_dsp_set_features(), ast_format_cap_alloc, ast_format_cap_append_from_cap(), ast_format_cap_count(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_format(), ast_get_encoded_str(), ast_hangup(), ast_jb_configure(), ast_log, AST_MEDIA_TYPE_UNKNOWN, ast_module_ref, ast_pbx_start(), ast_rtp_instance_fd(), ast_state2str(), AST_STATE_DOWN, AST_STATE_RING, ast_strdup, ast_strlen_zero, ast_verb, mgcp_endpoint::call_forward, mgcp_endpoint::callgroup, mgcp_endpoint::cap, mgcp_endpoint::chanvars, mgcp_endpoint::cid_name, mgcp_endpoint::cid_num, mgcp_endpoint::context, mgcp_endpoint::dsp, DSP_DIGITMODE_NOQUELCH, DSP_FEATURE_DIGIT_DETECT, mgcp_endpoint::dtmfmode, mgcp_endpoint::exten, global_jbconf, mgcp_subchannel::id, mgcp_endpoint::language, LOG_ERROR, LOG_WARNING, MGCP_DTMF_HYBRID, MGCP_DTMF_INBAND, mgcp_set_owner(), ast_variable::name, mgcp_endpoint::name, mgcp_gateway::name, ast_variable::next, NULL, ast_party_id::number, mgcp_subchannel::parent, mgcp_endpoint::parent, pbx_builtin_setvar_helper(), mgcp_endpoint::pickupgroup, mgcp_subchannel::rtp, ast_module_info::self, ast_party_number::str, tmp(), ast_party_number::valid, and ast_variable::value.
Referenced by handle_hd_hf(), and mgcp_request().
|
static |
Definition at line 2435 of file chan_mgcp.c.
References ast_debug, ast_mutex_lock, ast_mutex_unlock, cops_gate::gateid, mgcp_subchannel::lock, NULL, mgcp_subchannel::sdpsent, sub, cops_gate::tech_pvt, and transmit_modify_with_sdp().
Referenced by mgcp_alloc_pktcgate().
|
static |
Definition at line 2412 of file chan_mgcp.c.
References AST_CAUSE_REQUESTED_CHAN_UNAVAIL, ast_channel_unlock, ast_debug, ast_mutex_lock, ast_mutex_unlock, ast_softhangup(), mgcp_subchannel::gate, GATE_CLOSED, cops_gate::gateid, mgcp_endpoint::hangupongateremove, mgcp_subchannel::lock, NULL, mgcp_subchannel::owner, mgcp_subchannel::parent, cops_gate::state, sub, and cops_gate::tech_pvt.
Referenced by mgcp_alloc_pktcgate().
|
static |
Definition at line 699 of file chan_mgcp.c.
References __mgcp_xmit(), ast_free, ast_malloc, ast_mutex_lock, ast_mutex_unlock, ast_sched_add(), ast_tvnow(), mgcp_message::buf, DEFAULT_RETRANS, mgcp_message::expire, mgcp_message::len, len(), mgcp_gateway::msgs, mgcp_gateway::msgs_lock, mgcp_message::next, NULL, mgcp_message::owner_ep, mgcp_message::owner_sub, mgcp_endpoint::parent, mgcp_message::retrans, retrans_pkt(), mgcp_gateway::retransid, mgcp_message::seqno, and sub.
Referenced by find_command(), and send_request().
|
static |
Definition at line 3760 of file chan_mgcp.c.
References ast_debug, ast_free, ast_mutex_destroy, ast_mutex_lock, ast_mutex_trylock, ast_mutex_unlock, ast_strlen_zero, mgcp_endpoint::cmd_queue, mgcp_endpoint::cmd_queue_lock, mgcp_subchannel::cx_queue, mgcp_subchannel::cx_queue_lock, mgcp_subchannel::cxident, mgcp_endpoint::dsp, mgcp_gateway::endpoints, mgcp_subchannel::gate, mgcp_gateway::ha, mgcp_subchannel::lock, mgcp_endpoint::lock, MAX_SUBS, mgcp_gateway::msgs, mgcp_gateway::msgs_lock, mgcp_gateway::name, mgcp_subchannel::next, mgcp_endpoint::next, mgcp_gateway::realtime, mgcp_endpoint::rqnt_queue, mgcp_endpoint::rqnt_queue_lock, mgcp_subchannel::rtp, sub, and mgcp_endpoint::sub.
Referenced by do_monitor().
|
static |
Definition at line 638 of file chan_mgcp.c.
References AST_FRAME_CONTROL, and mgcp_queue_frame().
Referenced by handle_hd_hf().
|
static |
Definition at line 604 of file chan_mgcp.c.
References ast_channel_trylock, ast_channel_unlock, ast_queue_frame(), DEADLOCK_AVOIDANCE, mgcp_subchannel::lock, and mgcp_subchannel::owner.
Referenced by handle_request(), and mgcp_queue_control().
|
static |
Definition at line 621 of file chan_mgcp.c.
References ast_channel_trylock, ast_channel_unlock, ast_queue_hangup(), DEADLOCK_AVOIDANCE, mgcp_subchannel::lock, and mgcp_subchannel::owner.
Referenced by attempt_transfer(), destroy_endpoint(), handle_request(), handle_response(), and start_rtp().
|
static |
Definition at line 1230 of file chan_mgcp.c.
References ast_channel_tech_pvt(), ast_mutex_lock, ast_mutex_unlock, mgcp_subchannel::lock, mgcp_rtp_read(), and sub.
|
static |
Definition at line 4908 of file chan_mgcp.c.
References ast_cli_args::argc, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_verbose(), CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, LOG_WARNING, mgcp_reload_lock, mgcp_reloading, NULL, restart_monitor(), and ast_cli_entry::usage.
Referenced by reload(), and unload_module().
|
static |
Definition at line 3965 of file chan_mgcp.c.
References AST_CAUSE_BUSY, AST_CAUSE_UNREGISTERED, ast_copy_string(), ast_format_cap_get_names(), ast_format_cap_iscompatible(), AST_FORMAT_CAP_NAMES_LEN, ast_log, ast_mutex_unlock, AST_STATE_DOWN, ast_str_alloca, ast_strlen_zero, ast_verb, mgcp_endpoint::call_forward, mgcp_endpoint::callwaiting, mgcp_endpoint::dnd, find_subchannel_and_lock(), has_voicemail(), mgcp_endpoint::hookstate, mgcp_subchannel::lock, LOG_NOTICE, LOG_WARNING, mgcp_new(), MGCP_ONHOOK, mgcp_subchannel::next, NULL, mgcp_subchannel::owner, mgcp_subchannel::parent, restart_monitor(), sub, tmp(), and transmit_notify_request().
|
static |
Definition at line 1181 of file chan_mgcp.c.
References ao2_ref, ast_channel_nativeformats(), ast_channel_nativeformats_set(), ast_channel_readformat(), ast_channel_writeformat(), ast_debug, ast_dsp_process(), ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_iscompatible_format(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), AST_FRAME_DTMF, AST_FRAME_VOICE, ast_log, ast_null_frame, ast_rtp_instance_read(), ast_set_read_format(), ast_set_write_format(), mgcp_endpoint::dsp, mgcp_endpoint::dtmfmode, ast_frame_subclass::format, ast_frame::frametype, LOG_NOTICE, MGCP_DTMF_INBAND, MGCP_DTMF_RFC2833, mgcp_subchannel::owner, mgcp_subchannel::parent, mgcp_subchannel::rtp, and ast_frame::subclass.
Referenced by mgcp_read().
|
static |
Definition at line 1298 of file chan_mgcp.c.
References ast_channel_tech_pvt(), ast_debug, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_rtp_instance_dtmf_begin(), mgcp_endpoint::dtmfmode, mgcp_subchannel::lock, LOG_ERROR, MGCP_DTMF_HYBRID, MGCP_DTMF_INBAND, MGCP_DTMF_RFC2833, mgcp_subchannel::parent, mgcp_subchannel::rtp, and sub.
|
static |
Definition at line 1319 of file chan_mgcp.c.
References ast_channel_tech_pvt(), ast_debug, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_rtp_instance_dtmf_end(), digit, mgcp_endpoint::dtmfmode, mgcp_subchannel::lock, LOG_ERROR, MGCP_DTMF_HYBRID, MGCP_DTMF_INBAND, MGCP_DTMF_RFC2833, mgcp_endpoint::ncs, mgcp_subchannel::parent, mgcp_subchannel::rtp, sub, tmp(), and transmit_notify_request().
|
static |
Definition at line 1222 of file chan_mgcp.c.
References ast_channel_uniqueid(), ast_rtp_instance_set_channel_id(), mgcp_subchannel::owner, and mgcp_subchannel::rtp.
Referenced by mgcp_fixup(), mgcp_hangup(), mgcp_new(), and unalloc_sub().
|
static |
Definition at line 4491 of file chan_mgcp.c.
References mgcp_subchannel::alreadygone, ast_channel_tech_pvt(), sub, and transmit_modify_with_sdp().
|
static |
Definition at line 3000 of file chan_mgcp.c.
References ao2_cleanup, ast_canmatch_extension(), ast_channel_caller(), ast_channel_context(), ast_channel_dialed(), ast_channel_exten_set(), ast_channel_get_bridge_channel(), ast_channel_language(), ast_channel_lock, ast_channel_name(), ast_channel_tech_pvt(), ast_channel_unlock, ast_copy_string(), ast_db_put(), ast_debug, ast_exists_extension(), ast_get_chan_features_pickup_config(), ast_hangup(), ast_ignore_pattern(), ast_indicate(), ast_log, ast_matchmore_extension(), AST_MAX_EXTENSION, ast_parking_blind_transfer_park(), ast_parking_is_exten_park(), ast_parking_provider_registered(), ast_pbx_run(), ast_pickup_call(), ast_safe_sleep(), ast_say_digit_str(), ast_set_callerid(), ast_setstate(), AST_STATE_RING, ast_strdup, ast_strdupa, ast_strlen_zero, ast_verb, ast_waitfordigit(), mgcp_endpoint::call_forward, mgcp_endpoint::callreturn, mgcp_endpoint::callwaiting, mgcp_endpoint::cancallforward, mgcp_endpoint::cid_name, mgcp_endpoint::cid_num, ast_channel::data, mgcp_endpoint::dnd, mgcp_endpoint::dtmf_buf, mgcp_endpoint::dtmfmode, exten, firstdigittimeout, gendigittimeout, mgcp_endpoint::hascallwaiting, mgcp_endpoint::hidecallerid, mgcp_endpoint::lastcallerid, len(), LOG_ERROR, LOG_WARNING, matchdigittimeout, MGCP_DTMF_HYBRID, MGCP_DTMF_INBAND, ast_channel::name, mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::ncs, mgcp_subchannel::next, NULL, ast_party_dialed::number, mgcp_subchannel::owner, mgcp_subchannel::parent, mgcp_endpoint::parent, RAII_VAR, S_COR, start_rtp(), ast_party_dialed::str, sub, timeout, and transmit_notify_request().
Referenced by handle_hd_hf().
|
static |
Definition at line 1240 of file chan_mgcp.c.
References ast_channel_nativeformats(), ast_channel_readformat(), ast_channel_tech_pvt(), ast_channel_writeformat(), ast_debug, ast_format_cap_get_names(), ast_format_cap_iscompatible_format(), AST_FORMAT_CAP_NAMES_LEN, AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), AST_FRAME_IMAGE, AST_FRAME_VOICE, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_rtp_instance_write(), ast_str_alloca, ast_frame_subclass::format, ast_frame::frametype, mgcp_subchannel::gate, GATE_ALLOCATED, mgcp_subchannel::lock, LOG_WARNING, NULL, mgcp_subchannel::parent, mgcp_subchannel::rtp, mgcp_subchannel::sdpsent, mgcp_endpoint::singlepath, cops_gate::state, sub, mgcp_endpoint::sub, ast_frame::subclass, and transmit_modify_with_sdp().
|
static |
Definition at line 3669 of file chan_mgcp.c.
References ast_debug, ast_free, ast_inet_ntoa(), ast_log, ast_mutex_lock, ast_mutex_unlock, AST_SCHED_DEL, ast_strlen_zero, mgcp_request::data, mgcp_request::endpoint, errno, find_and_retrans(), find_subchannel_and_lock(), handle_request(), handle_response(), mgcp_request::headers, mgcp_request::identifier, mgcp_request::len, len(), mgcp_subchannel::lock, LOG_NOTICE, LOG_WARNING, mgcpsock, mgcp_gateway::msgs, mgcp_gateway::msgs_lock, mgcp_gateway::name, mgcp_message::next, NULL, mgcp_message::owner_ep, mgcp_message::owner_sub, mgcp_subchannel::parent, mgcp_endpoint::parent, parse(), result, mgcp_gateway::retransid, mgcp_message::seqno, sub, mgcp_request::verb, and mgcp_request::version.
Referenced by do_monitor().
|
static |
Definition at line 1872 of file chan_mgcp.c.
References ast_debug, ast_log, ast_strlen_zero, c, mgcp_request::data, mgcp_request::endpoint, mgcp_request::header, mgcp_request::headers, mgcp_request::identifier, mgcp_request::line, mgcp_request::lines, LOG_WARNING, MGCP_MAX_HEADERS, MGCP_MAX_LINES, mgcp_request::verb, and mgcp_request::version.
Referenced by acf_jabberreceive_read(), acf_meetme_info(), acf_vm_info(), add_hintdevice(), agent_function_read(), agent_login_exec(), agent_request_exec(), aMYSQL_clear(), aMYSQL_connect(), aMYSQL_disconnect(), aMYSQL_fetch(), aMYSQL_nextresult(), aMYSQL_query(), aMYSQL_set(), app_exec(), applicationmap_handler(), aqm_exec(), ast_format_cap_update_by_allow_disallow(), AST_TEST_DEFINE(), attended_transfer_exec(), audiosocket_exec(), audiosocket_request(), blind_transfer_exec(), bridgewait_exec(), cb_events(), cdr_prop_write(), cdr_prop_write_callback(), cdr_read(), cdr_write(), cdr_write_callback(), celgenuserevent_exec(), channelvars_handler(), chanspy_exec(), conf_exec(), conf_run(), confbridge_exec(), config_function_read(), confkick_exec(), cut_internal(), destroy_all_channels(), detect_write(), dial_exec_full(), dictate_exec(), directory_exec(), dtmfstore_exec(), dundi_query_read(), dundi_result_read(), dundifunc_read(), enum_query_read(), enum_result_read(), eval_exten_read(), execif_exec(), expand_gosub_args(), extenspy_exec(), find_conf(), forkcdr_exec(), free_zone(), func_confbridge_helper(), func_confbridge_info(), get_comma(), get_in_brackets_const(), get_in_brackets_full(), gosub_exec(), goto_parser(), hook_on(), iconv_read(), isAnsweringMachine(), isexten_function_read(), jb_helper(), load_channelvars(), local_alloc(), log_exec(), post_process_documentation::main(), man_do_variable_value(), mbl_sendsms_exec(), mbl_status_exec(), mgcpsock_read(), misdn_check_l2l1(), misdn_facility_exec(), misdn_set_opt_exec(), mixmonitor_exec(), msg_send_exec(), multicast_rtp_request(), mwi_has_voicemail(), mwi_inboxcount(), originate_exec(), oss_call(), oss_request(), page_exec(), park_and_announce_app_exec(), park_app_parse_data(), parked_call_app_exec(), parse_cookies(), pbx_builtin_answer(), pbx_builtin_background(), pbx_builtin_saycharacters_case(), pbx_builtin_waitdigit(), pbx_builtin_waitexten(), pickup_exec(), pickupchan_exec(), pjsip_acf_channel_read(), play_moh_exec(), pqm_exec(), presence_read(), privacy_exec(), process_echocancel(), ql_exec(), queue_exec(), queue_function_queuegetchannel(), qupd_exec(), rcvfax_exec(), receivefax_exec(), record_exec(), reload(), reload_single_member(), retrydial_exec(), rqm_exec(), saycountedadj_exec(), saycountednoun_exec(), sayunixtime_exec(), scramble_write(), sendfax_exec(), sip_acf_channel_read(), sip_parse_nat_option(), sla_trunk_exec(), smdi_msg_read(), smdi_msg_retrieve_read(), sms_exec(), sndfax_exec(), softhangup_exec(), speech_background(), srv_result_read(), start_moh_exec(), start_monitor_exec(), stir_shaken_read(), stop_mixmonitor_full(), stream_echo_exec(), talk_detect_fn_write(), tls_method_to_str(), transfer_exec(), unicast_rtp_request(), upqm_exec(), user_event_hook_cb(), userevent_exec(), verbose_exec(), vm_execmain(), vm_playmsgexec(), waitfor_exec(), and zapateller_exec().
|
static |
Definition at line 1970 of file chan_mgcp.c.
References a, ao2_ref, ast_debug, ast_format_cap_alloc, ast_format_cap_count(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_compatible(), ast_format_cap_get_names(), AST_FORMAT_CAP_NAMES_LEN, ast_gethostbyname(), ast_inet_ntoa(), ast_log, ast_rtp_codecs_payload_formats(), ast_rtp_codecs_payloads_set_m_type(), ast_rtp_codecs_payloads_set_rtpmap_type(), ast_rtp_instance_get_codecs(), ast_rtp_instance_set_remote_address, ast_sockaddr_from_sin, ast_str_alloca, ast_strdupa, ast_strlen_zero, c, mgcp_endpoint::cap, codecs, get_sdp(), get_sdp_iterate(), host, hp, len(), LOG_WARNING, nonCodecCapability, mgcp_endpoint::nonCodecCapability, mgcp_subchannel::parent, mgcp_subchannel::rtp, and sdpLineNum_iterator_init().
Referenced by handle_response().
|
static |
Definition at line 4608 of file chan_mgcp.c.
References ast_mutex_lock, ast_mutex_unlock, mgcp_endpoint::delme, mgcp_gateway::delme, destroy_endpoint(), destroy_gateway(), mgcp_gateway::endpoints, gatelock, gateways, mgcp_endpoint::next, mgcp_gateway::next, NULL, and mgcp_gateway::realtime.
Referenced by reload_config(), and unload_module().
|
static |
Definition at line 4941 of file chan_mgcp.c.
References mgcp_reload(), and NULL.
Referenced by unload_module().
|
static |
Definition at line 4683 of file chan_mgcp.c.
References __ourip, ast_category_browse(), ast_config_destroy(), ast_config_load, ast_format_cap_update_by_allow_disallow(), ast_gethostbyname(), ast_inet_ntoa(), ast_io_remove(), ast_io_wait(), ast_jb_read_conf(), ast_log, ast_mutex_lock, ast_mutex_unlock, ast_sched_runq(), ast_set_qos(), ast_str2cos(), ast_str2tos(), ast_variable_browse(), ast_verb, bindaddr, build_gateway(), config, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, DEFAULT_MGCP_CA_PORT, mgcp_endpoint::delme, mgcp_gateway::delme, dtmfmode, mgcp_gateway::endpoints, errno, firstdigittimeout, gatelock, gateways, gendigittimeout, global_jbconf, hp, ast_variable::lineno, LOG_ERROR, LOG_NOTICE, LOG_WARNING, matchdigittimeout, mgcpsock, mgcpsock_read_id, monitor_thread, ast_variable::name, mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::needaudit, netlock, ast_variable::next, mgcp_endpoint::next, mgcp_gateway::next, NULL, ourhost, ourport, prune_gateways(), qos, transmit_audit_endpoint(), and ast_variable::value.
Referenced by do_monitor(), and load_module().
|
static |
Definition at line 2159 of file chan_mgcp.c.
References ast_mutex_lock, ast_mutex_unlock, init_req(), oseq_global, and oseq_lock.
Referenced by transmit_audit_endpoint(), transmit_connect(), transmit_connect_with_sdp(), transmit_connection_del(), transmit_connection_del_w_params(), transmit_modify_request(), transmit_modify_with_sdp(), transmit_notify_request(), and transmit_notify_request_with_callerid().
|
static |
Definition at line 547 of file chan_mgcp.c.
References __mgcp_xmit(), mgcp_gateway::addr, ast_debug, ast_inet_ntoa(), mgcp_response::buf, mgcp_response::len, mgcp_subchannel::parent, and mgcp_endpoint::parent.
Referenced by find_and_retrans().
|
static |
Definition at line 2152 of file chan_mgcp.c.
References init_resp().
Referenced by transmit_response().
|
static |
Definition at line 3936 of file chan_mgcp.c.
References ast_log, ast_mutex_lock, ast_mutex_unlock, ast_pthread_create_background, AST_PTHREADT_NULL, AST_PTHREADT_STOP, do_monitor(), LOG_ERROR, LOG_WARNING, monitor_thread, monlock, and NULL.
Referenced by load_module(), mgcp_reload(), and mgcp_request().
|
static |
Definition at line 644 of file chan_mgcp.c.
References __mgcp_xmit(), ast_debug, ast_free, ast_log, ast_mutex_lock, ast_mutex_unlock, mgcp_message::buf, handle_response(), mgcp_message::len, LOG_WARNING, MAX_RETRANS, mgcp_gateway::msgs, mgcp_gateway::msgs_lock, mgcp_gateway::name, mgcp_message::next, NULL, mgcp_message::owner_ep, mgcp_message::owner_sub, mgcp_message::retrans, mgcp_gateway::retransid, and mgcp_message::seqno.
Referenced by mgcp_postrequest().
|
static |
Definition at line 1619 of file chan_mgcp.c.
Referenced by process_sdp().
|
static |
Definition at line 743 of file chan_mgcp.c.
References mgcp_gateway::addr, ast_debug, ast_free, ast_inet_ntoa(), ast_log, ast_malloc, ast_mutex_lock, ast_mutex_unlock, mgcp_request::cmd, mgcp_endpoint::cmd_queue, mgcp_endpoint::cmd_queue_lock, mgcp_subchannel::cx_queue, mgcp_subchannel::cx_queue_lock, mgcp_request::data, mgcp_request::len, LOG_WARNING, MGCP_CMD_CRCX, MGCP_CMD_DLCX, MGCP_CMD_MDCX, MGCP_CMD_RQNT, mgcp_postrequest(), mgcp_endpoint::ncs, mgcp_request::next, NULL, mgcp_subchannel::parent, mgcp_endpoint::parent, mgcp_endpoint::rqnt_queue, mgcp_endpoint::rqnt_queue_lock, and mgcp_endpoint::slowsequence.
Referenced by transmit_audit_endpoint(), transmit_connect(), transmit_connect_with_sdp(), transmit_connection_del(), transmit_connection_del_w_params(), transmit_modify_request(), transmit_modify_with_sdp(), transmit_notify_request(), and transmit_notify_request_with_callerid().
|
static |
Definition at line 558 of file chan_mgcp.c.
References __mgcp_xmit(), mgcp_gateway::addr, ast_debug, ast_inet_ntoa(), mgcp_request::data, mgcp_request::len, mgcp_subchannel::parent, and mgcp_endpoint::parent.
Referenced by transmit_response().
|
static |
Definition at line 2967 of file chan_mgcp.c.
References ast_channel_set_fd(), ast_mutex_lock, ast_mutex_unlock, ast_random(), ast_rtp_instance_destroy(), ast_rtp_instance_fd(), ast_rtp_instance_new(), ast_rtp_instance_set_prop(), ast_rtp_instance_set_qos(), AST_RTP_PROPERTY_NAT, ast_sockaddr_from_sin, bindaddr, mgcp_subchannel::callid, mgcp_subchannel::gate, mgcp_subchannel::lock, mgcp_alloc_pktcgate(), mgcp_queue_hangup(), mgcp_subchannel::nat, NULL, mgcp_subchannel::owner, mgcp_subchannel::parent, mgcp_endpoint::pktcgatealloc, qos, mgcp_subchannel::rtp, transmit_connect(), transmit_connect_with_sdp(), and mgcp_subchannel::txident.
Referenced by handle_hd_hf(), handle_response(), mgcp_answer(), mgcp_call(), and mgcp_ss().
|
static |
Definition at line 2676 of file chan_mgcp.c.
References add_header(), mgcp_request::cmd, MGCP_CMD_AUEP, NULL, reqprep(), send_request(), and mgcp_request::trid.
Referenced by find_realtime_gw(), handle_mgcp_audit_endpoint(), handle_request(), and reload_config().
|
static |
Definition at line 2462 of file chan_mgcp.c.
References add_header(), ao2_ref, ast_copy_string(), ast_debug, ast_format_cap_count(), ast_format_cap_get_format(), ast_rtp_lookup_mime_subtype2(), mgcp_subchannel::callid, mgcp_endpoint::cap, mgcp_request::cmd, mgcp_subchannel::cxmode, mgcp_subchannel::id, MGCP_CMD_CRCX, mgcp_cxmodes, mgcp_endpoint::name, mgcp_gateway::name, mgcp_subchannel::parent, mgcp_endpoint::parent, reqprep(), mgcp_subchannel::sdpsent, send_request(), tmp(), mgcp_request::trid, and mgcp_subchannel::txident.
Referenced by start_rtp().
|
static |
Definition at line 2363 of file chan_mgcp.c.
References add_header(), add_sdp(), ao2_ref, ast_copy_string(), ast_debug, ast_format_cap_count(), ast_format_cap_get_format(), ast_format_get_type(), AST_MEDIA_TYPE_AUDIO, ast_rtp_lookup_mime_subtype2(), mgcp_subchannel::callid, mgcp_endpoint::cap, mgcp_request::cmd, mgcp_subchannel::cxmode, format, mgcp_subchannel::gate, GATE_ALLOCATED, cops_gate::gateid, mgcp_subchannel::id, MGCP_CMD_CRCX, mgcp_cxmodes, mgcp_endpoint::name, mgcp_gateway::name, mgcp_subchannel::parent, mgcp_endpoint::parent, reqprep(), mgcp_subchannel::sdpsent, send_request(), cops_gate::state, tmp(), mgcp_request::trid, and mgcp_subchannel::txident.
Referenced by start_rtp().
|
static |
Definition at line 2690 of file chan_mgcp.c.
References add_header(), ast_debug, mgcp_subchannel::callid, mgcp_request::cmd, mgcp_subchannel::cxident, mgcp_subchannel::cxmode, mgcp_subchannel::id, MGCP_CMD_DLCX, mgcp_cxmodes, mgcp_endpoint::name, mgcp_gateway::name, mgcp_subchannel::parent, mgcp_endpoint::parent, reqprep(), send_request(), mgcp_request::trid, and mgcp_subchannel::txident.
Referenced by destroy_endpoint(), handle_request(), handle_response(), mgcp_hangup(), and unalloc_sub().
|
static |
Definition at line 2713 of file chan_mgcp.c.
References add_header(), ast_debug, mgcp_request::cmd, MGCP_CMD_DLCX, mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::parent, reqprep(), send_request(), mgcp_endpoint::sub, and mgcp_request::trid.
Referenced by handle_response().
|
static |
Definition at line 2572 of file chan_mgcp.c.
References add_header(), add_header_offhook(), add_sdp(), ao2_ref, ast_copy_string(), ast_debug, ast_format_cap_append, ast_format_cap_count(), ast_format_cap_get_format(), ast_format_cap_remove_by_type(), AST_MEDIA_TYPE_UNKNOWN, ast_rtp_lookup_mime_subtype2(), ast_strlen_zero, mgcp_subchannel::callid, mgcp_endpoint::cap, mgcp_request::cmd, mgcp_subchannel::cxident, mgcp_subchannel::cxmode, format, mgcp_subchannel::gate, GATE_ALLOCATED, GATE_OPEN, cops_gate::gateid, mgcp_endpoint::hookstate, mgcp_subchannel::id, MGCP_CMD_MDCX, mgcp_cxmodes, MGCP_OFFHOOK, MGCP_ONHOOK, mgcp_endpoint::name, mgcp_gateway::name, mgcp_endpoint::ncs, NULL, mgcp_subchannel::parent, mgcp_endpoint::parent, reqprep(), mgcp_subchannel::sdpsent, send_request(), cops_gate::state, tmp(), mgcp_request::trid, and mgcp_subchannel::txident.
Referenced by handle_hd_hf(), handle_request(), mgcp_answer(), mgcp_call(), mgcp_hangup(), and mgcp_indicate().
|
static |
Definition at line 2301 of file chan_mgcp.c.
References add_header(), add_sdp(), ao2_ref, ast_copy_string(), ast_debug, ast_format_cap_count(), ast_format_cap_get_format(), ast_format_get_type(), AST_MEDIA_TYPE_AUDIO, ast_rtp_instance_get_remote_address, ast_rtp_lookup_mime_subtype2(), ast_sockaddr_to_sin, ast_strlen_zero, mgcp_subchannel::callid, mgcp_endpoint::cap, mgcp_request::cmd, mgcp_subchannel::cxident, mgcp_subchannel::cxmode, format, mgcp_subchannel::gate, GATE_ALLOCATED, GATE_OPEN, cops_gate::gateid, MGCP_CMD_MDCX, mgcp_cxmodes, mgcp_subchannel::parent, reqprep(), mgcp_subchannel::sdpsent, send_request(), cops_gate::state, tmp(), mgcp_subchannel::tmpdest, mgcp_request::trid, and mgcp_subchannel::txident.
Referenced by handle_response(), mgcp_pktcgate_open(), mgcp_set_rtp_peer(), and mgcp_write().
|
static |
Definition at line 2499 of file chan_mgcp.c.
References add_header(), add_header_offhook(), ast_copy_string(), ast_debug, ast_strlen_zero, mgcp_request::cmd, mgcp_endpoint::curtone, mgcp_subchannel::cxmode, mgcp_endpoint::hookstate, mgcp_subchannel::id, MGCP_CMD_RQNT, mgcp_cxmodes, MGCP_OFFHOOK, MGCP_ONHOOK, mgcp_endpoint::name, mgcp_gateway::name, NULL, mgcp_subchannel::parent, mgcp_endpoint::parent, reqprep(), mgcp_endpoint::rqnt_ident, send_request(), and mgcp_request::trid.
Referenced by do_monitor(), handle_hd_hf(), handle_request(), handle_response(), mgcp_answer(), mgcp_hangup(), mgcp_indicate(), mgcp_request(), mgcp_senddigit_end(), and mgcp_ss().
|
static |
Definition at line 2527 of file chan_mgcp.c.
References add_header(), add_header_offhook(), ast_copy_string(), ast_debug, ast_localtime(), ast_strlen_zero, ast_tvnow(), mgcp_request::cmd, mgcp_endpoint::curtone, mgcp_subchannel::cxmode, mgcp_endpoint::hookstate, mgcp_subchannel::id, mgcp_endpoint::lastcallerid, MGCP_CMD_RQNT, mgcp_cxmodes, MGCP_OFFHOOK, MGCP_ONHOOK, mgcp_endpoint::name, mgcp_gateway::name, NULL, mgcp_subchannel::parent, mgcp_endpoint::parent, reqprep(), mgcp_endpoint::rqnt_ident, send_request(), ast_tm::tm_hour, ast_tm::tm_mday, ast_tm::tm_min, ast_tm::tm_mon, and mgcp_request::trid.
Referenced by mgcp_call(), and mgcp_hangup().
|
static |
Definition at line 2174 of file chan_mgcp.c.
References ast_calloc, mgcp_response::buf, mgcp_request::data, mgcp_request::identifier, mgcp_request::len, mgcp_response::len, mgcp_response::next, mgcp_subchannel::parent, mgcp_endpoint::parent, mgcp_gateway::responses, respprep(), send_response(), mgcp_response::seqno, and mgcp_response::whensent.
Referenced by handle_request(), and handle_response().
|
static |
Definition at line 506 of file chan_mgcp.c.
References mgcp_subchannel::alreadygone, ast_debug, ast_log, ast_rtp_instance_destroy(), ast_strlen_zero, mgcp_subchannel::callid, mgcp_subchannel::cxident, mgcp_subchannel::cxmode, dump_cmd_queues(), mgcp_subchannel::id, LOG_WARNING, MGCP_CX_INACTIVE, mgcp_set_owner(), mgcp_endpoint::name, mgcp_gateway::name, NULL, mgcp_subchannel::outgoing, mgcp_subchannel::parent, mgcp_endpoint::parent, mgcp_subchannel::rtp, mgcp_endpoint::sub, mgcp_subchannel::tmpdest, and transmit_connection_del().
Referenced by attempt_transfer().
|
static |
Definition at line 4947 of file chan_mgcp.c.
References ao2_ref, ast_channel_register(), ast_channel_unregister(), ast_cli_unregister_multiple(), ast_log, AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CHANNEL_DRIVER, AST_MODULE_INFO(), AST_MODULE_SUPPORT_EXTENDED, ast_mutex_lock, ast_mutex_trylock, ast_mutex_unlock, AST_PTHREADT_NULL, AST_PTHREADT_STOP, ast_rtp_glue_unregister(), ast_sched_context_destroy(), ASTERISK_GPL_KEY, ast_channel_tech::capabilities, mgcp_endpoint::delme, mgcp_gateway::delme, mgcp_gateway::endpoints, gatelock, gateways, load_module(), LOG_WARNING, mgcp_reload(), mgcp_reload_lock, mgcp_reloading, mgcpsock, monitor_thread, monlock, mgcp_endpoint::next, mgcp_gateway::next, NULL, prune_gateways(), and reload().
|
static |
Definition at line 5025 of file chan_mgcp.c.
|
static |
Definition at line 239 of file chan_mgcp.c.
Referenced by build_gateway(), find_subchannel_and_lock(), and reload_config().
|
static |
Definition at line 202 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 208 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 206 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 5025 of file chan_mgcp.c.
|
static |
Definition at line 434 of file chan_mgcp.c.
Referenced by reload_config(), and start_rtp().
|
static |
Definition at line 187 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 185 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 196 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 165 of file chan_mgcp.c.
Referenced by __analog_handle_event(), __ast_channel_alloc_ap(), action_originate(), add_rlmi_resource(), ari_channels_handle_originate_with_id(), build_gateway(), build_peer(), build_user(), caller_id_handler(), check_access(), check_peer_ok(), check_user_full(), create_addr_from_peer(), dahdi_handle_event(), generate_content_id_hdr(), get_pai(), get_rpid(), misdn_new(), originate_exec(), read_config(), set_id_from_hdr(), set_peer_defaults(), sip_call(), socket_process_helper(), and vm_allocate_dh().
|
static |
Definition at line 164 of file chan_mgcp.c.
Referenced by __analog_handle_event(), __ast_channel_alloc_ap(), action_originate(), ari_channels_handle_originate_with_id(), build_gateway(), build_peer(), build_user(), caller_id_handler(), check_access(), check_peer_ok(), check_user_full(), create_addr_from_peer(), dahdi_handle_event(), get_pai(), get_rpid(), misdn_new(), originate_exec(), read_config(), set_id_from_hdr(), set_peer_defaults(), socket_process_helper(), state_notify_build_xml(), and vm_allocate_dh().
|
static |
Definition at line 1149 of file chan_mgcp.c.
|
static |
Definition at line 117 of file chan_mgcp.c.
Referenced by reload_config().
|
static |
Definition at line 159 of file chan_mgcp.c.
Referenced by build_gateway().
unsigned int cos |
Definition at line 179 of file chan_mgcp.c.
unsigned int cos_audio |
Definition at line 180 of file chan_mgcp.c.
|
static |
Definition at line 173 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 174 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Global jitterbuffer configuration - by default, jb is disabled
Definition at line 106 of file chan_mgcp.c.
|
static |
Definition at line 200 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 167 of file chan_mgcp.c.
Referenced by build_gateway(), and reload_config().
|
static |
Wait up to 16 seconds for first digit (FXO logic)
Definition at line 214 of file chan_mgcp.c.
Referenced by disa_exec(), mgcp_ss(), and reload_config().
|
static |
gatelock: mutex for gateway/endpoint lists
Definition at line 430 of file chan_mgcp.c.
Referenced by do_monitor(), find_subchannel_and_lock(), handle_mgcp_audit_endpoint(), handle_mgcp_show_endpoints(), mgcp_devicestate(), prune_gateways(), reload_config(), and unload_module().
|
static |
|
static |
How long to wait for following digits (FXO logic)
Definition at line 217 of file chan_mgcp.c.
Referenced by mgcp_ss(), and reload_config().
|
static |
Definition at line 235 of file chan_mgcp.c.
|
static |
Definition at line 114 of file chan_mgcp.c.
Referenced by mgcp_new(), and reload_config().
|
static |
Definition at line 171 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 183 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 245 of file chan_mgcp.c.
|
static |
Definition at line 161 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 204 of file chan_mgcp.c.
Referenced by acf_vm_info(), action_mailboxcount(), action_mailboxstatus(), add_peer_mailboxes(), add_peer_mwi_subs(), append_mailbox_mapping(), append_vmu_info_astman(), ast_mwi_mailbox_delete(), ast_smdi_mwi_set(), ast_smdi_mwi_unset(), asterisk_publication_mailboxstate(), build_gateway(), build_peer(), chanspy_exec(), clear_peer_mailboxes(), conf_run(), disa_exec(), extenspy_exec(), free_zone(), get_cached_mwi(), handle_request_notify(), inprocess_count(), mb_poll_thread(), messagecount(), minivm_mwi_exec(), mwi_has_voicemail(), mwi_inboxcount(), mwi_initial_events(), mwi_mailbox_delete_all(), mwi_mailbox_get(), mwi_mailbox_update(), mwi_messagecount(), mwi_observe_delete(), mwi_to_event(), peer_mailboxes_to_str(), publish_mwi_to_stasis(), publishers_create(), publishers_destroy(), pubsub_on_rx_mwi_notify_request(), queue_mwi_event(), realtime_directory(), sip_subscribe_mwi(), stasis_app_mailbox_delete(), stasis_app_mailbox_to_json(), stasis_app_mailbox_update(), stasis_app_mailboxes_to_json(), subscriptions_create(), vm_allocate_dh(), vm_sayname(), vmsayname_exec(), and xmpp_pubsub_handle_event().
|
static |
How long to wait for an extra digit, if there is an ambiguous match
Definition at line 220 of file chan_mgcp.c.
Referenced by mgcp_ss(), and reload_config().
|
static |
}
Definition at line 139 of file chan_mgcp.c.
Referenced by transmit_connect(), transmit_connect_with_sdp(), transmit_connection_del(), transmit_modify_request(), transmit_modify_with_sdp(), transmit_notify_request(), and transmit_notify_request_with_callerid().
|
static |
Definition at line 426 of file chan_mgcp.c.
Referenced by do_monitor(), mgcp_reload(), and unload_module().
|
static |
Definition at line 427 of file chan_mgcp.c.
Referenced by do_monitor(), mgcp_reload(), and unload_module().
|
static |
Definition at line 4511 of file chan_mgcp.c.
|
static |
Definition at line 472 of file chan_mgcp.c.
|
static |
Definition at line 242 of file chan_mgcp.c.
Referenced by handle_mgcp_audit_endpoint(), and handle_mgcp_set_debug().
|
static |
Definition at line 432 of file chan_mgcp.c.
Referenced by __mgcp_xmit(), do_monitor(), mgcpsock_read(), reload_config(), and unload_module().
|
static |
Definition at line 3758 of file chan_mgcp.c.
Referenced by do_monitor(), and reload_config().
|
static |
This is the thread for the monitor which checks for input on the channels which are not currently in use.
Definition at line 231 of file chan_mgcp.c.
Referenced by reload_config(), restart_monitor(), and unload_module().
|
static |
Definition at line 226 of file chan_mgcp.c.
Referenced by do_monitor(), restart_monitor(), and unload_module().
|
static |
Definition at line 162 of file chan_mgcp.c.
Referenced by build_gateway(), channel_hold_cb(), func_channel_write_real(), hold_to_json(), and load_module().
|
static |
Definition at line 168 of file chan_mgcp.c.
Referenced by ast_res_pjsip_initialize_configuration(), ast_udptl_setnat(), and build_gateway().
|
static |
Definition at line 169 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Protect the monitoring thread, so only one process can kill or start it, and not when it's doing something critical.
Definition at line 224 of file chan_mgcp.c.
Referenced by do_monitor(), and reload_config().
|
static |
Definition at line 236 of file chan_mgcp.c.
Referenced by process_sdp().
|
static |
Definition at line 210 of file chan_mgcp.c.
Referenced by reqprep().
|
static |
Definition at line 211 of file chan_mgcp.c.
Referenced by reqprep().
|
static |
Definition at line 238 of file chan_mgcp.c.
Referenced by ast_find_ourip(), and reload_config().
|
static |
Definition at line 240 of file chan_mgcp.c.
Referenced by initreqprep(), reload_config(), and transmit_notify_with_mwi().
|
static |
Definition at line 163 of file chan_mgcp.c.
Referenced by __find_callno(), __sip_alloc(), build_gateway(), build_peer(), build_user(), check_access(), check_peer_ok(), create_addr_from_peer(), func_channel_write_real(), load_module(), and manager_park().
|
static |
Definition at line 170 of file chan_mgcp.c.
Referenced by build_gateway().
struct { ... } qos |
Referenced by reload_config(), and start_rtp().
|
static |
Definition at line 244 of file chan_mgcp.c.
|
static |
Definition at line 198 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 189 of file chan_mgcp.c.
Referenced by build_gateway().
|
static |
Definition at line 116 of file chan_mgcp.c.
|
static |
Definition at line 191 of file chan_mgcp.c.
Referenced by build_gateway().
unsigned int tos |
Definition at line 177 of file chan_mgcp.c.
unsigned int tos_audio |
Definition at line 178 of file chan_mgcp.c.
|
static |
This is for flashhook transfers
Definition at line 194 of file chan_mgcp.c.
Referenced by ast_transfer_protocol(), build_gateway(), iax2_send(), jb_debug_output(), leave_voicemail(), and transfer_exec().