Asterisk - The Open Source Telephony Project
18.5.0
|
Supports RTP and RTCP with Symmetric RTP support for NAT traversal. More...
#include "asterisk.h"
#include <sys/time.h>
#include <signal.h>
#include <fcntl.h>
#include <openssl/opensslconf.h>
#include <openssl/opensslv.h>
#include <pjlib.h>
#include <pjlib-util.h>
#include <pjnath.h>
#include <ifaddrs.h>
#include "asterisk/conversions.h"
#include "asterisk/options.h"
#include "asterisk/logger_category.h"
#include "asterisk/stun.h"
#include "asterisk/pbx.h"
#include "asterisk/frame.h"
#include "asterisk/format_cache.h"
#include "asterisk/channel.h"
#include "asterisk/acl.h"
#include "asterisk/config.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
#include "asterisk/cli.h"
#include "asterisk/manager.h"
#include "asterisk/unaligned.h"
#include "asterisk/module.h"
#include "asterisk/rtp_engine.h"
#include "asterisk/smoother.h"
#include "asterisk/uuid.h"
#include "asterisk/test.h"
#include "asterisk/data_buffer.h"
#include "asterisk/res_pjproject.h"
#include "asterisk/security_events.h"
Go to the source code of this file.
Data Structures | |
struct | ast_ice_host_candidate |
Structure which contains ICE host candidate mapping information. More... | |
struct | ast_rtcp |
Structure defining an RTCP session. More... | |
struct | ast_rtp |
RTP session description. More... | |
struct | ast_rtp_ioqueue_thread |
Structure which contains ioqueue thread information. More... | |
struct | ast_rtp_rtcp_nack_payload |
Structure for storing RTP packets for retransmission. More... | |
struct | frame_list |
struct | host_candidates |
List of ICE host candidate mappings. More... | |
struct | ice_wrap |
struct | ioqueues |
List of ioqueue threads. More... | |
struct | optional_ts |
struct | rtp_drop_packets_data |
struct | rtp_learning_info |
RTP learning mode tracking information. More... | |
struct | rtp_red |
struct | rtp_ssrc_mapping |
Structure used for mapping an incoming SSRC to an RTP instance. More... | |
struct | rtp_transport_wide_cc_packet_statistics |
Packet statistics (used for transport-cc) More... | |
struct | rtp_transport_wide_cc_statistics |
Statistics information (used for transport-cc) More... | |
Enumerations | |
enum | strict_rtp_mode { STRICT_RTP_NO = 0, STRICT_RTP_YES, STRICT_RTP_SEQNO } |
enum | strict_rtp_state { STRICT_RTP_OPEN = 0, STRICT_RTP_LEARN, STRICT_RTP_CLOSED } |
Functions | |
static void | __init_pj_thread_storage (void) |
static void | __reg_module (void) |
static struct ast_rtp_instance * | __rtp_find_instance_by_ssrc (struct ast_rtp_instance *instance, struct ast_rtp *rtp, unsigned int ssrc, int source) |
static int | __rtp_recvfrom (struct ast_rtp_instance *instance, void *buf, size_t size, int flags, struct ast_sockaddr *sa, int rtcp) |
static int | __rtp_sendto (struct ast_rtp_instance *instance, void *buf, size_t size, int flags, struct ast_sockaddr *sa, int rtcp, int *via_ice, int use_srtp) |
static void | __unreg_module (void) |
static void | acl_change_stasis_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | ast2pj_rtp_ice_role (enum ast_rtp_ice_role ast_role, enum pj_ice_sess_role *pj_role) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static unsigned int | ast_rtcp_calc_interval (struct ast_rtp *rtp) |
static int | ast_rtcp_calculate_sr_rr_statistics (struct ast_rtp_instance *instance, struct ast_rtp_rtcp_report *rtcp_report, struct ast_sockaddr remote_address, int ice, int sr) |
static int | ast_rtcp_generate_compound_prefix (struct ast_rtp_instance *instance, unsigned char *rtcpheader, struct ast_rtp_rtcp_report *report, int *sr) |
static int | ast_rtcp_generate_nack (struct ast_rtp_instance *instance, unsigned char *rtcpheader) |
static int | ast_rtcp_generate_report (struct ast_rtp_instance *instance, unsigned char *rtcpheader, struct ast_rtp_rtcp_report *rtcp_report, int *sr) |
static int | ast_rtcp_generate_sdes (struct ast_rtp_instance *instance, unsigned char *rtcpheader, struct ast_rtp_rtcp_report *rtcp_report) |
static struct ast_frame * | ast_rtcp_interpret (struct ast_rtp_instance *instance, struct ast_srtp *srtp, const unsigned char *rtcpdata, size_t size, struct ast_sockaddr *addr) |
static struct ast_frame * | ast_rtcp_read (struct ast_rtp_instance *instance) |
static int | ast_rtcp_write (const void *data) |
Write a RTCP packet to the far end. More... | |
static int | ast_rtp_bundle (struct ast_rtp_instance *child, struct ast_rtp_instance *parent) |
static void | ast_rtp_change_source (struct ast_rtp_instance *instance) |
static int | ast_rtp_destroy (struct ast_rtp_instance *instance) |
static int | ast_rtp_dtmf_begin (struct ast_rtp_instance *instance, char digit) |
static int | ast_rtp_dtmf_compatible (struct ast_channel *chan0, struct ast_rtp_instance *instance0, struct ast_channel *chan1, struct ast_rtp_instance *instance1) |
static int | ast_rtp_dtmf_continuation (struct ast_rtp_instance *instance) |
static int | ast_rtp_dtmf_end (struct ast_rtp_instance *instance, char digit) |
static int | ast_rtp_dtmf_end_with_duration (struct ast_rtp_instance *instance, char digit, unsigned int duration) |
static enum ast_rtp_dtmf_mode | ast_rtp_dtmf_mode_get (struct ast_rtp_instance *instance) |
static int | ast_rtp_dtmf_mode_set (struct ast_rtp_instance *instance, enum ast_rtp_dtmf_mode dtmf_mode) |
static int | ast_rtp_extension_enable (struct ast_rtp_instance *instance, enum ast_rtp_extension extension) |
static int | ast_rtp_fd (struct ast_rtp_instance *instance, int rtcp) |
static const char * | ast_rtp_get_cname (struct ast_rtp_instance *instance) |
static unsigned int | ast_rtp_get_ssrc (struct ast_rtp_instance *instance) |
static int | ast_rtp_get_stat (struct ast_rtp_instance *instance, struct ast_rtp_instance_stats *stats, enum ast_rtp_instance_stat stat) |
static void | ast_rtp_ice_add_cand (struct ast_rtp_instance *instance, struct ast_rtp *rtp, unsigned comp_id, unsigned transport_id, pj_ice_cand_type type, pj_uint16_t local_pref, const pj_sockaddr_t *addr, const pj_sockaddr_t *base_addr, const pj_sockaddr_t *rel_addr, int addr_len) |
static void | ast_rtp_ice_add_remote_candidate (struct ast_rtp_instance *instance, const struct ast_rtp_engine_ice_candidate *candidate) |
static void | ast_rtp_ice_candidate_destroy (void *obj) |
Destructor for locally created ICE candidates. More... | |
static void | ast_rtp_ice_change_components (struct ast_rtp_instance *instance, int num_components) |
static struct ao2_container * | ast_rtp_ice_get_local_candidates (struct ast_rtp_instance *instance) |
static const char * | ast_rtp_ice_get_password (struct ast_rtp_instance *instance) |
static const char * | ast_rtp_ice_get_ufrag (struct ast_rtp_instance *instance) |
static void | ast_rtp_ice_lite (struct ast_rtp_instance *instance) |
static void | ast_rtp_ice_set_authentication (struct ast_rtp_instance *instance, const char *ufrag, const char *password) |
static void | ast_rtp_ice_set_role (struct ast_rtp_instance *instance, enum ast_rtp_ice_role role) |
static void | ast_rtp_ice_start (struct ast_rtp_instance *instance) |
static void | ast_rtp_ice_start_media (pj_ice_sess *ice, pj_status_t status) |
static void | ast_rtp_ice_stop (struct ast_rtp_instance *instance) |
static void | ast_rtp_ice_turn_request (struct ast_rtp_instance *instance, enum ast_rtp_ice_component_type component, enum ast_transport transport, const char *server, unsigned int port, const char *username, const char *password) |
static struct ast_frame * | ast_rtp_interpret (struct ast_rtp_instance *instance, struct ast_srtp *srtp, const struct ast_sockaddr *remote_address, unsigned char *read_area, int length, int prev_seqno, unsigned int bundled) |
static int | ast_rtp_local_bridge (struct ast_rtp_instance *instance0, struct ast_rtp_instance *instance1) |
static int | ast_rtp_new (struct ast_rtp_instance *instance, struct ast_sched_context *sched, struct ast_sockaddr *addr, void *data) |
static void | ast_rtp_on_ice_complete (pj_ice_sess *ice, pj_status_t status) |
static void | ast_rtp_on_ice_rx_data (pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, void *pkt, pj_size_t size, const pj_sockaddr_t *src_addr, unsigned src_addr_len) |
static pj_status_t | ast_rtp_on_ice_tx_pkt (pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, const void *pkt, pj_size_t size, const pj_sockaddr_t *dst_addr, unsigned dst_addr_len) |
static void | ast_rtp_on_turn_rtcp_state (pj_turn_sock *turn_sock, pj_turn_state_t old_state, pj_turn_state_t new_state) |
static void | ast_rtp_on_turn_rtp_state (pj_turn_sock *turn_sock, pj_turn_state_t old_state, pj_turn_state_t new_state) |
static void | ast_rtp_on_turn_rx_rtcp_data (pj_turn_sock *turn_sock, void *pkt, unsigned pkt_len, const pj_sockaddr_t *peer_addr, unsigned addr_len) |
static void | ast_rtp_on_turn_rx_rtp_data (pj_turn_sock *turn_sock, void *pkt, unsigned pkt_len, const pj_sockaddr_t *peer_addr, unsigned addr_len) |
static void | ast_rtp_on_valid_pair (pj_ice_sess *ice) |
static void | ast_rtp_prop_set (struct ast_rtp_instance *instance, enum ast_rtp_property property, int value) |
static int | ast_rtp_qos_set (struct ast_rtp_instance *instance, int tos, int cos, const char *desc) |
static struct ast_frame * | ast_rtp_read (struct ast_rtp_instance *instance, int rtcp) |
static void | ast_rtp_remote_address_set (struct ast_rtp_instance *instance, struct ast_sockaddr *addr) |
static int | ast_rtp_rtcp_handle_nack (struct ast_rtp_instance *instance, unsigned int *nackdata, unsigned int position, unsigned int length) |
static int | ast_rtp_sendcng (struct ast_rtp_instance *instance, int level) |
generate comfort noice (CNG) More... | |
static void | ast_rtp_set_remote_ssrc (struct ast_rtp_instance *instance, unsigned int ssrc) |
static void | ast_rtp_set_stream_num (struct ast_rtp_instance *instance, int stream_num) |
static void | ast_rtp_stop (struct ast_rtp_instance *instance) |
static void | ast_rtp_stun_request (struct ast_rtp_instance *instance, struct ast_sockaddr *suggestion, const char *username) |
static void | ast_rtp_update_source (struct ast_rtp_instance *instance) |
static int | ast_rtp_write (struct ast_rtp_instance *instance, struct ast_frame *frame) |
static int | bridge_p2p_rtp_write (struct ast_rtp_instance *instance, struct ast_rtp_instance *instance1, unsigned int *rtpheader, int len, int hdrlen) |
static void | calc_mean_and_standard_deviation (double new_sample, double *mean, double *std_dev, unsigned int *count) |
static void | calc_rxstamp (struct timeval *tv, struct ast_rtp *rtp, unsigned int timestamp, int mark) |
static unsigned int | calc_txstamp (struct ast_rtp *rtp, struct timeval *delivery) |
static void | calculate_lost_packet_statistics (struct ast_rtp *rtp, unsigned int *lost_packets, int *fraction_lost) |
static int | compare_by_value (int elem, int value) |
Helper function to compare an elem in a vector by value. More... | |
static struct ast_frame * | create_dtmf_frame (struct ast_rtp_instance *instance, enum ast_frame_type type, int compensate) |
static int | create_new_socket (const char *type, int af) |
static void | drop_packets_data_update (struct timeval tv) |
static int | find_by_value (int elem, int value) |
Helper function to find an elem in a vector by value. More... | |
static char * | generate_random_string (char *buf, size_t size) |
static size_t | get_recv_buffer_count (struct ast_rtp_instance *instance) |
static size_t | get_recv_buffer_max (struct ast_rtp_instance *instance) |
static size_t | get_send_buffer_count (struct ast_rtp_instance *instance) |
static char * | handle_cli_rtcp_set_debug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_rtcp_set_stats (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_rtp_drop_incoming_packets (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_rtp_set_debug (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_rtp_settings (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static void | host_candidate_overrides_clear (void) |
Helper function which clears the ICE host candidate mapping. More... | |
static int | ice_candidate_cmp (void *obj, void *arg, int flags) |
static int | ice_candidates_compare (struct ao2_container *left, struct ao2_container *right) |
static int | ice_create (struct ast_rtp_instance *instance, struct ast_sockaddr *addr, int port, int replace) |
static int | ice_reset_session (struct ast_rtp_instance *instance) |
static void | ice_wrap_dtor (void *vdoomed) |
ao2 ICE wrapper object destructor. More... | |
static int | ioqueue_worker_thread (void *data) |
Worker thread for ioqueue and timerheap. More... | |
static int | load_module (void) |
static void | ntp2timeval (unsigned int msw, unsigned int lsw, struct timeval *tv) |
static void | pj2ast_rtp_ice_role (enum pj_ice_sess_role pj_role, enum ast_rtp_ice_role *ast_role) |
static void | pj_thread_register_check (void) |
Function used to check if the calling thread is registered with pjlib. If it is not it will be registered. More... | |
static struct ast_frame * | process_cn_rfc3389 (struct ast_rtp_instance *instance, unsigned char *data, int len, unsigned int seqno, unsigned int timestamp, int payloadtype, int mark) |
static struct ast_frame * | process_dtmf_cisco (struct ast_rtp_instance *instance, unsigned char *data, int len, unsigned int seqno, unsigned int timestamp, int payloadtype, int mark) |
static void | process_dtmf_rfc2833 (struct ast_rtp_instance *instance, unsigned char *data, int len, unsigned int seqno, unsigned int timestamp, int payloadtype, int mark, struct frame_list *frames) |
static void | put_unaligned_time24 (void *p, uint32_t time_msw, uint32_t time_lsw) |
static struct ast_frame * | red_t140_to_red (struct rtp_red *red) |
static int | red_write (const void *data) |
Write t140 redundacy frame. More... | |
static int | reload_module (void) |
static int | rtcp_debug_test_addr (struct ast_sockaddr *addr) |
static char * | rtcp_do_debug_ip (struct ast_cli_args *a) |
static int | rtcp_mux (struct ast_rtp *rtp, const unsigned char *packet) |
static const char * | rtcp_payload_subtype2str (unsigned int pt, unsigned int subtype) |
static const char * | rtcp_payload_type2str (unsigned int pt) |
static int | rtcp_recvfrom (struct ast_rtp_instance *instance, void *buf, size_t size, int flags, struct ast_sockaddr *sa) |
static int | rtcp_sendto (struct ast_rtp_instance *instance, void *buf, size_t size, int flags, struct ast_sockaddr *sa, int *ice) |
static void | rtp_add_candidates_to_ice (struct ast_rtp_instance *instance, struct ast_rtp *rtp, struct ast_sockaddr *addr, int port, int component, int transport) |
static int | rtp_address_is_ice_blacklisted (const struct ast_sockaddr *address) |
static int | rtp_allocate_transport (struct ast_rtp_instance *instance, struct ast_rtp *rtp) |
static void | rtp_deallocate_transport (struct ast_rtp_instance *instance, struct ast_rtp *rtp) |
static int | rtp_debug_test_addr (struct ast_sockaddr *addr) |
static char * | rtp_do_debug_ip (struct ast_cli_args *a) |
static struct ast_rtp_instance * | rtp_find_instance_by_media_source_ssrc (struct ast_rtp_instance *instance, struct ast_rtp *rtp, unsigned int ssrc) |
static struct ast_rtp_instance * | rtp_find_instance_by_packet_source_ssrc (struct ast_rtp_instance *instance, struct ast_rtp *rtp, unsigned int ssrc) |
static void | rtp_instance_parse_extmap_extensions (struct ast_rtp_instance *instance, struct ast_rtp *rtp, unsigned char *extension, int len) |
static void | rtp_instance_parse_transport_wide_cc (struct ast_rtp_instance *instance, struct ast_rtp *rtp, unsigned char *data, int len) |
static void | rtp_instance_unlock (struct ast_rtp_instance *instance) |
static void | rtp_ioqueue_thread_destroy (struct ast_rtp_ioqueue_thread *ioqueue) |
Destroyer for ioqueue thread. More... | |
static struct ast_rtp_ioqueue_thread * | rtp_ioqueue_thread_get_or_create (void) |
Finder and allocator for an ioqueue thread. More... | |
static void | rtp_ioqueue_thread_remove (struct ast_rtp_ioqueue_thread *ioqueue) |
Removal function for ioqueue thread, determines if it should be terminated and destroyed. More... | |
static int | rtp_learning_rtp_seq_update (struct rtp_learning_info *info, uint16_t seq) |
static void | rtp_learning_seq_init (struct rtp_learning_info *info, uint16_t seq) |
static void | rtp_learning_start (struct ast_rtp *rtp) |
Start the strictrtp learning mode. More... | |
static int | rtp_raw_write (struct ast_rtp_instance *instance, struct ast_frame *frame, int codec) |
static int | rtp_recvfrom (struct ast_rtp_instance *instance, void *buf, size_t size, int flags, struct ast_sockaddr *sa) |
static int | rtp_red_buffer (struct ast_rtp_instance *instance, struct ast_frame *frame) |
static int | rtp_red_init (struct ast_rtp_instance *instance, int buffer_time, int *payloads, int generations) |
static int | rtp_reload (int reload, int by_external_config) |
static int | rtp_sendto (struct ast_rtp_instance *instance, void *buf, size_t size, int flags, struct ast_sockaddr *sa, int *ice) |
static void | rtp_terminate_pjproject (void) |
static int | rtp_transport_wide_cc_feedback_produce (const void *data) |
static void | rtp_transport_wide_cc_feedback_status_append (unsigned char *rtcpheader, int *packet_len, int *status_vector_chunk_bits, uint16_t *status_vector_chunk, int *run_length_chunk_count, int *run_length_chunk_status, int status) |
static void | rtp_transport_wide_cc_feedback_status_vector_append (unsigned char *rtcpheader, int *packet_len, int *status_vector_chunk_bits, uint16_t *status_vector_chunk, int status) |
static int | rtp_transport_wide_cc_packet_statistics_cmp (struct rtp_transport_wide_cc_packet_statistics a, struct rtp_transport_wide_cc_packet_statistics b) |
static void | rtp_unload_acl (ast_rwlock_t *lock, struct ast_acl_list **acl) |
static void | rtp_write_rtcp_fir (struct ast_rtp_instance *instance, struct ast_rtp *rtp, struct ast_sockaddr *remote_address) |
static void | rtp_write_rtcp_psfb (struct ast_rtp_instance *instance, struct ast_rtp *rtp, struct ast_frame *frame, struct ast_sockaddr *remote_address) |
static void | set_rtp_rtcp_schedid (struct ast_rtp_instance *instance, int id) |
static int | should_drop_packets (struct ast_sockaddr *addr) |
static int | stun_address_is_blacklisted (const struct ast_sockaddr *addr) |
static int | timer_worker_thread (void *data) |
Worker thread for timerheap. More... | |
static void | timeval2ntp (struct timeval tv, unsigned int *msw, unsigned int *lsw) |
static int | unload_module (void) |
static void | update_address_with_ice_candidate (pj_ice_sess *ice, enum ast_rtp_ice_component_type component, struct ast_sockaddr *cand_address) |
Helper function which updates an ast_sockaddr with the candidate used for the component. More... | |
static void | update_jitter_stats (struct ast_rtp *rtp, unsigned int ia_jitter) |
static void | update_lost_stats (struct ast_rtp *rtp, unsigned int lost_packets) |
static int | update_rtt_stats (struct ast_rtp *rtp, unsigned int lsr, unsigned int dlsr) |
static unsigned int | use_random (struct ast_cli_args *a, int pos, unsigned int index) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Asterisk RTP Stack" , .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_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND, #ifdef 1 .requires = "res_pjproject", #endif } |
static struct stasis_subscription * | acl_change_sub = NULL |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_rtp_engine_ice | ast_rtp_ice |
static pj_ice_sess_cb | ast_rtp_ice_sess_cb |
static struct ast_rtp_engine_test | ast_rtp_test |
static pj_turn_sock_cb | ast_rtp_turn_rtcp_sock_cb |
static pj_turn_sock_cb | ast_rtp_turn_rtp_sock_cb |
static struct ast_rtp_engine | asterisk_rtp_engine |
static pj_caching_pool | cachingpool |
Pool factory used by pjlib to allocate memory. More... | |
static struct ast_cli_entry | cli_rtp [] |
static struct rtp_drop_packets_data | drop_packets_data |
static int | dtmftimeout = DEFAULT_DTMF_TIMEOUT |
static struct host_candidates | host_candidates = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static struct ast_acl_list * | ice_acl = NULL |
static ast_rwlock_t | ice_acl_lock = AST_RWLOCK_INIT_VALUE |
static int | icesupport = DEFAULT_ICESUPPORT |
static struct ioqueues | ioqueues = { .first = NULL, .last = NULL, .lock = { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP , NULL, {1, 0} } , } |
static int | learning_min_duration = DEFAULT_LEARNING_MIN_DURATION |
static int | learning_min_sequential = DEFAULT_LEARNING_MIN_SEQUENTIAL |
static struct ast_sockaddr | lo6 = { .len = 0 } |
static struct ast_threadstorage | pj_thread_storage = { .once = PTHREAD_ONCE_INIT , .key_init = __init_pj_thread_storage , .custom_init = NULL , } |
static pj_pool_t * | pool |
Global memory pool for configuration and timers. More... | |
struct ast_srtp_res * | res_srtp |
struct ast_srtp_policy_res * | res_srtp_policy |
static struct ast_sockaddr | rtcpdebugaddr |
static int | rtcpdebugport |
static int | rtcpinterval = RTCP_DEFAULT_INTERVALMS |
static int | rtcpstats |
static struct ast_sockaddr | rtpdebugaddr |
static int | rtpdebugport |
static int | rtpend = DEFAULT_RTP_END |
static int | rtpstart = DEFAULT_RTP_START |
static int | srtp_replay_protection = DEFAULT_SRTP_REPLAY_PROTECTION |
static int | strictrtp = DEFAULT_STRICT_RTP |
static struct ast_acl_list * | stun_acl = NULL |
static ast_rwlock_t | stun_acl_lock = AST_RWLOCK_INIT_VALUE |
static int | stun_software_attribute = DEFAULT_STUN_SOFTWARE_ATTRIBUTE |
static struct sockaddr_in | stunaddr |
static pj_timer_heap_t * | timer_heap |
Global timer heap. More... | |
static int | timer_terminate |
Used to tell the timer thread to terminate. More... | |
static pj_thread_t * | timer_thread |
Thread executing the timer heap. More... | |
static pj_str_t | turnaddr |
static pj_str_t | turnpassword |
static int | turnport = DEFAULT_TURN_PORT |
static pj_str_t | turnusername |
Supports RTP and RTCP with Symmetric RTP support for NAT traversal.
Definition in file res_rtp_asterisk.c.
#define CALC_LEARNING_MIN_DURATION | ( | count | ) | (((count) - 1) * 9 - 5) |
Calculate the min learning duration in ms.
The min supported packet size represents 10 ms and we need to account for some jitter and fast clocks while learning. Some messed up devices have very bad jitter for a small packet sample size. Jitter can also be introduced by the network itself.
So we'll allow packets to come in every 9ms on average for fast clocking with the last one coming in 5ms early for jitter.
Definition at line 154 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DEFAULT_DTLS_MTU 1200 |
Definition at line 188 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DEFAULT_DTMF_TIMEOUT (150 * (8000 / 1000)) |
#define DEFAULT_ICESUPPORT 1 |
Definition at line 186 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DEFAULT_LEARNING_MIN_DURATION CALC_LEARNING_MIN_DURATION(DEFAULT_LEARNING_MIN_SEQUENTIAL) |
Definition at line 155 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DEFAULT_LEARNING_MIN_SEQUENTIAL 4 |
Definition at line 141 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DEFAULT_RTP_END 31000 |
Default maximum port number to end allocating RTP ports at
Definition at line 100 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DEFAULT_RTP_RECV_BUFFER_SIZE 20 |
The initial size of the RTP receiver buffer
Definition at line 111 of file res_rtp_asterisk.c.
Referenced by ast_rtp_prop_set().
#define DEFAULT_RTP_SEND_BUFFER_SIZE 250 |
The initial size of the RTP send buffer
Definition at line 109 of file res_rtp_asterisk.c.
Referenced by ast_rtp_prop_set().
#define DEFAULT_RTP_START 5000 |
Default port number to start allocating RTP ports from
Definition at line 99 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DEFAULT_SRTP_REPLAY_PROTECTION 1 |
Definition at line 185 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DEFAULT_STRICT_RTP STRICT_RTP_YES |
#define DEFAULT_STUN_SOFTWARE_ATTRIBUTE 1 |
Definition at line 187 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DEFAULT_TURN_PORT 3478 |
Definition at line 105 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define DTMF_SAMPLE_RATE_MS 8 |
DTMF samples per millisecond
Definition at line 135 of file res_rtp_asterisk.c.
Referenced by ast_rtp_dtmf_begin(), ast_rtp_dtmf_continuation(), and ast_rtp_dtmf_end_with_duration().
#define FLAG_3389_WARNING (1 << 0) |
Definition at line 283 of file res_rtp_asterisk.c.
Referenced by process_cn_rfc3389().
#define FLAG_DTMF_COMPENSATE (1 << 4) |
Definition at line 288 of file res_rtp_asterisk.c.
#define FLAG_NAT_ACTIVE (3 << 1) |
Definition at line 284 of file res_rtp_asterisk.c.
Referenced by ast_rtp_read(), bridge_p2p_rtp_write(), and rtp_raw_write().
#define FLAG_NAT_INACTIVE (0 << 1) |
Definition at line 285 of file res_rtp_asterisk.c.
Referenced by bridge_p2p_rtp_write(), and rtp_raw_write().
#define FLAG_NAT_INACTIVE_NOWARN (1 << 1) |
Definition at line 286 of file res_rtp_asterisk.c.
Referenced by bridge_p2p_rtp_write(), and rtp_raw_write().
#define FLAG_NEED_MARKER_BIT (1 << 3) |
Definition at line 287 of file res_rtp_asterisk.c.
Referenced by ast_rtp_change_source(), ast_rtp_local_bridge(), ast_rtp_stop(), ast_rtp_update_source(), bridge_p2p_rtp_write(), and rtp_raw_write().
#define FLAG_REQ_LOCAL_BRIDGE_BIT (1 << 5) |
Definition at line 289 of file res_rtp_asterisk.c.
Referenced by ast_rtp_local_bridge(), and bridge_p2p_rtp_write().
#define MAX_TIMESTAMP_SKEW 640 |
Definition at line 92 of file res_rtp_asterisk.c.
Referenced by rtp_raw_write().
#define MAXIMUM_RTP_PORT 65535 |
Maximum port number to accept
Definition at line 103 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define MAXIMUM_RTP_RECV_BUFFER_SIZE (DEFAULT_RTP_RECV_BUFFER_SIZE + 20) |
Maximum RTP receive buffer size
Definition at line 112 of file res_rtp_asterisk.c.
Referenced by ast_rtp_read().
#define MAXIMUM_RTP_SEND_BUFFER_SIZE (DEFAULT_RTP_SEND_BUFFER_SIZE + 200) |
Maximum RTP send buffer size
Definition at line 110 of file res_rtp_asterisk.c.
Referenced by ast_rtp_rtcp_handle_nack().
#define MINIMUM_RTP_PORT 1024 |
Minimum port number to accept
Definition at line 102 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define MISSING_SEQNOS_ADDED_TRIGGER 2 |
The number of immediate missing packets that will trigger an immediate NACK
Definition at line 114 of file res_rtp_asterisk.c.
Referenced by ast_rtp_read().
#define OLD_PACKET_COUNT 1000 |
The number of previous packets that are considered old
Definition at line 113 of file res_rtp_asterisk.c.
Referenced by ast_rtp_read().
#define RTCP_DEFAULT_INTERVALMS 5000 |
Default milli-seconds between RTCP reports we send
Definition at line 95 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define RTCP_FB_NACK_BLOCK_WORD_LENGTH 2 |
Definition at line 6098 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_FB_REMB_BLOCK_WORD_LENGTH 4 |
Definition at line 6097 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_HEADER_SSRC_LENGTH 2 |
Definition at line 6096 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_LENGTH_MASK 0xFFFF |
Definition at line 6061 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_LENGTH_SHIFT 0 |
Definition at line 6070 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_MAX_INTERVALMS 60000 |
Max milli-seconds between RTCP reports we send
Definition at line 97 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define RTCP_MIN_INTERVALMS 500 |
Min milli-seconds between RTCP reports we send
Definition at line 96 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
#define RTCP_PADDING_MASK 0x01 |
Definition at line 6064 of file res_rtp_asterisk.c.
#define RTCP_PADDING_SHIFT 29 |
Definition at line 6073 of file res_rtp_asterisk.c.
#define RTCP_PAYLOAD_TYPE_MASK 0xFF |
Definition at line 6062 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_PAYLOAD_TYPE_SHIFT 16 |
Definition at line 6071 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_PT_APP 204 |
Application defined (From RFC3550)
Definition at line 129 of file res_rtp_asterisk.c.
#define RTCP_PT_BYE 203 |
Goodbye (To remove SSRC's from tables) (From RFC3550)
Definition at line 127 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret(), and rtcp_payload_type2str().
#define RTCP_PT_FUR 192 |
Full INTRA-frame Request / Fast Update Request (From RFC2032)
Definition at line 119 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret(), and rtcp_payload_type2str().
#define RTCP_PT_PSFB AST_RTP_RTCP_PSFB |
Payload Specific Feed Back (From RFC4585 also RFC5104)
Definition at line 132 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret(), rtcp_payload_subtype2str(), rtcp_payload_type2str(), rtp_write_rtcp_fir(), and rtp_write_rtcp_psfb().
#define RTCP_PT_RR AST_RTP_RTCP_RR |
Receiver Report (From RFC3550)
Definition at line 123 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_generate_report(), ast_rtcp_interpret(), and rtcp_payload_type2str().
#define RTCP_PT_SDES 202 |
Source Description (From RFC3550)
Definition at line 125 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_generate_sdes(), ast_rtcp_interpret(), and rtcp_payload_type2str().
#define RTCP_PT_SR AST_RTP_RTCP_SR |
Sender Report (From RFC3550)
Definition at line 121 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_generate_report(), ast_rtcp_interpret(), and rtcp_payload_type2str().
#define RTCP_REPORT_COUNT_MASK 0x1F |
Definition at line 6063 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_REPORT_COUNT_SHIFT 24 |
Definition at line 6072 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_RR_BLOCK_WORD_LENGTH 6 |
Definition at line 6095 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_SR_BLOCK_WORD_LENGTH 5 |
Definition at line 6094 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_VALID_MASK (RTCP_VERSION_MASK_SHIFTED | (((RTCP_PAYLOAD_TYPE_MASK & ~0x1)) << RTCP_PAYLOAD_TYPE_SHIFT)) |
Definition at line 6091 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_VALID_VALUE (RTCP_VERSION_SHIFTED | (RTCP_PT_SR << RTCP_PAYLOAD_TYPE_SHIFT)) |
Definition at line 6092 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_VERSION 2U |
Definition at line 6076 of file res_rtp_asterisk.c.
#define RTCP_VERSION_MASK 0x03 |
Definition at line 6065 of file res_rtp_asterisk.c.
#define RTCP_VERSION_MASK_SHIFTED (RTCP_VERSION_MASK << RTCP_VERSION_SHIFT) |
Definition at line 6078 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTCP_VERSION_SHIFT 30 |
Definition at line 6074 of file res_rtp_asterisk.c.
#define RTCP_VERSION_SHIFTED (RTCP_VERSION << RTCP_VERSION_SHIFT) |
Definition at line 6077 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
#define RTP_DTLS_ESTABLISHED -37 |
Definition at line 161 of file res_rtp_asterisk.c.
Referenced by __rtp_recvfrom(), ast_rtcp_read(), and ast_rtp_read().
#define RTP_MTU 1200 |
Definition at line 134 of file res_rtp_asterisk.c.
#define RTP_SEQ_MOD (1<<16) |
A sequence number can't be more than 16 bits
Definition at line 94 of file res_rtp_asterisk.c.
Referenced by ast_rtp_interpret(), and rtp_instance_parse_transport_wide_cc().
#define SEQNO_CYCLE_OVER 65536 |
The number after the maximum allowed sequence number
Definition at line 116 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_generate_nack(), and ast_rtp_read().
#define SRTP_MASTER_KEY_LEN 16 |
Definition at line 157 of file res_rtp_asterisk.c.
Referenced by res_sdp_crypto_alloc(), and rtcp_debug_test_addr().
#define SRTP_MASTER_LEN (SRTP_MASTER_KEY_LEN + SRTP_MASTER_SALT_LEN) |
Definition at line 159 of file res_rtp_asterisk.c.
Referenced by rtcp_debug_test_addr().
#define SRTP_MASTER_SALT_LEN 14 |
Definition at line 158 of file res_rtp_asterisk.c.
Referenced by rtcp_debug_test_addr().
SSRC mapping comparator for AST_VECTOR_REMOVE_CMP_UNORDERED()
elem | Element to compare against |
value | Value to compare with the vector element. |
Definition at line 4045 of file res_rtp_asterisk.c.
Referenced by ast_rtp_bundle(), and ast_rtp_destroy().
#define STRICT_RTP_LEARN_TIMEOUT 5000 |
Strict RTP learning timeout time in milliseconds.
Definition at line 182 of file res_rtp_asterisk.c.
Referenced by ast_rtp_read().
#define TRANSPORT_SOCKET_RTCP 1 |
Definition at line 292 of file res_rtp_asterisk.c.
Referenced by __rtp_recvfrom(), ast_rtp_on_ice_rx_data(), ast_rtp_on_ice_tx_pkt(), ast_rtp_prop_set(), and ice_create().
#define TRANSPORT_SOCKET_RTP 0 |
Definition at line 291 of file res_rtp_asterisk.c.
Referenced by __rtp_recvfrom(), ast_rtp_on_ice_rx_data(), ast_rtp_on_ice_tx_pkt(), and ice_create().
#define TRANSPORT_TURN_RTCP 3 |
Definition at line 294 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_turn_request(), ast_rtp_on_ice_rx_data(), ast_rtp_on_ice_tx_pkt(), and ast_rtp_on_turn_rx_rtcp_data().
#define TRANSPORT_TURN_RTP 2 |
Definition at line 293 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_turn_request(), ast_rtp_on_ice_rx_data(), ast_rtp_on_ice_tx_pkt(), and ast_rtp_on_turn_rx_rtp_data().
#define TURN_STATE_WAIT_TIME 2000 |
Definition at line 107 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_turn_request(), ice_reset_session(), and rtp_deallocate_transport().
#define ZFONE_PROFILE_ID 0x505a |
Definition at line 139 of file res_rtp_asterisk.c.
enum strict_rtp_mode |
Enumerator | |
---|---|
STRICT_RTP_NO | |
STRICT_RTP_YES | Don't adhere to any strict RTP rules |
STRICT_RTP_SEQNO | Strict RTP that restricts packets based on time and sequence number |
Definition at line 169 of file res_rtp_asterisk.c.
enum strict_rtp_state |
Enumerator | |
---|---|
STRICT_RTP_OPEN | |
STRICT_RTP_LEARN | No RTP packets should be dropped, all sources accepted |
STRICT_RTP_CLOSED | Accept next packet as source |
Definition at line 163 of file res_rtp_asterisk.c.
|
static |
Definition at line 862 of file res_rtp_asterisk.c.
|
static |
Definition at line 9742 of file res_rtp_asterisk.c.
|
static |
Definition at line 5869 of file res_rtp_asterisk.c.
References ast_rtp_get_ssrc(), AST_VECTOR_GET_ADDR, AST_VECTOR_SIZE, rtp_ssrc_mapping::instance, NULL, rtp_ssrc_mapping::ssrc, rtp_ssrc_mapping::ssrc_valid, ast_rtp::themssrc, and ast_rtp::themssrc_valid.
Referenced by rtp_find_instance_by_media_source_ssrc(), and rtp_find_instance_by_packet_source_ssrc().
|
static |
Definition at line 3084 of file res_rtp_asterisk.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_debug_dtls, ast_log, ast_recvfrom(), AST_RTP_DTLS_CONNECTION_EXISTING, AST_RTP_DTLS_SETUP_ACTPASS, AST_RTP_DTLS_SETUP_PASSIVE, AST_RTP_ICE_COMPONENT_RTCP, AST_RTP_ICE_COMPONENT_RTP, ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, ast_rtp_instance_get_test(), ast_rtp_instance_set_remote_address, ast_sockaddr_cmp(), ast_sockaddr_copy(), ast_sockaddr_isnull(), ast_sockaddr_stringify(), buf, error(), in, len(), LOG_ERROR, LOG_WARNING, ast_rtp_engine_test::packets_to_drop, pj_thread_register_check(), ice_wrap::real_ice, RTP_DTLS_ESTABLISHED, ast_rtp::s, status, TRANSPORT_SOCKET_RTCP, and TRANSPORT_SOCKET_RTP.
Referenced by rtcp_recvfrom(), and rtp_recvfrom().
|
static |
Definition at line 3247 of file res_rtp_asterisk.c.
References ao2_lock, ao2_ref, ao2_unlock, AST_RTP_ICE_COMPONENT_RTCP, AST_RTP_ICE_COMPONENT_RTP, ast_rtp_instance_get_data(), ast_rtp_instance_get_srtp(), ast_rtp_instance_set_last_tx(), ast_sendto(), buf, len(), NULL, pj_thread_register_check(), ast_srtp_res::protect, ice_wrap::real_ice, ast_rtp::s, and status.
Referenced by rtcp_sendto(), and rtp_sendto().
|
static |
Definition at line 9742 of file res_rtp_asterisk.c.
|
static |
Definition at line 9613 of file res_rtp_asterisk.c.
References ast_named_acl_change_type(), rtp_reload(), and stasis_message_type().
Referenced by rtp_learning_start().
|
static |
Definition at line 927 of file res_rtp_asterisk.c.
References AST_RTP_ICE_ROLE_CONTROLLED, and AST_RTP_ICE_ROLE_CONTROLLING.
Referenced by ice_reset_session().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 9742 of file res_rtp_asterisk.c.
|
static |
Definition at line 3323 of file res_rtp_asterisk.c.
References rtcpinterval.
Referenced by ast_rtp_interpret(), and rtp_raw_write().
|
static |
Definition at line 4579 of file res_rtp_asterisk.c.
References ast_json_pack(), ast_json_unref(), ast_rtp_get_rate(), ast_rtp_instance_get_data(), ast_rtp_publish_rtcp_message(), ast_rtp_rtcp_sent_type(), ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_verbose(), ast_rtp_rtcp_report_block::dlsr, ast_rtp::f, ast_frame_subclass::format, ast_rtp_rtcp_report_block::fraction, ast_rtp_rtcp_report_block::highest_seq_no, ast_rtp_rtcp_report_block::ia_jitter, ast_rtp_rtcp_report_block::lost_count, ast_rtp_rtcp_report_block::lsr, ast_rtp_rtcp_report::ntp_timestamp, NULL, ast_rtp_rtcp_report::octet_count, ast_rtp_rtcp_report::packet_count, ast_rtp_rtcp_report_block::packets, RAII_VAR, ast_rtp_rtcp_report::report_block, rtcp_debug_test_addr(), ast_rtp_rtcp_report::rtp_timestamp, ast_rtp_rtcp_report::sender_information, ast_rtp_rtcp_report_block::source_ssrc, ast_rtp_rtcp_report::ssrc, and ast_frame::subclass.
Referenced by ast_rtcp_write(), ast_rtp_read(), rtp_write_rtcp_fir(), and rtp_write_rtcp_psfb().
|
static |
Definition at line 4699 of file res_rtp_asterisk.c.
References ast_debug_rtcp, ast_rtcp_generate_report(), and ast_rtcp_generate_sdes().
Referenced by ast_rtcp_write(), ast_rtp_read(), rtp_write_rtcp_fir(), and rtp_write_rtcp_psfb().
|
static |
Definition at line 4729 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), AST_RTP_RTCP_FMT_NACK, AST_RTP_RTCP_RTPFB, ast_sockaddr_isnull(), AST_VECTOR_GET_CMP, AST_VECTOR_SIZE, ast_rtp::expectedrxseqno, find_by_value(), put_unaligned_uint32(), SEQNO_CYCLE_OVER, ast_rtp::ssrc, and ast_rtp::themssrc.
Referenced by ast_rtp_read().
|
static |
Definition at line 4491 of file res_rtp_asterisk.c.
References ast_calloc, ast_rtp_get_rate(), ast_rtp_instance_get_data(), ast_sockaddr_isnull(), ast_tvzero(), calculate_lost_packet_statistics(), ast_rtp_rtcp_report_block::dlsr, ast_rtp::f, ast_frame_subclass::format, ast_rtp_rtcp_report_block::fraction, ast_rtp_rtcp_report_block::highest_seq_no, ast_rtp_rtcp_report_block::ia_jitter, ast_rtp::lastrxseqno, ast_rtp::lastts, len(), ast_rtp_rtcp_report_block::lost_count, ast_rtp_rtcp_report_block::lsr, ast_rtp_rtcp_report::ntp_timestamp, NULL, ast_rtp_rtcp_report::octet_count, ast_rtp_rtcp_report::packet_count, ast_rtp_rtcp_report_block::packets, put_unaligned_uint32(), ast_rtp_rtcp_report::reception_report_count, ast_rtp_rtcp_report::report_block, RTCP_PT_RR, RTCP_PT_SR, ast_rtp_rtcp_report::rtp_timestamp, ast_rtp_rtcp_report::sender_information, ast_rtp_rtcp_report_block::source_ssrc, ast_rtp_rtcp_report::ssrc, ast_rtp::ssrc, ast_frame::subclass, ast_rtp::themssrc, ast_rtp::themssrc_valid, timersub(), timeval2ntp(), and ast_rtp_rtcp_report::type.
Referenced by ast_rtcp_generate_compound_prefix().
|
static |
Definition at line 4641 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), ast_sockaddr_isnull(), AST_UUID_STR_LEN, ast_rtp::cname, len(), put_unaligned_uint32(), RTCP_PT_SDES, and ast_rtp_rtcp_report::ssrc.
Referenced by ast_rtcp_generate_compound_prefix().
|
static |
True if we have seen an acceptable SSRC to learn the remote RTCP address
True if the ssrc value we have is valid and not garbage because it doesn't exist.
Always use packet source SSRC to find the rtp instance unless explicitly told not to.
Definition at line 6100 of file res_rtp_asterisk.c.
References ao2_cleanup, ao2_lock, ao2_unlock, ast_calloc, AST_CONTROL_VIDUPDATE, ast_debug, ast_debug_rtcp, ast_debug_rtp_packet_is_allowed, AST_FRAME_CONTROL, AST_FRAME_RTCP, AST_FRIENDLY_OFFSET, ast_json_pack(), ast_json_unref(), ast_null_frame, ast_rtp_instance_get_data(), ast_rtp_instance_get_prop(), ast_rtp_instance_get_test(), AST_RTP_PROPERTY_NAT, AST_RTP_PROPERTY_REMB, ast_rtp_publish_rtcp_message(), AST_RTP_RTCP_FMT_FIR, AST_RTP_RTCP_FMT_NACK, AST_RTP_RTCP_FMT_PLI, AST_RTP_RTCP_FMT_REMB, ast_rtp_rtcp_handle_nack(), ast_rtp_rtcp_received_type(), ast_rtp_rtcp_report_alloc(), AST_RTP_RTCP_RTPFB, ast_sockaddr_cmp(), ast_sockaddr_copy(), ast_sockaddr_stringify(), ast_verbose(), ast_rtp_rtcp_feedback_remb::br_exp, ast_rtp_rtcp_feedback_remb::br_mantissa, ast_frame::data, ast_frame::datalen, ast_frame::delivery, ast_rtp_rtcp_report_block::dlsr, ast_rtp::f, ast_rtp_rtcp_feedback::fmt, ast_rtp_rtcp_report_block::fraction, ast_frame::frametype, ast_rtp_rtcp_report_block::highest_seq_no, ast_rtp_rtcp_report_block::ia_jitter, ast_frame_subclass::integer, ast_rtp_rtcp_report_block::lost_count, ast_rtp_rtcp_report_block::lsr, ast_frame::mallocd, ntp2timeval(), NULL, ast_frame::offset, ast_rtp_rtcp_report_block::packets, ast_frame::ptr, RAII_VAR, ast_rtp_rtcp_feedback::remb, ast_rtp_rtcp_report::report_block, rtcp_debug_test_addr(), RTCP_FB_NACK_BLOCK_WORD_LENGTH, RTCP_FB_REMB_BLOCK_WORD_LENGTH, RTCP_HEADER_SSRC_LENGTH, RTCP_LENGTH_MASK, RTCP_LENGTH_SHIFT, rtcp_payload_subtype2str(), rtcp_payload_type2str(), RTCP_PAYLOAD_TYPE_MASK, RTCP_PAYLOAD_TYPE_SHIFT, RTCP_PT_BYE, RTCP_PT_FUR, RTCP_PT_PSFB, RTCP_PT_RR, RTCP_PT_SDES, RTCP_PT_SR, RTCP_REPORT_COUNT_MASK, RTCP_REPORT_COUNT_SHIFT, RTCP_RR_BLOCK_WORD_LENGTH, RTCP_SR_BLOCK_WORD_LENGTH, RTCP_VALID_MASK, RTCP_VALID_VALUE, RTCP_VERSION_MASK_SHIFTED, RTCP_VERSION_SHIFTED, rtp_find_instance_by_media_source_ssrc(), rtp_find_instance_by_packet_source_ssrc(), ast_frame::samples, ast_rtp_engine_test::sdes_received, ast_rtp_rtcp_report_block::source_ssrc, ast_frame::src, srtp_replay_protection, ast_frame::stream_num, STRICT_RTP_OPEN, ast_frame::subclass, ast_rtp::themssrc, ast_rtp::themssrc_valid, timeval2ntp(), ast_srtp_res::unprotect, update_jitter_stats(), update_lost_stats(), and update_rtt_stats().
Referenced by ast_rtcp_read(), and ast_rtp_read().
|
static |
Definition at line 6590 of file res_rtp_asterisk.c.
References ast_assert, AST_CONTROL_SRCCHANGE, ast_debug_stun, AST_FRAME_CONTROL, AST_FRIENDLY_OFFSET, ast_log, ast_null_frame, ast_rtcp_interpret(), ast_rtp_instance_get_data(), ast_rtp_instance_get_srtp(), ast_sockaddr_copy(), ast_sockaddr_from_sin, ast_sockaddr_ipv4_mapped(), ast_sockaddr_is_ipv4(), ast_sockaddr_stringify(), ast_sockaddr_to_sin, AST_STUN_ACCEPT, ast_stun_handle_packet(), errno, ast_rtp::f, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, NULL, rtcp_recvfrom(), RTP_DTLS_ESTABLISHED, ast_rtp::s, and ast_frame::subclass.
Referenced by ast_rtp_read().
|
static |
Write a RTCP packet to the far end.
Scheduler callback
Definition at line 4814 of file res_rtp_asterisk.c.
References ao2_cleanup, ao2_lock, ao2_ref, ao2_unlock, ast_log, ast_rtcp_calculate_sr_rr_statistics(), ast_rtcp_generate_compound_prefix(), ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, ast_rtp_rtcp_report_alloc(), ast_sockaddr_copy(), ast_sockaddr_stringify(), AST_UUID_STR_LEN, cleanup(), errno, LOG_ERROR, RAII_VAR, rtcp_sendto(), and ast_rtp::themssrc_valid.
Referenced by ast_rtp_interpret(), and rtp_raw_write().
|
static |
Definition at line 8938 of file res_rtp_asterisk.c.
References ao2_bump, ao2_lock, ao2_ref, ao2_unlock, ast_debug_dtls, AST_RTP_DTLS_CONNECTION_EXISTING, ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, AST_RTP_INSTANCE_RTCP_STANDARD, ast_rtp_instance_set_remote_address, AST_VECTOR_APPEND, AST_VECTOR_ELEM_CLEANUP_NOOP, AST_VECTOR_REMOVE_CMP_UNORDERED, rtp_ssrc_mapping::instance, NULL, rtp_allocate_transport(), rtp_deallocate_transport(), rtp_ssrc_mapping::ssrc, ast_rtp::ssrc, SSRC_MAPPING_ELEM_CMP, rtp_ssrc_mapping::ssrc_valid, ast_rtp::themssrc, and ast_rtp::themssrc_valid.
|
static |
Definition at line 4360 of file res_rtp_asterisk.c.
References ast_debug_rtp, ast_random(), ast_rtp_instance_get_data(), ast_rtp_instance_get_srtp(), ast_set_flag, ast_srtp_res::change_source, ast_rtp::expectedrxseqno, FLAG_NEED_MARKER_BIT, ast_rtp::lastts, and ast_rtp::ssrc.
|
static |
Definition at line 4048 of file res_rtp_asterisk.c.
References ao2_cleanup, ao2_lock, ao2_ref, ao2_unlock, ast_data_buffer_free(), ast_free, ast_rtp_instance_get_data(), AST_SCHED_DEL, ast_smoother_free(), AST_VECTOR_ELEM_CLEANUP_NOOP, AST_VECTOR_FREE, AST_VECTOR_REMOVE_CMP_UNORDERED, ast_rtp::f, ast_frame_subclass::format, NULL, rtp_deallocate_transport(), SSRC_MAPPING_ELEM_CMP, and ast_frame::subclass.
|
static |
Definition at line 4134 of file res_rtp_asterisk.c.
References ast_log, ast_rtp_codecs_payload_code_tx(), AST_RTP_DTMF, ast_rtp_instance_get_codecs(), ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_tv(), ast_tvadd(), ast_tvnow(), ast_verbose(), calc_txstamp(), digit, DTMF_SAMPLE_RATE_MS, errno, ast_rtp::lastts, LOG_ERROR, LOG_WARNING, NULL, rtp_debug_test_addr(), rtp_sendto(), and ast_rtp::ssrc.
|
static |
Definition at line 8723 of file res_rtp_asterisk.c.
References ast_channel_tech(), ast_rtp_instance_get_prop(), and AST_RTP_PROPERTY_DTMF.
|
static |
Definition at line 4209 of file res_rtp_asterisk.c.
References ast_log, ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_verbose(), calc_txstamp(), DTMF_SAMPLE_RATE_MS, errno, ast_rtp::lastts, LOG_ERROR, NULL, rtp_debug_test_addr(), rtp_sendto(), and ast_rtp::ssrc.
Referenced by ast_rtp_interpret().
|
static |
Definition at line 4342 of file res_rtp_asterisk.c.
References ast_rtp_dtmf_end_with_duration().
|
static |
Definition at line 4255 of file res_rtp_asterisk.c.
References ast_debug_rtp, ast_log, ast_rtp_get_rate(), ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, ast_smoother_free(), ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_tv(), ast_tvadd(), ast_tvnow(), ast_verbose(), calc_txstamp(), cleanup(), DTMF_SAMPLE_RATE_MS, errno, ast_rtp::f, ast_frame_subclass::format, ast_rtp::lastts, LOG_ERROR, LOG_WARNING, NULL, rtp_debug_test_addr(), rtp_sendto(), ast_rtp::ssrc, and ast_frame::subclass.
Referenced by ast_rtp_dtmf_end().
|
static |
Definition at line 4127 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data().
|
static |
Definition at line 4119 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data().
|
static |
Definition at line 8926 of file res_rtp_asterisk.c.
References AST_RTP_EXTENSION_ABS_SEND_TIME, and AST_RTP_EXTENSION_TRANSPORT_WIDE_CC.
|
static |
Definition at line 8489 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), and ast_rtp::s.
|
static |
Definition at line 8873 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), and ast_rtp::cname.
|
static |
Definition at line 8865 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), and ast_rtp::ssrc.
Referenced by __rtp_find_instance_by_ssrc().
|
static |
Definition at line 8671 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_channel_id(), ast_rtp_instance_get_data(), AST_RTP_INSTANCE_STAT_CHANNEL_UNIQUEID, AST_RTP_INSTANCE_STAT_COMBINED_JITTER, AST_RTP_INSTANCE_STAT_COMBINED_LOSS, AST_RTP_INSTANCE_STAT_COMBINED_RTT, AST_RTP_INSTANCE_STAT_LOCAL_MAXJITTER, AST_RTP_INSTANCE_STAT_LOCAL_MAXRXPLOSS, AST_RTP_INSTANCE_STAT_LOCAL_MINJITTER, AST_RTP_INSTANCE_STAT_LOCAL_MINRXPLOSS, AST_RTP_INSTANCE_STAT_LOCAL_NORMDEVJITTER, AST_RTP_INSTANCE_STAT_LOCAL_NORMDEVRXPLOSS, AST_RTP_INSTANCE_STAT_LOCAL_SSRC, AST_RTP_INSTANCE_STAT_LOCAL_STDEVJITTER, AST_RTP_INSTANCE_STAT_LOCAL_STDEVRXPLOSS, AST_RTP_INSTANCE_STAT_MAX_RTT, AST_RTP_INSTANCE_STAT_MIN_RTT, AST_RTP_INSTANCE_STAT_NORMDEVRTT, AST_RTP_INSTANCE_STAT_REMOTE_MAXJITTER, AST_RTP_INSTANCE_STAT_REMOTE_MAXRXPLOSS, AST_RTP_INSTANCE_STAT_REMOTE_MINJITTER, AST_RTP_INSTANCE_STAT_REMOTE_MINRXPLOSS, AST_RTP_INSTANCE_STAT_REMOTE_NORMDEVJITTER, AST_RTP_INSTANCE_STAT_REMOTE_NORMDEVRXPLOSS, AST_RTP_INSTANCE_STAT_REMOTE_SSRC, AST_RTP_INSTANCE_STAT_REMOTE_STDEVJITTER, AST_RTP_INSTANCE_STAT_REMOTE_STDEVRXPLOSS, AST_RTP_INSTANCE_STAT_RTT, AST_RTP_INSTANCE_STAT_RXCOUNT, AST_RTP_INSTANCE_STAT_RXJITTER, AST_RTP_INSTANCE_STAT_RXOCTETCOUNT, AST_RTP_INSTANCE_STAT_RXPLOSS, AST_RTP_INSTANCE_STAT_STDEVRTT, AST_RTP_INSTANCE_STAT_TXCOUNT, AST_RTP_INSTANCE_STAT_TXJITTER, AST_RTP_INSTANCE_STAT_TXOCTETCOUNT, AST_RTP_INSTANCE_STAT_TXPLOSS, AST_RTP_STAT_SET, AST_RTP_STAT_STRCPY, AST_RTP_STAT_TERMINATOR, ast_rtp_instance_stats::channel_uniqueid, ast_rtp_instance_stats::local_maxjitter, ast_rtp_instance_stats::local_maxrxploss, ast_rtp_instance_stats::local_minjitter, ast_rtp_instance_stats::local_minrxploss, ast_rtp_instance_stats::local_normdevjitter, ast_rtp_instance_stats::local_normdevrxploss, ast_rtp_instance_stats::local_ssrc, ast_rtp_instance_stats::local_stdevjitter, ast_rtp_instance_stats::local_stdevrxploss, ast_rtp_instance_stats::maxrtt, ast_rtp_instance_stats::minrtt, ast_rtp_instance_stats::normdevrtt, ast_rtp_instance_stats::remote_maxjitter, ast_rtp_instance_stats::remote_maxrxploss, ast_rtp_instance_stats::remote_minjitter, ast_rtp_instance_stats::remote_minrxploss, ast_rtp_instance_stats::remote_normdevjitter, ast_rtp_instance_stats::remote_normdevrxploss, ast_rtp_instance_stats::remote_ssrc, ast_rtp_instance_stats::remote_stdevjitter, ast_rtp_instance_stats::remote_stdevrxploss, ast_rtp_instance_stats::rtt, ast_rtp_instance_stats::rxcount, ast_rtp_instance_stats::rxjitter, ast_rtp_instance_stats::rxoctetcount, ast_rtp_instance_stats::rxploss, ast_rtp::ssrc, ast_rtp_instance_stats::stdevrtt, ast_rtp::themssrc, ast_rtp_instance_stats::txcount, ast_rtp_instance_stats::txjitter, ast_rtp_instance_stats::txoctetcount, and ast_rtp_instance_stats::txploss.
|
static |
Definition at line 1239 of file res_rtp_asterisk.c.
References ast_rtp_engine_ice_candidate::address, ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_list, ao2_find, ao2_link, ao2_lock, ao2_ref, ao2_unlock, ast_debug_ice, ast_rtp_ice_candidate_destroy(), AST_RTP_ICE_CANDIDATE_TYPE_HOST, AST_RTP_ICE_CANDIDATE_TYPE_RELAYED, AST_RTP_ICE_CANDIDATE_TYPE_SRFLX, ast_sockaddr_parse(), ast_sockaddr_set_port, ast_sockaddr_stringify(), ast_strdup, ast_strndup, ast_rtp_engine_ice_candidate::foundation, ice_candidate_cmp(), ast_rtp_engine_ice_candidate::id, NULL, OBJ_POINTER, pj_thread_register_check(), ast_rtp_engine_ice_candidate::priority, ice_wrap::real_ice, ast_rtp_engine_ice_candidate::relay_address, status, ast_rtp_engine_ice_candidate::transport, and ast_rtp_engine_ice_candidate::type.
Referenced by ast_rtp_ice_turn_request(), and rtp_add_candidates_to_ice().
|
static |
Definition at line 821 of file res_rtp_asterisk.c.
References ast_rtp_engine_ice_candidate::address, ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_list, ao2_container_count(), ao2_link, ao2_ref, ast_debug_ice, ast_rtp_ice_candidate_destroy(), ast_rtp_instance_get_data(), ast_sockaddr_copy(), ast_strdup, ast_rtp_engine_ice_candidate::foundation, ice_candidate_cmp(), ast_rtp_engine_ice_candidate::id, NULL, ast_rtp_engine_ice_candidate::priority, ast_rtp_engine_ice_candidate::relay_address, ast_rtp_engine_ice_candidate::transport, and ast_rtp_engine_ice_candidate::type.
|
static |
Destructor for locally created ICE candidates.
Definition at line 766 of file res_rtp_asterisk.c.
References ast_free, ast_rtp_engine_ice_candidate::foundation, and ast_rtp_engine_ice_candidate::transport.
Referenced by ast_rtp_ice_add_cand(), and ast_rtp_ice_add_remote_candidate().
|
static |
Definition at line 1734 of file res_rtp_asterisk.c.
References ast_debug_ice, ast_rtp_instance_get_data(), ice_reset_session(), and icesupport.
|
static |
Definition at line 1189 of file res_rtp_asterisk.c.
References ao2_ref, and ast_rtp_instance_get_data().
|
static |
Definition at line 1181 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data().
|
static |
Definition at line 1173 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data().
|
static |
Definition at line 1201 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), and pj_thread_register_check().
|
static |
Definition at line 780 of file res_rtp_asterisk.c.
References ast_copy_string(), ast_rtp_instance_get_data(), ast_strlen_zero, and generate_random_string().
|
static |
Definition at line 1215 of file res_rtp_asterisk.c.
References ast_debug_ice, AST_RTP_ICE_ROLE_CONTROLLED, ast_rtp_instance_get_data(), and pj_thread_register_check().
|
static |
Definition at line 1031 of file res_rtp_asterisk.c.
References ast_rtp_engine_ice_candidate::address, ao2_cleanup, ao2_container_count(), ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_lock, ao2_ref, ao2_unlock, ast_debug_ice, ast_log, AST_RTP_ICE_CANDIDATE_TYPE_HOST, AST_RTP_ICE_CANDIDATE_TYPE_RELAYED, AST_RTP_ICE_CANDIDATE_TYPE_SRFLX, AST_RTP_ICE_COMPONENT_RTCP, AST_RTP_ICE_COMPONENT_RTP, ast_rtp_instance_get_data(), ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_test_suite_event_notify, ast_rtp_engine_ice_candidate::foundation, ice_candidates_compare(), ice_reset_session(), ast_rtp_engine_ice_candidate::id, LOG_NOTICE, LOG_WARNING, NULL, pj2ast_rtp_ice_role(), pj_thread_register_check(), ast_rtp_engine_ice_candidate::priority, ice_wrap::real_ice, ast_rtp_engine_ice_candidate::relay_address, STRICT_RTP_OPEN, timer_heap, and ast_rtp_engine_ice_candidate::type.
|
static |
Definition at line 2581 of file res_rtp_asterisk.c.
References ao2_lock, ao2_unlock, ast_debug_category, AST_DEBUG_CATEGORY_DTLS, AST_DEBUG_CATEGORY_ICE, AST_RTP_ICE_COMPONENT_RTCP, AST_RTP_ICE_COMPONENT_RTP, ast_rtp_instance_get_data(), AST_RTP_INSTANCE_RTCP_STANDARD, ast_rtp_instance_set_prop(), ast_rtp_instance_set_remote_address, AST_RTP_PROPERTY_NAT, ast_sockaddr_isnull(), ast_sockaddr_setnull(), ast_verb, rtp_learning_start(), strictrtp, and update_address_with_ice_candidate().
Referenced by ast_rtp_on_ice_complete(), and ast_rtp_on_valid_pair().
|
static |
Definition at line 891 of file res_rtp_asterisk.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_debug_ice, ast_rtp_instance_get_data(), and NULL.
Referenced by ice_create(), and rtp_deallocate_transport().
|
static |
Definition at line 1577 of file res_rtp_asterisk.c.
References ao2_cleanup, ao2_lock, ao2_object_get_lockaddr(), ao2_ref, ao2_unlock, ast_assert, ast_cond_timedwait, ast_debug_ice, ast_log, ast_rtp_ice_add_cand(), AST_RTP_ICE_COMPONENT_RTCP, AST_RTP_ICE_COMPONENT_RTP, ast_rtp_instance_get_data(), ast_rtp_instance_get_local_address(), ast_rtp_turn_rtcp_sock_cb, ast_rtp_turn_rtp_sock_cb, ast_samp2tv(), ast_sockaddr_copy(), ast_sockaddr_is_ipv4(), ast_sockaddr_parse(), ast_sockaddr_port, ast_sockaddr_set_port, AST_TRANSPORT_TCP, AST_TRANSPORT_UDP, ast_tvadd(), ast_tvnow(), cachingpool, sip_to_pjsip::info(), LOG_WARNING, NULL, PARSE_PORT_FORBID, ice_wrap::real_ice, rtp_ioqueue_thread_get_or_create(), status, stun_software_attribute, TRANSPORT_TURN_RTCP, TRANSPORT_TURN_RTP, and TURN_STATE_WAIT_TIME.
Referenced by rtp_add_candidates_to_ice().
|
static |
Definition at line 7200 of file res_rtp_asterisk.c.
References ao2_cleanup, ao2_ref, ao2_replace, ast_codec_media_type2str(), ast_codec_samples_count(), AST_CONTROL_SRCCHANGE, ast_debug, ast_debug_rtp_packet_is_allowed, ast_format_cache_is_slinear(), ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_get_sample_rate(), ast_format_get_type(), ast_format_t140, ast_format_t140_red, ast_frame_byteswap_be, AST_FRAME_CONTROL, AST_FRAME_DTMF_END, AST_FRAME_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, AST_FRFLAG_HAS_SEQUENCE_NUMBER, AST_FRFLAG_HAS_TIMING_INFO, ast_frfree, AST_FRIENDLY_OFFSET, ast_frisolate, AST_LIST_FIRST, AST_LIST_HEAD_INIT_NOLOCK, AST_LIST_INSERT_TAIL, AST_LIST_REMOVE_HEAD, ast_log, AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_IMAGE, AST_MEDIA_TYPE_TEXT, AST_MEDIA_TYPE_VIDEO, ast_null_frame, ast_rtcp_calc_interval(), ast_rtcp_write(), AST_RTP_CISCO_DTMF, AST_RTP_CN, ast_rtp_codecs_get_payload(), AST_RTP_DTMF, ast_rtp_dtmf_continuation(), ast_rtp_get_rate(), ast_rtp_instance_get_bridged(), ast_rtp_instance_get_codecs(), ast_rtp_instance_get_data(), ast_samp2tv(), ast_sched_add(), ast_set_flag, ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_tv(), ast_tvdiff_ms(), bridge_p2p_rtp_write(), calc_rxstamp(), create_dtmf_frame(), ast_frame::data, ast_frame::datalen, DEBUG_ATLEAST, ast_frame::delivery, ext, ast_rtp::f, ast_frame_subclass::format, ast_frame_subclass::frame_ending, ast_frame::frametype, ast_rtp::lastitexttimestamp, ast_rtp::lastividtimestamp, ast_frame::len, len(), LOG_DEBUG, LOG_NOTICE, LOG_WARNING, ast_frame::mallocd, NULL, ast_frame::offset, process_cn_rfc3389(), process_dtmf_cisco(), process_dtmf_rfc2833(), ast_frame::ptr, RAII_VAR, rtp_instance_parse_extmap_extensions(), RTP_SEQ_MOD, ast_frame::samples, ast_frame::seqno, ast_frame::src, srtp_replay_protection, ast_frame::stream_num, ast_frame::subclass, ast_rtp::themssrc, ast_rtp::themssrc_valid, ast_frame::ts, and ast_srtp_res::unprotect.
Referenced by ast_rtp_read().
|
static |
Definition at line 8643 of file res_rtp_asterisk.c.
References ao2_lock, ao2_unlock, ast_rtp_instance_get_data(), ast_set_flag, ast_smoother_free(), FLAG_NEED_MARKER_BIT, FLAG_REQ_LOCAL_BRIDGE_BIT, NULL, ast_rtp::ssrc, ast_rtp::ssrc_orig, and ast_rtp::ssrc_saved.
|
static |
Definition at line 3992 of file res_rtp_asterisk.c.
References ao2_bump, ast_calloc, ast_format_none, ast_random(), ast_rtp_instance_set_data(), ast_sockaddr_copy(), ast_uuid_generate_str(), AST_VECTOR_INIT, ast_rtp::cname, ast_rtp::expectedrxseqno, ast_rtp::f, ast_frame_subclass::format, NULL, rtp_allocate_transport(), sched, ast_rtp::ssrc, and ast_frame::subclass.
|
static |
Definition at line 2656 of file res_rtp_asterisk.c.
References ast_debug_ice, and ast_rtp_ice_start_media().
|
static |
Definition at line 2663 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), TRANSPORT_SOCKET_RTCP, TRANSPORT_SOCKET_RTP, TRANSPORT_TURN_RTCP, and TRANSPORT_TURN_RTP.
|
static |
Definition at line 2680 of file res_rtp_asterisk.c.
References ast_assert, ast_rtp_instance_get_data(), ast_rtp::s, status, TRANSPORT_SOCKET_RTCP, TRANSPORT_SOCKET_RTP, TRANSPORT_TURN_RTCP, and TRANSPORT_TURN_RTP.
|
static |
Definition at line 1421 of file res_rtp_asterisk.c.
References ao2_lock, ao2_unlock, ast_cond_signal, ast_rtp_instance_get_data(), and NULL.
|
static |
Definition at line 1355 of file res_rtp_asterisk.c.
References ao2_lock, ao2_unlock, ast_cond_signal, ast_rtp_instance_get_data(), and NULL.
|
static |
Definition at line 1388 of file res_rtp_asterisk.c.
References ao2_bump, ao2_lock, ao2_ref, ao2_unlock, ast_log, AST_RTP_ICE_COMPONENT_RTCP, ast_rtp_instance_get_data(), ast_sendto(), LOG_WARNING, ice_wrap::real_ice, ast_rtp::s, status, and TRANSPORT_TURN_RTCP.
|
static |
Definition at line 1322 of file res_rtp_asterisk.c.
References ao2_bump, ao2_lock, ao2_ref, ao2_unlock, ast_log, AST_RTP_ICE_COMPONENT_RTP, ast_rtp_instance_get_data(), ast_sendto(), LOG_WARNING, ice_wrap::real_ice, ast_rtp::s, status, and TRANSPORT_TURN_RTP.
|
static |
Definition at line 2648 of file res_rtp_asterisk.c.
References ast_debug_ice, and ast_rtp_ice_start_media().
|
static |
Definition at line 8303 of file res_rtp_asterisk.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_bind(), ast_calloc, ast_data_buffer_alloc(), ast_data_buffer_free(), ast_debug_rtcp, ast_find_ourip(), ast_free, ast_free_ptr(), AST_RTP_ICE_COMPONENT_RTCP, ast_rtp_instance_get_data(), ast_rtp_instance_get_local_address(), ast_rtp_instance_get_remote_address, AST_RTP_INSTANCE_RTCP_STANDARD, AST_RTP_PROPERTY_ASYMMETRIC_CODEC, AST_RTP_PROPERTY_RETRANS_RECV, AST_RTP_PROPERTY_RETRANS_SEND, AST_RTP_PROPERTY_RTCP, ast_sched_del(), ast_sockaddr_copy(), ast_sockaddr_is_ipv4(), ast_sockaddr_is_ipv6(), ast_sockaddr_port, ast_sockaddr_set_port, ast_sockaddr_stringify(), ast_strdup, AST_VECTOR_FREE, AST_VECTOR_INIT, create_new_socket(), DEFAULT_RTP_RECV_BUFFER_SIZE, DEFAULT_RTP_SEND_BUFFER_SIZE, NULL, rtp_add_candidates_to_ice(), ast_rtp::s, TRANSPORT_SOCKET_RTCP, and value.
|
static |
Definition at line 8804 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), ast_set_qos(), and ast_rtp::s.
|
static |
Definition at line 7638 of file res_rtp_asterisk.c.
References ao2_cleanup, ao2_lock, ast_assert, ast_codec_media_type2str(), AST_CONTROL_SRCCHANGE, ast_data_buffer_count(), ast_data_buffer_get(), ast_data_buffer_max(), ast_data_buffer_put(), ast_data_buffer_remove(), ast_data_buffer_resize(), ast_debug, ast_debug_rtcp, ast_debug_rtp, ast_debug_rtp_packet_is_allowed, ast_debug_stun, AST_FRAME_CONTROL, ast_frame_free(), ast_frdup, ast_free, ast_free_ptr(), AST_FRIENDLY_OFFSET, AST_LIST_FIRST, AST_LIST_HEAD_INIT_NOLOCK, AST_LIST_INSERT_TAIL, ast_log, ast_malloc, AST_MEDIA_TYPE_UNKNOWN, AST_MEDIA_TYPE_VIDEO, ast_null_frame, ast_rtcp_calculate_sr_rr_statistics(), ast_rtcp_generate_compound_prefix(), ast_rtcp_generate_nack(), ast_rtcp_interpret(), ast_rtcp_read(), ast_rtp_codecs_get_stream_type(), ast_rtp_instance_get_codecs(), ast_rtp_instance_get_data(), ast_rtp_instance_get_prop(), ast_rtp_instance_get_remote_address, ast_rtp_instance_get_requested_target_address(), ast_rtp_instance_get_srtp(), AST_RTP_INSTANCE_RTCP_STANDARD, ast_rtp_instance_set_incoming_source_address(), ast_rtp_instance_set_remote_address, ast_rtp_interpret(), AST_RTP_PROPERTY_NAT, ast_rtp_rtcp_report_alloc(), ast_set_flag, ast_sockaddr_cmp(), ast_sockaddr_copy(), ast_sockaddr_from_sin, ast_sockaddr_ipv4_mapped(), ast_sockaddr_is_ipv4(), ast_sockaddr_isnull(), ast_sockaddr_port, ast_sockaddr_set_port, ast_sockaddr_stringify(), ast_sockaddr_to_sin, AST_STUN_ACCEPT, ast_stun_handle_packet(), ast_test_suite_event_notify, ast_tvdiff_ms(), ast_tvnow(), AST_UUID_STR_LEN, AST_VECTOR_ADD_SORTED, AST_VECTOR_ELEM_CLEANUP_NOOP, AST_VECTOR_GET_CMP, AST_VECTOR_REMOVE_CMP_ORDERED, AST_VECTOR_RESET, AST_VECTOR_SIZE, ast_verb, ast_verbose(), ast_rtp_rtcp_nack_payload::buf, codecs, compare_by_value(), errno, ast_rtp::expectedrxseqno, ast_rtp::f, find_by_value(), FLAG_NAT_ACTIVE, ast_frame::frametype, ast_frame_subclass::integer, ast_rtp::lastividtimestamp, ast_rtp::lastrxseqno, LOG_WARNING, MAXIMUM_RTP_RECV_BUFFER_SIZE, MIN, MISSING_SEQNOS_ADDED_TRIGGER, NULL, OLD_PACKET_COUNT, RAII_VAR, ast_rtp::rawdata, rtcp_mux(), rtcp_sendto(), rtp_debug_test_addr(), RTP_DTLS_ESTABLISHED, rtp_find_instance_by_packet_source_ssrc(), rtp_instance_unlock(), rtp_learning_rtp_seq_update(), rtp_learning_seq_init(), rtp_recvfrom(), rtp_write_rtcp_fir(), ast_rtp::s, ast_frame::seqno, SEQNO_CYCLE_OVER, should_drop_packets(), ast_rtp_rtcp_nack_payload::size, STRICT_RTP_CLOSED, STRICT_RTP_LEARN, STRICT_RTP_LEARN_TIMEOUT, STRICT_RTP_OPEN, ast_frame::subclass, ast_rtp::themssrc_valid, and version.
|
static |
Definition at line 8497 of file res_rtp_asterisk.c.
References ast_debug_rtcp, ast_free, ast_ouraddrfor(), ast_rtp_instance_get_data(), ast_rtp_instance_get_local_address(), AST_RTP_INSTANCE_RTCP_STANDARD, ast_rtp_instance_set_local_address(), ast_rtp_instance_set_remote_address, ast_sockaddr_cmp(), ast_sockaddr_copy(), ast_sockaddr_isnull(), ast_sockaddr_port, ast_sockaddr_set_port, ast_sockaddr_stringify(), ast_strdup, AST_VECTOR_GET_ADDR, AST_VECTOR_SIZE, ast_verb, rtp_ssrc_mapping::instance, rtp_learning_start(), STRICT_RTP_OPEN, and strictrtp.
|
static |
Definition at line 5963 of file res_rtp_asterisk.c.
References ast_data_buffer_get(), ast_data_buffer_max(), ast_data_buffer_resize(), ast_debug_rtcp, AST_RTP_EXTENSION_ABS_SEND_TIME, ast_rtp_instance_extmap_get_id(), ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, ast_tvnow(), ast_rtp_rtcp_nack_payload::buf, MAXIMUM_RTP_SEND_BUFFER_SIZE, MIN, put_unaligned_time24(), rtp_sendto(), ast_rtp_rtcp_nack_payload::size, and timeval2ntp().
Referenced by ast_rtcp_interpret().
|
static |
generate comfort noice (CNG)
Definition at line 8816 of file res_rtp_asterisk.c.
References ast_log, AST_RTP_CN, ast_rtp_codecs_payload_code_tx(), ast_rtp_instance_get_codecs(), ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_tv(), ast_tvadd(), ast_tvnow(), ast_verbose(), errno, ast_rtp::lastts, LOG_ERROR, NULL, rtp_debug_test_addr(), rtp_sendto(), and ast_rtp::ssrc.
|
static |
Definition at line 8881 of file res_rtp_asterisk.c.
References ao2_lock, ao2_unlock, ast_rtp_instance_get_data(), AST_VECTOR_GET_ADDR, AST_VECTOR_SIZE, rtp_ssrc_mapping::instance, rtp_ssrc_mapping::ssrc, ast_rtp::ssrc, rtp_ssrc_mapping::ssrc_valid, ast_rtp::themssrc, and ast_rtp::themssrc_valid.
|
static |
Definition at line 8919 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data().
|
static |
Definition at line 8755 of file res_rtp_asterisk.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_free, ast_rtp_instance_get_data(), ast_rtp_instance_set_remote_address, AST_SCHED_DEL, ast_sched_del(), AST_SCHED_DEL_UNREF, ast_set_flag, FLAG_NEED_MARKER_BIT, and NULL.
|
static |
Definition at line 8740 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), ast_sockaddr_from_sin, ast_sockaddr_to_sin, ast_stun_request(), NULL, and ast_rtp::s.
|
static |
Definition at line 4348 of file res_rtp_asterisk.c.
References ast_debug_rtp, ast_rtp_instance_get_data(), ast_set_flag, and FLAG_NEED_MARKER_BIT.
|
static |
Definition at line 5289 of file res_rtp_asterisk.c.
References ao2_replace, AST_CONTROL_VIDUPDATE, ast_debug_rtp, ast_format_can_be_smoothed(), ast_format_cmp(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_default_ms(), ast_format_get_minimum_bytes(), ast_format_get_minimum_ms(), ast_format_get_name(), ast_format_get_smoother_flags(), AST_FRAME_CONTROL, AST_FRAME_RTCP, AST_FRAME_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frdup, ast_frfree, ast_log, ast_rtp_codecs_get_framing(), ast_rtp_codecs_payload_code_tx(), ast_rtp_instance_get_codecs(), ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, AST_RTP_RTCP_PSFB, ast_smoother_feed, ast_smoother_feed_be, AST_SMOOTHER_FLAG_BE, AST_SMOOTHER_FLAG_FORCED, ast_smoother_free(), ast_smoother_new(), ast_smoother_read(), ast_smoother_set_flags(), ast_smoother_test_flag(), ast_sockaddr_isnull(), ast_format::codec, ast_frame::data, ast_frame::datalen, format, ast_frame_subclass::format, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, NULL, ast_frame::offset, ast_frame::ptr, red_t140_to_red(), rtp_raw_write(), rtp_write_rtcp_fir(), rtp_write_rtcp_psfb(), and ast_frame::subclass.
Referenced by red_write(), and rtp_red_buffer().
|
static |
Definition at line 6649 of file res_rtp_asterisk.c.
References ao2_cleanup, ao2_lock, ao2_replace, ao2_unlock, ast_clear_flag, ast_debug_rtp, ast_debug_rtp_packet_is_allowed, ast_format_cmp(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), ast_format_none, ast_log, ast_rtp_codecs_find_payload_code(), ast_rtp_codecs_get_payload(), ast_rtp_codecs_payload_code_tx(), ast_rtp_instance_get_codecs(), ast_rtp_instance_get_data(), ast_rtp_instance_get_prop(), ast_rtp_instance_get_remote_address, AST_RTP_PROPERTY_NAT, ast_set_flag, ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_test_flag, ast_verbose(), DEBUG_ATLEAST, errno, FLAG_NAT_ACTIVE, FLAG_NAT_INACTIVE, FLAG_NAT_INACTIVE_NOWARN, FLAG_NEED_MARKER_BIT, FLAG_REQ_LOCAL_BRIDGE_BIT, LOG_WARNING, NULL, RAII_VAR, reconstruct(), rtp_debug_test_addr(), rtp_sendto(), and ast_rtp::ssrc.
Referenced by ast_rtp_interpret().
|
static |
Definition at line 3332 of file res_rtp_asterisk.c.
References ast_rtp_ioqueue_thread::count.
Referenced by calc_rxstamp(), calculate_lost_packet_statistics(), update_jitter_stats(), update_lost_stats(), and update_rtt_stats().
|
static |
Definition at line 5413 of file res_rtp_asterisk.c.
References ast_rtp_get_rate(), ast_samp2tv(), ast_tvadd(), ast_tvsub(), calc_mean_and_standard_deviation(), d, ast_rtp::f, ast_frame_subclass::format, NULL, and ast_frame::subclass.
Referenced by ast_rtp_interpret().
|
static |
Definition at line 3716 of file res_rtp_asterisk.c.
References ast_tvdiff_ms(), ast_tvnow(), and ast_tvzero().
Referenced by ast_rtp_dtmf_begin(), ast_rtp_dtmf_continuation(), ast_rtp_dtmf_end_with_duration(), and rtp_raw_write().
|
static |
Definition at line 4428 of file res_rtp_asterisk.c.
References calc_mean_and_standard_deviation(), and ast_rtp::lastrxseqno.
Referenced by ast_rtcp_generate_report().
|
static |
Helper function to compare an elem in a vector by value.
Definition at line 3039 of file res_rtp_asterisk.c.
References value.
Referenced by ast_rtp_read().
|
static |
Definition at line 5463 of file res_rtp_asterisk.c.
References AST_CONTROL_FLASH, ast_debug_rtp, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_LIST_NEXT, ast_null_frame, ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, ast_sockaddr_stringify(), ast_tvcmp(), ast_tvnow(), ast_frame::datalen, ast_rtp::f, ast_frame::frametype, ast_frame_subclass::integer, ast_frame::mallocd, NULL, ast_frame::samples, ast_frame::src, ast_frame::subclass, and type.
Referenced by ast_rtp_interpret(), process_dtmf_cisco(), and process_dtmf_rfc2833().
|
static |
Definition at line 3360 of file res_rtp_asterisk.c.
References ast_log, ast_socket_nonblock, errno, and LOG_WARNING.
Referenced by ast_rtp_prop_set(), and rtp_allocate_transport().
|
static |
Definition at line 7553 of file res_rtp_asterisk.c.
References ast_random(), ast_time_create_by_unit(), ast_time_tv_to_usec(), ast_tvadd(), drop_packets_data, rtp_drop_packets_data::interval, rtp_drop_packets_data::next, rtp_drop_packets_data::num_dropped, rtp_drop_packets_data::num_to_drop, TIME_UNIT_MICROSECOND, rtp_drop_packets_data::use_random_interval, and rtp_drop_packets_data::use_random_num.
Referenced by handle_cli_rtp_drop_incoming_packets(), and should_drop_packets().
|
static |
Helper function to find an elem in a vector by value.
Definition at line 3045 of file res_rtp_asterisk.c.
References value.
Referenced by ast_rtcp_generate_nack(), and ast_rtp_read().
|
static |
Definition at line 1720 of file res_rtp_asterisk.c.
References ast_random(), and buf.
Referenced by ast_rtp_ice_set_authentication(), and rtp_allocate_transport().
|
static |
Definition at line 2430 of file res_rtp_asterisk.c.
References ast_data_buffer_count(), and ast_rtp_instance_get_data().
|
static |
Definition at line 2441 of file res_rtp_asterisk.c.
References ast_data_buffer_max(), and ast_rtp_instance_get_data().
|
static |
Definition at line 2452 of file res_rtp_asterisk.c.
References ast_data_buffer_count(), and ast_rtp_instance_get_data().
|
static |
Definition at line 9145 of file res_rtp_asterisk.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli_args::argv, ast_cli(), ast_debug_category_set_sublevel(), AST_LOG_CATEGORY_DISABLED, AST_LOG_CATEGORY_ENABLED, AST_LOG_CATEGORY_RTCP_PACKET, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, NULL, rtcp_do_debug_ip(), rtcpdebugaddr, and ast_cli_entry::usage.
|
static |
Definition at line 9178 of file res_rtp_asterisk.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, NULL, rtcpstats, and ast_cli_entry::usage.
|
static |
Definition at line 9213 of file res_rtp_asterisk.c.
References rtp_drop_packets_data::addr, ast_cli_args::argc, ast_cli_args::argv, ast_cli(), ast_cli_complete(), ast_cli_completion_add(), ast_sockaddr_copy(), ast_sockaddr_parse(), ast_sockaddr_port, ast_str_to_uint(), ast_strdup, ast_time_create_by_unit_str(), ast_tvnow(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, drop_packets_data, drop_packets_data_update(), ast_cli_args::fd, rtp_drop_packets_data::interval, ast_cli_args::n, NULL, rtp_drop_packets_data::num_to_drop, rtp_drop_packets_data::port, ast_cli_args::pos, ast_cli_entry::usage, use_random(), rtp_drop_packets_data::use_random_interval, rtp_drop_packets_data::use_random_num, and ast_cli_args::word.
|
static |
Definition at line 9072 of file res_rtp_asterisk.c.
References ast_cli_args::argc, ast_cli_entry::args, ast_cli_args::argv, ast_cli(), ast_debug_category_set_sublevel(), AST_LOG_CATEGORY_DISABLED, AST_LOG_CATEGORY_ENABLED, AST_LOG_CATEGORY_RTP_PACKET, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, NULL, rtp_do_debug_ip(), rtpdebugaddr, and ast_cli_entry::usage.
|
static |
Definition at line 9106 of file res_rtp_asterisk.c.
References ast_cli_args::argc, ast_cli(), AST_CLI_YESNO, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, dtmftimeout, ast_cli_args::fd, icesupport, learning_min_sequential, NULL, rtpend, rtpstart, srtp_replay_protection, strictrtp, and ast_cli_entry::usage.
|
static |
Helper function which clears the ICE host candidate mapping.
Definition at line 735 of file res_rtp_asterisk.c.
References ast_free, AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, and ast_rtp_ioqueue_thread::next.
Referenced by rtp_reload(), and unload_module().
|
static |
Definition at line 806 of file res_rtp_asterisk.c.
References ast_rtp_engine_ice_candidate::address, ast_sockaddr_cmp(), CMP_MATCH, CMP_STOP, ast_rtp_engine_ice_candidate::foundation, ast_rtp_engine_ice_candidate::id, and ast_rtp_engine_ice_candidate::type.
Referenced by ast_rtp_ice_add_cand(), and ast_rtp_ice_add_remote_candidate().
|
static |
Definition at line 1003 of file res_rtp_asterisk.c.
References ao2_container_count(), ao2_find, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, and OBJ_POINTER.
Referenced by ast_rtp_ice_start().
|
static |
Definition at line 3750 of file res_rtp_asterisk.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_cleanup, ao2_lock, ao2_ref, ao2_unlock, ast_debug_ice, AST_RTP_ICE_COMPONENT_RTCP, AST_RTP_ICE_COMPONENT_RTP, ast_rtp_ice_stop(), ast_rtp_instance_get_data(), ast_sockaddr_port, cachingpool, ice_wrap_dtor(), NULL, pj_thread_register_check(), ice_wrap::real_ice, rtp_add_candidates_to_ice(), status, stun_software_attribute, timer_heap, TRANSPORT_SOCKET_RTCP, and TRANSPORT_SOCKET_RTP.
Referenced by ice_reset_session(), pj_thread_register_check(), and rtp_allocate_transport().
|
static |
Definition at line 959 of file res_rtp_asterisk.c.
References ao2_lock, ao2_object_get_lockaddr(), ao2_unlock, ast2pj_rtp_ice_role(), ast_cond_timedwait, ast_debug_ice, ast_rtp_instance_get_data(), ast_samp2tv(), ast_sockaddr_stringify(), ast_tvadd(), ast_tvnow(), ice_create(), and TURN_STATE_WAIT_TIME.
Referenced by ast_rtp_ice_change_components(), and ast_rtp_ice_start().
|
static |
ao2 ICE wrapper object destructor.
vdoomed | Object being destroyed. |
Definition at line 916 of file res_rtp_asterisk.c.
References pj_thread_register_check(), and ice_wrap::real_ice.
Referenced by ice_create().
|
static |
Worker thread for ioqueue and timerheap.
Definition at line 1454 of file res_rtp_asterisk.c.
References ast_rtp_ioqueue_thread::ioqueue, NULL, ast_rtp_ioqueue_thread::terminate, and ast_rtp_ioqueue_thread::timerheap.
Referenced by rtp_ioqueue_thread_get_or_create().
|
static |
Definition at line 9624 of file res_rtp_asterisk.c.
References ARRAY_LEN, ast_cli_register_multiple, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_pjproject_caching_pool_init(), AST_PJPROJECT_INIT_LOG_LEVEL, ast_rtp_engine_register, ast_rtp_engine_unregister(), ast_sockaddr_parse(), cachingpool, lock, NULL, PARSE_PORT_IGNORE, ast_rtp_ioqueue_thread::pool, rtp_reload(), rtp_terminate_pjproject(), timer_heap, timer_thread, and timer_worker_thread().
Referenced by unload_module().
|
static |
Definition at line 4421 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret().
|
static |
Definition at line 939 of file res_rtp_asterisk.c.
References ast_assert, AST_RTP_ICE_ROLE_CONTROLLED, and AST_RTP_ICE_ROLE_CONTROLLING.
Referenced by ast_rtp_ice_start().
|
static |
Function used to check if the calling thread is registered with pjlib. If it is not it will be registered.
Definition at line 865 of file res_rtp_asterisk.c.
References ast_log, ast_threadstorage_get(), desc, ice_create(), LOG_ERROR, pj_thread_storage, replace(), and ast_rtp_ioqueue_thread::thread.
Referenced by __rtp_recvfrom(), __rtp_sendto(), ast_rtp_ice_add_cand(), ast_rtp_ice_lite(), ast_rtp_ice_set_role(), ast_rtp_ice_start(), ice_create(), ice_wrap_dtor(), rtp_deallocate_transport(), rtp_terminate_pjproject(), and unload_module().
|
static |
Definition at line 5724 of file res_rtp_asterisk.c.
References ast_debug, ast_debug_rtp_packet_is_allowed, ast_format_get_name(), AST_FRAME_CNG, AST_FRIENDLY_OFFSET, ast_log, ast_rtp_instance_get_data(), ast_rtp_instance_get_remote_address, ast_set_flag, ast_sockaddr_stringify(), ast_test_flag, ast_frame::data, ast_frame::datalen, ast_frame::delivery, ast_rtp::f, FLAG_3389_WARNING, ast_frame::frametype, ast_frame_subclass::integer, LOG_NOTICE, NULL, ast_frame::offset, ast_frame::ptr, ast_rtp::rawdata, ast_frame::samples, and ast_frame::subclass.
Referenced by ast_rtp_interpret().
|
static |
Definition at line 5644 of file res_rtp_asterisk.c.
References ast_debug, ast_debug_rtp_packet_is_allowed, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, ast_rtp_get_rate(), ast_rtp_instance_get_data(), ast_rtp_instance_get_prop(), AST_RTP_PROPERTY_DTMF_COMPENSATE, create_dtmf_frame(), NULL, ast_frame::samples, and seq.
Referenced by ast_rtp_interpret().
|
static |
Definition at line 5506 of file res_rtp_asterisk.c.
References ast_debug, ast_debug_rtp, ast_debug_rtp_packet_is_allowed, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, ast_frdup, AST_LIST_INSERT_TAIL, ast_rtp_get_rate(), ast_rtp_instance_get_data(), ast_rtp_instance_get_prop(), ast_rtp_instance_get_remote_address, AST_RTP_PROPERTY_DTMF_COMPENSATE, ast_samp2tv(), ast_sockaddr_stringify(), ast_tv(), ast_tvdiff_ms(), ast_verbose(), create_dtmf_frame(), dtmftimeout, ast_frame_subclass::format, ast_frame::len, NULL, rtp_debug_test_addr(), ast_frame::samples, ast_frame::seqno, and ast_frame::subclass.
Referenced by ast_rtp_interpret().
|
static |
Definition at line 4876 of file res_rtp_asterisk.c.
Referenced by ast_rtp_rtcp_handle_nack(), rtp_raw_write(), and rtp_transport_wide_cc_feedback_produce().
Definition at line 5120 of file res_rtp_asterisk.c.
References ast_frame::data, ast_frame::datalen, rtp_red::hdrlen, rtp_red::len, NULL, rtp_red::num_gen, ast_frame::ptr, rtp_red::t140, and rtp_red::t140red.
Referenced by ast_rtp_write().
|
static |
Write t140 redundacy frame.
data | primary data to be buffered |
Scheduler callback
Definition at line 8560 of file res_rtp_asterisk.c.
References ao2_lock, ao2_unlock, ast_rtp_instance_get_data(), and ast_rtp_write().
Referenced by rtp_red_init().
|
static |
Definition at line 9592 of file res_rtp_asterisk.c.
References rtp_reload().
Referenced by unload_module().
|
inlinestatic |
Definition at line 2762 of file res_rtp_asterisk.c.
References ast_srtp_policy_res::alloc, ao2_lock, ao2_ref, ao2_unlock, ast_assert, ast_debug_dtls, ast_debug_rtcp_packet_is_allowed, ast_log, AST_RTP_DTLS_HASH_SHA1, AST_RTP_DTLS_HASH_SHA256, AST_RTP_DTLS_SETUP_ACTIVE, AST_RTP_DTLS_VERIFY_FINGERPRINT, ast_rtp_instance_add_srtp_policy(), ast_rtp_instance_get_data(), ast_rtp_instance_get_ssrc(), ast_sched_add(), AST_SCHED_DEL_UNREF, ast_sockaddr_cmp(), ast_sockaddr_cmp_addr(), ast_sockaddr_isnull(), AST_VECTOR_GET_ADDR, AST_VECTOR_SIZE, ast_srtp_policy_res::destroy, error(), rtp_ssrc_mapping::instance, LOG_ERROR, LOG_WARNING, NULL, rtcpdebugaddr, rtcpdebugport, ast_srtp_policy_res::set_master_key, ast_srtp_policy_res::set_ssrc, ast_srtp_policy_res::set_suite, SRTP_MASTER_KEY_LEN, SRTP_MASTER_LEN, SRTP_MASTER_SALT_LEN, ast_rtp::ssrc, timeout, and type.
Referenced by ast_rtcp_calculate_sr_rr_statistics(), and ast_rtcp_interpret().
|
static |
Definition at line 9055 of file res_rtp_asterisk.c.
References ast_cli_args::argv, ast_cli(), ast_debug_category_set_sublevel(), AST_LOG_CATEGORY_ENABLED, AST_LOG_CATEGORY_RTCP_PACKET, ast_sockaddr_parse(), ast_sockaddr_split_hostport(), ast_sockaddr_stringify(), ast_strdupa, ast_strlen_zero, CLI_FAILURE, CLI_SUCCESS, ast_cli_args::fd, NULL, rtcpdebugaddr, and rtcpdebugport.
Referenced by handle_cli_rtcp_set_debug().
|
static |
Definition at line 3050 of file res_rtp_asterisk.c.
References AST_RTP_INSTANCE_RTCP_MUX, and version.
Referenced by ast_rtp_read().
|
static |
Definition at line 5942 of file res_rtp_asterisk.c.
References AST_RTP_RTCP_FMT_NACK, AST_RTP_RTCP_FMT_REMB, AST_RTP_RTCP_RTPFB, NULL, and RTCP_PT_PSFB.
Referenced by ast_rtcp_interpret().
|
static |
Definition at line 5910 of file res_rtp_asterisk.c.
References RTCP_PT_BYE, RTCP_PT_FUR, RTCP_PT_PSFB, RTCP_PT_RR, RTCP_PT_SDES, RTCP_PT_SR, and str.
Referenced by ast_rtcp_interpret().
|
static |
Definition at line 3235 of file res_rtp_asterisk.c.
References __rtp_recvfrom().
Referenced by ast_rtcp_read().
|
static |
Definition at line 3303 of file res_rtp_asterisk.c.
References __rtp_sendto().
Referenced by ast_rtcp_write(), ast_rtp_read(), rtp_transport_wide_cc_feedback_produce(), rtp_write_rtcp_fir(), and rtp_write_rtcp_psfb().
|
static |
Definition at line 3522 of file res_rtp_asterisk.c.
References ast_rtp_engine_ice_candidate::address, ast_ice_host_candidate::advertised, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_lock, ao2_ref, ao2_unlock, ast_debug_category, AST_DEBUG_CATEGORY_ICE, AST_DEBUG_CATEGORY_STUN, ast_debug_ice, ast_inet_ntoa(), AST_LIST_TRAVERSE, ast_log, ast_rtp_ice_add_cand(), AST_RTP_ICE_COMPONENT_RTCP, AST_RTP_ICE_COMPONENT_RTP, ast_rtp_ice_turn_request(), AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_sockaddr_cmp(), ast_sockaddr_cmp_addr(), ast_sockaddr_from_sockaddr, ast_sockaddr_is_any(), ast_sockaddr_is_ipv4(), ast_sockaddr_isnull(), ast_sockaddr_setnull(), ast_sockaddr_to_pj_sockaddr(), ast_strdupa, ast_stun_request(), AST_TRANSPORT_TCP, AST_TRANSPORT_UDP, ast_rtp_ioqueue_thread::count, errno, ext, if(), ast_ice_host_candidate::include_local, ast_ice_host_candidate::local, LOG_ERROR, ast_rtp_ioqueue_thread::next, NULL, rtp_address_is_ice_blacklisted(), ast_rtp::s, stun_address_is_blacklisted(), stunaddr, turnaddr, turnpassword, turnport, and turnusername.
Referenced by ast_rtp_prop_set(), and ice_create().
|
static |
Definition at line 3487 of file res_rtp_asterisk.c.
References ast_apply_acl_nolog(), ast_rwlock_rdlock, ast_rwlock_unlock, AST_SENSE_DENY, and result.
Referenced by rtp_add_candidates_to_ice().
|
static |
Definition at line 3828 of file res_rtp_asterisk.c.
References ast_bind(), ast_cond_init, ast_debug_ice, ast_debug_rtp, ast_log, ast_random(), ast_rtp_instance_set_local_address(), ast_sockaddr_copy(), ast_sockaddr_is_ipv4(), ast_sockaddr_is_ipv6(), ast_sockaddr_set_port, ast_sockaddr_stringify(), ast_test_suite_event_notify, create_new_socket(), errno, generate_random_string(), ice_create(), icesupport, LOG_ERROR, LOG_NOTICE, LOG_WARNING, NULL, rtpend, rtpstart, ast_rtp::s, STRICT_RTP_CLOSED, STRICT_RTP_OPEN, and strictrtp.
Referenced by ast_rtp_bundle(), and ast_rtp_new().
|
static |
Definition at line 3901 of file res_rtp_asterisk.c.
References ao2_lock, ao2_object_get_lockaddr(), ao2_ref, ao2_unlock, ast_cond_timedwait, ast_debug_ice, ast_rtp_ice_stop(), ast_samp2tv(), ast_tvadd(), ast_tvnow(), NULL, pj_thread_register_check(), rtp_ioqueue_thread_remove(), ast_rtp::s, and TURN_STATE_WAIT_TIME.
Referenced by ast_rtp_bundle(), and ast_rtp_destroy().
|
inlinestatic |
Definition at line 2746 of file res_rtp_asterisk.c.
References ast_debug_rtp_packet_is_allowed, ast_sockaddr_cmp(), ast_sockaddr_cmp_addr(), ast_sockaddr_isnull(), rtpdebugaddr, and rtpdebugport.
Referenced by ast_rtp_dtmf_begin(), ast_rtp_dtmf_continuation(), ast_rtp_dtmf_end_with_duration(), ast_rtp_read(), ast_rtp_sendcng(), bridge_p2p_rtp_write(), process_dtmf_rfc2833(), and rtp_raw_write().
|
static |
Definition at line 9038 of file res_rtp_asterisk.c.
References ast_cli_args::argv, ast_cli(), ast_debug_category_set_sublevel(), AST_LOG_CATEGORY_ENABLED, AST_LOG_CATEGORY_RTP_PACKET, ast_sockaddr_parse(), ast_sockaddr_split_hostport(), ast_sockaddr_stringify(), ast_strdupa, ast_strlen_zero, CLI_FAILURE, CLI_SUCCESS, ast_cli_args::fd, NULL, rtpdebugaddr, and rtpdebugport.
Referenced by handle_cli_rtp_set_debug().
|
static |
Definition at line 5904 of file res_rtp_asterisk.c.
References __rtp_find_instance_by_ssrc().
Referenced by ast_rtcp_interpret().
|
static |
Definition at line 5897 of file res_rtp_asterisk.c.
References __rtp_find_instance_by_ssrc().
Referenced by ast_rtcp_interpret(), and ast_rtp_read().
|
static |
Definition at line 7142 of file res_rtp_asterisk.c.
References AST_RTP_EXTENSION_TRANSPORT_WIDE_CC, ast_rtp_instance_extmap_get_id(), len(), and rtp_instance_parse_transport_wide_cc().
Referenced by ast_rtp_interpret().
|
static |
Definition at line 7087 of file res_rtp_asterisk.c.
References ao2_ref, ast_debug_rtcp, ast_log, ast_rtp_instance_get_data(), ast_sched_add(), ast_tvnow(), AST_VECTOR_ADD_SORTED, AST_VECTOR_APPEND, AST_VECTOR_ELEM_CLEANUP_NOOP, AST_VECTOR_RESET, AST_VECTOR_SIZE, LOG_WARNING, rtp_transport_wide_cc_packet_statistics::received, RTP_SEQ_MOD, rtp_transport_wide_cc_feedback_produce(), rtp_transport_wide_cc_packet_statistics_cmp(), and rtp_transport_wide_cc_packet_statistics::seqno.
Referenced by rtp_instance_parse_extmap_extensions().
|
static |
Definition at line 6817 of file res_rtp_asterisk.c.
References ao2_unlock.
Referenced by ast_rtp_read().
|
static |
Destroyer for ioqueue thread.
Definition at line 1470 of file res_rtp_asterisk.c.
References ast_free, NULL, ast_rtp_ioqueue_thread::pool, ast_rtp_ioqueue_thread::terminate, and ast_rtp_ioqueue_thread::thread.
Referenced by rtp_ioqueue_thread_get_or_create(), and rtp_ioqueue_thread_remove().
|
static |
Finder and allocator for an ioqueue thread.
Definition at line 1512 of file res_rtp_asterisk.c.
References ast_calloc, AST_LIST_INSERT_HEAD, AST_LIST_LOCK, AST_LIST_TRAVERSE, AST_LIST_UNLOCK, cachingpool, ast_rtp_ioqueue_thread::count, end, ast_rtp_ioqueue_thread::ioqueue, ioqueue_worker_thread(), lock, ast_rtp_ioqueue_thread::next, NULL, ast_rtp_ioqueue_thread::pool, rtp_ioqueue_thread_destroy(), ast_rtp_ioqueue_thread::thread, and ast_rtp_ioqueue_thread::timerheap.
Referenced by ast_rtp_ice_turn_request().
|
static |
Removal function for ioqueue thread, determines if it should be terminated and destroyed.
Definition at line 1492 of file res_rtp_asterisk.c.
References AST_LIST_LOCK, AST_LIST_REMOVE, AST_LIST_UNLOCK, ast_rtp_ioqueue_thread::count, destroy(), ast_rtp_ioqueue_thread::next, and rtp_ioqueue_thread_destroy().
Referenced by rtp_deallocate_transport().
|
static |
Definition at line 3403 of file res_rtp_asterisk.c.
References AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_END, AST_MEDIA_TYPE_IMAGE, AST_MEDIA_TYPE_TEXT, AST_MEDIA_TYPE_UNKNOWN, AST_MEDIA_TYPE_VIDEO, ast_tvdiff_ms(), ast_tvnow(), ast_tvzero(), learning_min_duration, learning_min_sequential, rtp_learning_info::max_seq, rtp_learning_info::packets, rtp_learning_info::received, seq, rtp_learning_info::stream_type, STRICT_RTP_YES, and strictrtp.
Referenced by ast_rtp_read().
|
static |
Definition at line 3386 of file res_rtp_asterisk.c.
References learning_min_sequential, rtp_learning_info::max_seq, rtp_learning_info::packets, rtp_learning_info::received, and seq.
Referenced by ast_rtp_read(), and rtp_learning_start().
|
static |
Start the strictrtp learning mode.
rtp | RTP session description |
Definition at line 3453 of file res_rtp_asterisk.c.
References acl_change_stasis_cb(), ast_tvnow(), ast_rtp::lastrxseqno, rtp_learning_seq_init(), STRICT_RTP_LEARN, and sub.
Referenced by ast_rtp_ice_start_media(), and ast_rtp_remote_address_set().
|
static |
Definition at line 4891 of file res_rtp_asterisk.c.
References abs, ao2_ref, ast_clear_flag, ast_data_buffer_put(), ast_debug, ast_debug_rtcp, ast_debug_rtp, ast_debug_rtp_packet_is_allowed, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_g722, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_free, AST_FRFLAG_HAS_SEQUENCE_NUMBER, AST_FRFLAG_HAS_TIMING_INFO, ast_log, ast_malloc, ast_rtcp_calc_interval(), ast_rtcp_write(), AST_RTP_EXTENSION_ABS_SEND_TIME, ast_rtp_get_rate(), ast_rtp_instance_extmap_get_id(), ast_rtp_instance_get_data(), ast_rtp_instance_get_prop(), ast_rtp_instance_get_remote_address, ast_rtp_instance_get_test(), AST_RTP_PROPERTY_NAT, ast_sched_add(), ast_set_flag, ast_sockaddr_isnull(), ast_sockaddr_stringify(), ast_test_flag, ast_tvnow(), ast_tvzero(), ast_verbose(), ast_rtp_rtcp_nack_payload::buf, calc_txstamp(), ast_frame::data, ast_frame::datalen, ast_frame::delivery, errno, ext, FLAG_NAT_ACTIVE, FLAG_NAT_INACTIVE, FLAG_NAT_INACTIVE_NOWARN, FLAG_NEED_MARKER_BIT, ast_frame_subclass::format, ast_frame_subclass::frame_ending, ast_frame::frametype, ast_rtp::lastotexttimestamp, ast_rtp::lastovidtimestamp, ast_rtp::lastts, LOG_WARNING, MAX_TIMESTAMP_SKEW, ast_frame::ptr, put_unaligned_time24(), put_unaligned_uint32(), rtp_debug_test_addr(), rtp_sendto(), ast_frame::samples, ast_rtp_engine_test::send_report, ast_frame::seqno, ast_rtp_rtcp_nack_payload::size, ast_rtp::ssrc, ast_frame::subclass, timeval2ntp(), and ast_frame::ts.
Referenced by ast_rtp_write().
|
static |
Definition at line 3241 of file res_rtp_asterisk.c.
References __rtp_recvfrom().
Referenced by ast_rtp_read().
|
static |
Definition at line 8608 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), ast_rtp_write(), rtp_red::buf_data, ast_frame::data, ast_frame::datalen, ast_frame::ptr, rtp_red::t140, and ast_frame::ts.
|
static |
Definition at line 8575 of file res_rtp_asterisk.c.
References ast_calloc, ast_format_t140_red, AST_FRAME_TEXT, ast_rtp_instance_get_data(), ast_sched_add(), and red_write().
|
static |
This resource is not "reloaded" so much as unloaded and loaded again. In the case of the TURN related variables, the memory referenced by a previously loaded instance should have been released when the corresponding pool was destroyed. If at some point in the future this resource were to support ACTUAL live reconfiguration and did NOT release the pool this will cause a small memory leak.
Definition at line 9346 of file res_rtp_asterisk.c.
References ast_ice_host_candidate::advertised, ast_append_acl(), ast_calloc, ast_config_destroy(), ast_config_load2(), ast_false(), ast_free_acl_list(), ast_inet_ntoa(), ast_log, ast_named_acl_change_type(), ast_parse_arg(), AST_RWLIST_INSERT_TAIL, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_rwlock_unlock, ast_rwlock_wrlock, ast_security_topic(), ast_skip_blanks(), ast_sockaddr_copy(), ast_sockaddr_setnull(), ast_true(), ast_variable_browse(), ast_variable_retrieve(), ast_verb, CALC_LEARNING_MIN_DURATION, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, DEFAULT_DTLS_MTU, DEFAULT_DTMF_TIMEOUT, DEFAULT_ICESUPPORT, DEFAULT_LEARNING_MIN_DURATION, DEFAULT_LEARNING_MIN_SEQUENTIAL, DEFAULT_RTP_END, DEFAULT_RTP_START, DEFAULT_SRTP_REPLAY_PROTECTION, DEFAULT_STRICT_RTP, DEFAULT_STUN_SOFTWARE_ATTRIBUTE, DEFAULT_TURN_PORT, dtmftimeout, host_candidate_overrides_clear(), ice_acl, icesupport, ast_ice_host_candidate::include_local, learning_min_duration, learning_min_sequential, ast_ice_host_candidate::local, LOG_ERROR, LOG_WARNING, MAXIMUM_RTP_PORT, MINIMUM_RTP_PORT, ast_variable::name, ast_variable::next, ast_rtp_ioqueue_thread::next, NULL, PARSE_ADDR, PARSE_INADDR, PARSE_PORT_IGNORE, ast_rtp_ioqueue_thread::pool, RTCP_DEFAULT_INTERVALMS, RTCP_MAX_INTERVALMS, RTCP_MIN_INTERVALMS, rtcpinterval, rtpend, rtpstart, srtp_replay_protection, STANDARD_STUN_PORT, stasis_subscribe, stasis_subscription_accept_message_type(), STASIS_SUBSCRIPTION_FILTER_SELECTIVE, stasis_subscription_set_filter(), stasis_unsubscribe_and_join(), STRICT_RTP_NO, STRICT_RTP_SEQNO, STRICT_RTP_YES, strictrtp, stun_acl, stun_software_attribute, stunaddr, turnaddr, turnpassword, turnport, turnusername, ast_variable::value, and var.
Referenced by acl_change_stasis_cb(), load_module(), and reload_module().
|
static |
Definition at line 3309 of file res_rtp_asterisk.c.
References __rtp_sendto(), and ast_rtp_instance_get_data().
Referenced by ast_rtp_dtmf_begin(), ast_rtp_dtmf_continuation(), ast_rtp_dtmf_end_with_duration(), ast_rtp_rtcp_handle_nack(), ast_rtp_sendcng(), bridge_p2p_rtp_write(), and rtp_raw_write().
|
static |
Definition at line 9599 of file res_rtp_asterisk.c.
References ast_pjproject_caching_pool_destroy(), cachingpool, pj_thread_register_check(), timer_terminate, and timer_thread.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 6900 of file res_rtp_asterisk.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_debug_rtcp, ast_log, ast_rtp_instance_get_channel_id(), ast_rtp_instance_get_data(), AST_RTP_RTCP_FMT_TRANSPORT_WIDE_CC, AST_RTP_RTCP_RTPFB, ast_sockaddr_copy(), ast_sockaddr_stringify(), ast_tvdiff_us(), AST_VECTOR_ELEM_CLEANUP_NOOP, AST_VECTOR_GET_ADDR, AST_VECTOR_RESET, AST_VECTOR_SIZE, rtp_transport_wide_cc_packet_statistics::delta, errno, LOG_ERROR, put_unaligned_time24(), put_unaligned_uint16(), put_unaligned_uint32(), rtp_transport_wide_cc_packet_statistics::received, rtcp_sendto(), rtp_transport_wide_cc_feedback_status_append(), rtp_transport_wide_cc_packet_statistics::seqno, ast_rtp::ssrc, statistics(), ast_rtp::themssrc, and timeval2ntp().
Referenced by rtp_instance_parse_transport_wide_cc().
|
static |
Definition at line 6859 of file res_rtp_asterisk.c.
References put_unaligned_uint16(), rtp_transport_wide_cc_feedback_status_vector_append(), and status.
Referenced by rtp_transport_wide_cc_feedback_produce().
|
static |
Definition at line 6830 of file res_rtp_asterisk.c.
References put_unaligned_uint16().
Referenced by rtp_transport_wide_cc_feedback_status_append().
|
static |
Definition at line 6824 of file res_rtp_asterisk.c.
References rtp_transport_wide_cc_packet_statistics::seqno.
Referenced by rtp_instance_parse_transport_wide_cc().
|
static |
Definition at line 3471 of file res_rtp_asterisk.c.
References ast_free_acl_list(), ast_rwlock_unlock, and ast_rwlock_wrlock.
Referenced by unload_module().
|
static |
Definition at line 5160 of file res_rtp_asterisk.c.
References ao2_cleanup, ao2_lock, ao2_unlock, ast_log, ast_rtcp_calculate_sr_rr_statistics(), ast_rtcp_generate_compound_prefix(), ast_rtp_rtcp_report_alloc(), ast_sockaddr_isnull(), errno, LOG_ERROR, put_unaligned_uint32(), RAII_VAR, RTCP_PT_PSFB, rtcp_sendto(), ast_rtp::ssrc, ast_rtp::themssrc, and ast_rtp::themssrc_valid.
Referenced by ast_rtp_read(), and ast_rtp_write().
|
static |
Definition at line 5222 of file res_rtp_asterisk.c.
References ao2_cleanup, ao2_lock, ao2_unlock, ast_debug_rtcp, ast_log, ast_rtcp_calculate_sr_rr_statistics(), ast_rtcp_generate_compound_prefix(), ast_rtp_instance_get_prop(), AST_RTP_PROPERTY_REMB, AST_RTP_RTCP_FMT_REMB, ast_rtp_rtcp_report_alloc(), ast_sockaddr_isnull(), ast_rtp_rtcp_feedback_remb::br_exp, ast_rtp_rtcp_feedback_remb::br_mantissa, ast_frame::data, errno, ast_rtp_rtcp_feedback::fmt, LOG_ERROR, ast_frame::ptr, put_unaligned_uint32(), RAII_VAR, ast_rtp_rtcp_feedback::remb, RTCP_PT_PSFB, rtcp_sendto(), ast_rtp::ssrc, and ast_rtp::themssrc_valid.
Referenced by ast_rtp_write().
|
static |
Definition at line 2463 of file res_rtp_asterisk.c.
References ast_rtp_instance_get_data(), and id.
|
static |
Definition at line 7583 of file res_rtp_asterisk.c.
References rtp_drop_packets_data::addr, ast_sockaddr_cmp(), ast_sockaddr_cmp_addr(), ast_sockaddr_isnull(), ast_tvcmp(), ast_tvnow(), ast_tvzero(), drop_packets_data, drop_packets_data_update(), rtp_drop_packets_data::interval, rtp_drop_packets_data::next, rtp_drop_packets_data::num_dropped, rtp_drop_packets_data::num_to_drop, and rtp_drop_packets_data::port.
Referenced by ast_rtp_read().
|
static |
Definition at line 3510 of file res_rtp_asterisk.c.
References ast_apply_acl_nolog(), ast_rwlock_rdlock, ast_rwlock_unlock, AST_SENSE_DENY, and result.
Referenced by rtp_add_candidates_to_ice().
|
static |
Worker thread for timerheap.
Definition at line 2727 of file res_rtp_asterisk.c.
References ast_rtp_ioqueue_thread::ioqueue, NULL, ast_rtp_ioqueue_thread::pool, timer_heap, and timer_terminate.
Referenced by load_module().
|
static |
Definition at line 4392 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_generate_report(), ast_rtcp_interpret(), ast_rtp_rtcp_handle_nack(), rtp_raw_write(), rtp_transport_wide_cc_feedback_produce(), and update_rtt_stats().
|
static |
Definition at line 9709 of file res_rtp_asterisk.c.
References ARRAY_LEN, ast_cli_unregister_multiple(), AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CHANNEL_DEPEND, AST_MODULE_INFO(), AST_MODULE_SUPPORT_CORE, ast_rtp_engine_unregister(), ASTERISK_GPL_KEY, HAVE_PJPROJECT, host_candidate_overrides_clear(), load_module(), pj_thread_register_check(), reload(), reload_module(), rtp_terminate_pjproject(), rtp_unload_acl(), and stasis_unsubscribe_and_join().
|
static |
Helper function which updates an ast_sockaddr with the candidate used for the component.
Definition at line 749 of file res_rtp_asterisk.c.
References ast_sockaddr_parse(), and ast_sockaddr_set_port.
Referenced by ast_rtp_ice_start_media().
|
static |
Definition at line 5824 of file res_rtp_asterisk.c.
References calc_mean_and_standard_deviation(), and if().
Referenced by ast_rtcp_interpret().
|
static |
Definition at line 5848 of file res_rtp_asterisk.c.
References calc_mean_and_standard_deviation(), and if().
Referenced by ast_rtcp_interpret().
|
static |
Definition at line 5768 of file res_rtp_asterisk.c.
References calc_mean_and_standard_deviation(), NULL, and timeval2ntp().
Referenced by ast_rtcp_interpret().
|
static |
Definition at line 9207 of file res_rtp_asterisk.c.
References ast_cli_args::argv, and ast_strlen_zero.
Referenced by handle_cli_rtp_drop_incoming_packets().
|
static |
Definition at line 9742 of file res_rtp_asterisk.c.
|
static |
Definition at line 221 of file res_rtp_asterisk.c.
|
static |
Definition at line 9742 of file res_rtp_asterisk.c.
|
static |
Definition at line 1753 of file res_rtp_asterisk.c.
|
static |
Definition at line 2717 of file res_rtp_asterisk.c.
|
static |
Definition at line 2472 of file res_rtp_asterisk.c.
|
static |
Definition at line 1448 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_turn_request().
|
static |
Definition at line 1382 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_turn_request().
|
static |
Definition at line 2484 of file res_rtp_asterisk.c.
|
static |
Pool factory used by pjlib to allocate memory.
Definition at line 233 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_turn_request(), ice_create(), load_module(), rtp_ioqueue_thread_get_or_create(), and rtp_terminate_pjproject().
|
static |
Definition at line 9336 of file res_rtp_asterisk.c.
|
static |
Definition at line 7551 of file res_rtp_asterisk.c.
Referenced by drop_packets_data_update(), handle_cli_rtp_drop_incoming_packets(), and should_drop_packets().
|
static |
Definition at line 193 of file res_rtp_asterisk.c.
Referenced by handle_cli_rtp_settings(), process_dtmf_rfc2833(), and rtp_reload().
|
static |
|
static |
ACL for ICE addresses
Definition at line 225 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
|
static |
Definition at line 226 of file res_rtp_asterisk.c.
|
static |
Definition at line 214 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_change_components(), handle_cli_rtp_settings(), rtp_allocate_transport(), and rtp_reload().
|
static |
|
static |
Lowest acceptable timeout between the first and the last sequential RTP frame.
Definition at line 208 of file res_rtp_asterisk.c.
Referenced by rtp_learning_rtp_seq_update(), and rtp_reload().
|
static |
Number of sequential RTP frames needed from a single source during learning mode to accept new source.
Definition at line 207 of file res_rtp_asterisk.c.
Referenced by handle_cli_rtp_settings(), rtp_learning_rtp_seq_update(), rtp_learning_seq_init(), and rtp_reload().
|
static |
Definition at line 222 of file res_rtp_asterisk.c.
|
static |
Definition at line 862 of file res_rtp_asterisk.c.
Referenced by pj_thread_register_check().
|
static |
Global memory pool for configuration and timers.
Definition at line 236 of file res_rtp_asterisk.c.
Referenced by __ast_calloc_with_stringfields(), __ast_string_field_release_active(), activate_thread(), add_header(), add_string_pool(), ast_serializer_pool_create(), AST_TEST_DEFINE(), ast_threadpool_create(), build_rlmi_body(), channel_read_pjsip(), create_out_of_dialog_request(), create_outgoing_sdp_stream(), exten_state_publisher_cb(), get_unused_callno(), incoming_request(), outgoing_request(), parse_uri_cb(), queued_emptied(), queued_set_size(), queued_task_pushed(), replace_callno(), serializer_create(), set_size_data_alloc(), sip_outbound_publisher_init(), sip_outbound_registration_regc_alloc(), sip_replace_resolver(), stasis_topic_pool_create(), stringfield_handler_fn(), subscription_persistence_load(), subscription_persistence_recreate(), task_pushed_data_alloc(), thread_worker_pair_alloc(), threadpool_alloc(), threadpool_destructor(), threadpool_tps_emptied(), threadpool_tps_shutdown(), threadpool_tps_task_pushed(), topic_pool_dtor(), transport_create(), worker_thread_alloc(), and zombify_threads().
struct ast_srtp_res* res_srtp |
Definition at line 177 of file rtp_engine.c.
struct ast_srtp_policy_res* res_srtp_policy |
Definition at line 178 of file rtp_engine.c.
Referenced by ast_rtp_engine_srtp_is_registered().
|
static |
Debug RTCP packets to/from this host
Definition at line 200 of file res_rtp_asterisk.c.
Referenced by handle_cli_rtcp_set_debug(), rtcp_debug_test_addr(), and rtcp_do_debug_ip().
|
static |
Debug only RTCP packets from IP or IP+Port if port is > 0
Definition at line 202 of file res_rtp_asterisk.c.
Referenced by rtcp_debug_test_addr(), and rtcp_do_debug_ip().
|
static |
Time between rtcp reports in millisecs
Definition at line 198 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_calc_interval(), and rtp_reload().
|
static |
Are we debugging RTCP?
Definition at line 197 of file res_rtp_asterisk.c.
Referenced by handle_cli_rtcp_set_stats().
|
static |
Debug packets to/from this host
Definition at line 199 of file res_rtp_asterisk.c.
Referenced by handle_cli_rtp_set_debug(), rtp_debug_test_addr(), and rtp_do_debug_ip().
|
static |
Debug only RTP packets from IP or IP+Port if port is > 0
Definition at line 201 of file res_rtp_asterisk.c.
Referenced by rtp_debug_test_addr(), and rtp_do_debug_ip().
|
static |
Last port for RTP sessions (set in rtp.conf)
Definition at line 196 of file res_rtp_asterisk.c.
Referenced by handle_cli_rtp_settings(), rtp_allocate_transport(), and rtp_reload().
|
static |
First port for RTP sessions (set in rtp.conf)
Definition at line 195 of file res_rtp_asterisk.c.
Referenced by handle_cli_rtp_settings(), rtp_allocate_transport(), and rtp_reload().
|
static |
Definition at line 209 of file res_rtp_asterisk.c.
Referenced by ast_rtcp_interpret(), ast_rtp_interpret(), handle_cli_rtp_settings(), and rtp_reload().
|
static |
Only accept RTP frames from a defined source. If we receive an indication of a changing source, enter learning mode.
Definition at line 206 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_start_media(), ast_rtp_remote_address_set(), handle_cli_rtp_settings(), rtp_allocate_transport(), rtp_learning_rtp_seq_update(), and rtp_reload().
|
static |
ACL for STUN requests
Definition at line 229 of file res_rtp_asterisk.c.
Referenced by rtp_reload().
|
static |
Definition at line 230 of file res_rtp_asterisk.c.
|
static |
Definition at line 215 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_turn_request(), ice_create(), and rtp_reload().
|
static |
Definition at line 216 of file res_rtp_asterisk.c.
Referenced by rtp_add_candidates_to_ice(), and rtp_reload().
|
static |
Global timer heap.
Definition at line 239 of file res_rtp_asterisk.c.
Referenced by ast_rtp_ice_start(), ice_create(), load_module(), and timer_worker_thread().
|
static |
Used to tell the timer thread to terminate.
Definition at line 245 of file res_rtp_asterisk.c.
Referenced by rtp_terminate_pjproject(), and timer_worker_thread().
|
static |
Thread executing the timer heap.
Definition at line 242 of file res_rtp_asterisk.c.
Referenced by load_module(), and rtp_terminate_pjproject().
|
static |
Definition at line 217 of file res_rtp_asterisk.c.
Referenced by rtp_add_candidates_to_ice(), and rtp_reload().
|
static |
Definition at line 220 of file res_rtp_asterisk.c.
Referenced by rtp_add_candidates_to_ice(), and rtp_reload().
|
static |
Definition at line 218 of file res_rtp_asterisk.c.
Referenced by rtp_add_candidates_to_ice(), and rtp_reload().
|
static |
Definition at line 219 of file res_rtp_asterisk.c.
Referenced by rtp_add_candidates_to_ice(), and rtp_reload().