65 #ifndef _ASTERISK_RTP_ENGINE_H 66 #define _ASTERISK_RTP_ENGINE_H 68 #if defined(__cplusplus) || defined(c_plusplus) 83 #define AST_RTP_MAX_PT 128 89 #define AST_RTP_PT_LAST_STATIC 34 92 #define AST_RTP_PT_FIRST_DYNAMIC 96 95 #define AST_RTP_PT_LAST_REASSIGN 63 98 #define AST_RED_MAX_GENERATION 5 107 #define MAX_CHANNEL_ID 152 266 #define AST_RTP_DTMF (1 << 0) 268 #define AST_RTP_CN (1 << 1) 270 #define AST_RTP_CISCO_DTMF (1 << 2) 272 #define AST_RTP_MAX AST_RTP_CISCO_DTMF 293 #define AST_RTP_RTCP_SR 200 295 #define AST_RTP_RTCP_RR 201 297 #define AST_RTP_RTCP_RTPFB 205 299 #define AST_RTP_RTCP_PSFB 206 303 #define AST_RTP_RTCP_FMT_NACK 1 305 #define AST_RTP_RTCP_FMT_PLI 1 307 #define AST_RTP_RTCP_FMT_FIR 4 309 #define AST_RTP_RTCP_FMT_REMB 15 311 #define AST_RTP_RTCP_FMT_TRANSPORT_WIDE_CC 15 336 struct timeval ntp_timestamp;
340 } sender_information;
433 #define AST_RTP_STAT_SET(current_stat, combined, placement, value) \ 434 if (stat == current_stat || stat == AST_RTP_INSTANCE_STAT_ALL || (combined >= 0 && combined == stat)) { \ 436 if (stat == current_stat) { \ 441 #define AST_RTP_STAT_STRCPY(current_stat, combined, placement, value) \ 442 if (stat == current_stat || stat == AST_RTP_INSTANCE_STAT_ALL || (combined >= 0 && combined == stat)) { \ 443 ast_copy_string(placement, value, sizeof(placement)); \ 444 if (stat == current_stat) { \ 449 #define AST_RTP_STAT_TERMINATOR(combined) \ 450 if (stat == combined) { \ 506 enum ast_transport transport,
const char *server,
unsigned int port,
507 const char *username,
const char *
password);
593 #ifdef TEST_FRAMEWORK 657 int (*red_init)(
struct ast_rtp_instance *instance,
int buffer_time,
int *payloads,
int generations);
694 #ifdef TEST_FRAMEWORK 716 #define AST_RTP_CODECS_NULL_INIT \ 717 { .codecs_lock = AST_RWLOCK_INIT_VALUE, .payload_mapping_rx = { 0, }, .payload_mapping_tx = { 0, }, .framing = 0, } 794 #define ast_rtp_engine_register(engine) ast_rtp_engine_register2(engine, AST_MODULE_SELF) 847 #define ast_rtp_glue_register(glue) ast_rtp_glue_register2(glue, AST_MODULE_SELF) 1080 #define ast_rtp_instance_set_remote_address(instance, address) \ 1081 ast_rtp_instance_set_requested_target_address((instance), (address)) 1192 #define ast_rtp_instance_get_remote_address(instance, address) \ 1193 ast_rtp_instance_get_incoming_source_address((instance), (address)) 1228 #define ast_rtp_instance_get_and_cmp_remote_address(instance, address) \ 1229 ast_rtp_instance_get_and_cmp_requested_target_address((instance), (address)) 1339 const char *uri,
const char *attributes);
1562 char *mimetype,
char *mimesubtype,
1564 unsigned int sample_rate);
2541 #ifdef TEST_FRAMEWORK 2726 #ifdef TEST_FRAMEWORK 2824 #define AST_LOG_CATEGORY_RTP "rtp" 2826 #define AST_LOG_CATEGORY_RTP_PACKET "rtp_packet" 2828 #define AST_LOG_CATEGORY_RTCP "rtcp" 2830 #define AST_LOG_CATEGORY_RTCP_PACKET "rtcp_packet" 2832 #define AST_LOG_CATEGORY_DTLS "dtls" 2834 #define AST_LOG_CATEGORY_DTLS_PACKET "dtls_packet" 2836 #define AST_LOG_CATEGORY_ICE "ice" 2846 #define AST_DEBUG_CATEGORY_RTP ast_debug_category_rtp_id() 2847 #define AST_DEBUG_CATEGORY_RTP_PACKET ast_debug_category_rtp_packet_id() 2848 #define AST_DEBUG_CATEGORY_RTCP ast_debug_category_rtcp_id() 2849 #define AST_DEBUG_CATEGORY_RTCP_PACKET ast_debug_category_rtcp_packet_id() 2850 #define AST_DEBUG_CATEGORY_DTLS ast_debug_category_dtls_id() 2851 #define AST_DEBUG_CATEGORY_DTLS_PACKET ast_debug_category_dtls_packet_id() 2852 #define AST_DEBUG_CATEGORY_ICE ast_debug_category_ice_id() 2860 #define ast_debug_rtp(sublevel, ...) \ 2861 ast_debug_category(sublevel, AST_DEBUG_CATEGORY_RTP, __VA_ARGS__) 2864 #define ast_debug_rtp_packet_is_allowed \ 2865 ast_debug_category_is_allowed(AST_LOG_CATEGORY_ENABLED, AST_DEBUG_CATEGORY_RTP_PACKET) 2873 #define ast_debug_rtcp(sublevel, ...) \ 2874 ast_debug_category(sublevel, AST_DEBUG_CATEGORY_RTCP, __VA_ARGS__) 2877 #define ast_debug_rtcp_packet_is_allowed \ 2878 ast_debug_category_is_allowed(AST_LOG_CATEGORY_ENABLED, AST_DEBUG_CATEGORY_RTCP_PACKET) 2886 #define ast_debug_dtls(sublevel, ...) \ 2887 ast_debug_category(sublevel, AST_DEBUG_CATEGORY_DTLS, __VA_ARGS__) 2890 #define ast_debug_dtls_packet_is_allowed \ 2891 ast_debug_category_is_allowed(AST_LOG_CATEGORY_ENABLED, AST_DEBUG_CATEGORY_DTLS_PACKET) 2898 #define ast_debug_ice(sublevel, ...) \ 2899 ast_debug_category(sublevel, AST_DEBUG_CATEGORY_ICE, __VA_ARGS__) 2903 #if defined(__cplusplus) || defined(c_plusplus) uintmax_t ast_debug_category_rtcp_packet_id(void)
void ast_rtp_codecs_payload_formats(struct ast_rtp_codecs *codecs, struct ast_format_cap *astformats, int *nonastformats)
Retrieve all formats that were found.
struct stasis_message_type * ast_rtp_rtcp_sent_type(void)
Message type for an RTCP message sent from this Asterisk instance.
double local_normdevrxploss
int ast_rtp_instance_activate(struct ast_rtp_instance *instance)
Indicate to the RTP engine that packets are now expected to be sent/received on the RTP instance...
An object that represents data sent during a SR/RR RTCP report.
int ast_rtp_dtls_cfg_parse(struct ast_rtp_dtls_cfg *dtls_cfg, const char *name, const char *value)
Parse DTLS related configuration options.
Main Channel structure associated with a channel.
int ast_rtp_red_init(struct ast_rtp_instance *instance, int buffer_time, int *payloads, int generations)
Initialize RED support on an RTP instance.
ast_rtp_dtls_verify
DTLS verification settings.
struct ast_rtp_payload_type * ast_rtp_codecs_get_payload(struct ast_rtp_codecs *codecs, int payload)
Retrieve rx payload mapped information by payload type.
void ast_rtp_instance_available_formats(struct ast_rtp_instance *instance, struct ast_format_cap *to_endpoint, struct ast_format_cap *to_asterisk, struct ast_format_cap *result)
Request the formats that can be transcoded.
int ast_rtp_instance_extmap_get_id(struct ast_rtp_instance *instance, enum ast_rtp_extension extension)
Retrieve the id for an RTP extension.
static struct ast_sched_context * sched
int ast_rtp_codecs_payload_replace_format(struct ast_rtp_codecs *codecs, int payload, struct ast_format *format)
Update the format associated with a tx payload type in a codecs structure.
void ast_rtp_instance_set_channel_id(struct ast_rtp_instance *instance, const char *uniqueid)
Set the channel that owns this RTP instance.
void * ast_rtp_instance_get_extended_prop(struct ast_rtp_instance *instance, int property)
Get the value of an RTP instance extended property.
unsigned int highest_seq_no
int ast_rtp_instance_dtmf_mode_set(struct ast_rtp_instance *instance, enum ast_rtp_dtmf_mode dtmf_mode)
Set the DTMF mode that should be used.
static int verify(const struct ast_sip_auth *auth, pjsip_rx_data *rdata, pj_pool_t *pool)
astobj2 callback for verifying incoming credentials
void ast_rtp_instance_change_source(struct ast_rtp_instance *instance)
Indicate a new source of audio has dropped in and the ssrc should change.
int ast_rtp_instance_get_stats(struct ast_rtp_instance *instance, struct ast_rtp_instance_stats *stats, enum ast_rtp_instance_stat stat)
Retrieve statistics about an RTP instance.
double remote_normdevjitter
int ast_rtp_instance_bundle(struct ast_rtp_instance *child, struct ast_rtp_instance *parent)
Request that an RTP instance be bundled with another.
size_t ast_rtp_instance_extmap_count(struct ast_rtp_instance *instance)
Get the number of known unique identifiers.
uintmax_t ast_debug_category_rtp_id(void)
int ast_rtp_instance_get_timeout(struct ast_rtp_instance *instance)
Get the RTP timeout value.
int ast_rtp_glue_register2(struct ast_rtp_glue *glue, struct ast_module *module)
Register RTP glue.
struct ast_rtp_codecs * ast_rtp_instance_get_codecs(struct ast_rtp_instance *instance)
Get the codecs structure of an RTP instance.
uintmax_t ast_debug_category_dtls_packet_id(void)
Stasis Message Bus API. See Stasis Message Bus API for detailed documentation.
struct ast_rtp_glue * ast_rtp_instance_get_active_glue(struct ast_rtp_instance *instance)
Get the RTP glue in use on an RTP instance.
void ast_rtp_instance_set_schedid(struct ast_rtp_instance *instance, int id)
Set the schedid for RTCP.
struct ast_rtp_engine_test * ast_rtp_instance_get_test(struct ast_rtp_instance *instance)
Obtain a pointer to the test callbacks on an RTP instance.
double remote_stdevjitter
int ast_rtp_instance_early_bridge(struct ast_channel *c0, struct ast_channel *c1)
Early bridge two channels that use RTP instances.
int ast_rtp_instance_set_qos(struct ast_rtp_instance *instance, int tos, int cos, const char *desc)
Set QoS parameters on an RTP session.
struct ast_rtp_payload_type * ast_rtp_engine_alloc_payload_type(void)
Allocation routine for ast_rtp_payload_type.
int ast_rtp_instance_write(struct ast_rtp_instance *instance, struct ast_frame *frame)
Send a frame out over RTP.
unsigned short reception_report_count
An object that represents data received in a feedback report.
void ast_rtp_codecs_payloads_xover(struct ast_rtp_codecs *src, struct ast_rtp_codecs *dest, struct ast_rtp_instance *instance)
Crossover copy the tx payload mapping of src to the rx payload mapping of dest.
struct ast_rtp_engine_ice * ast_rtp_instance_get_ice(struct ast_rtp_instance *instance)
Obtain a pointer to the ICE support present on an RTP instance.
void ast_rtp_instance_extmap_clear(struct ast_rtp_instance *instance)
Clear negotiated RTP extension information.
struct ast_srtp * ast_rtp_instance_get_srtp(struct ast_rtp_instance *instance, int rtcp)
Obtain the SRTP instance associated with an RTP instance.
ast_rtp_extension
Known RTP extensions.
A report block within a SR/RR report.
void ast_rtp_instance_set_timeout(struct ast_rtp_instance *instance, int timeout)
Set the RTP timeout value.
ast_rtp_ice_candidate_type
ICE candidate types.
uintmax_t ast_debug_category_rtp_packet_id(void)
void ast_rtp_instance_set_last_tx(struct ast_rtp_instance *rtp, time_t time)
Set the last RTP transmission time.
int ast_rtp_instance_make_compatible(struct ast_channel *chan, struct ast_rtp_instance *instance, struct ast_channel *peer)
Request that the underlying RTP engine make two RTP instances compatible with eachother.
void ast_rtp_codecs_set_framing(struct ast_rtp_codecs *codecs, unsigned int framing)
Set the framing used for a set of codecs.
A REMB feedback message (see draft-alvestrand-rmcat-remb-03 for details)
int ast_rtp_instance_get_and_cmp_requested_target_address(struct ast_rtp_instance *instance, struct ast_sockaddr *address)
Get the requested target address of the remote endpoint and compare it to the given address...
unsigned int rtp_timestamp
int ast_rtp_instance_add_srtp_policy(struct ast_rtp_instance *instance, struct ast_srtp_policy *remote_policy, struct ast_srtp_policy *local_policy, int rtcp)
Add or replace the SRTP policies for the given RTP instance.
static struct ast_srtp_res srtp_res
Structure for an ICE candidate.
int ast_rtp_engine_unload_format(struct ast_format *format)
Formats requiring the use of a format attribute interface must have that interface registered in orde...
Socket address structure.
static struct ast_str * password
void ast_rtp_instance_set_stream_num(struct ast_rtp_instance *instance, int stream_num)
Set the stream number for an RTP instance.
int ast_rtp_codecs_payload_code_tx(struct ast_rtp_codecs *codecs, int asterisk_format, const struct ast_format *format, int code)
Retrieve a tx mapped payload type based on whether it is an Asterisk format and the code...
void ast_rtp_engine_unregister_srtp(void)
unsigned int ast_rtp_codecs_get_framing(struct ast_rtp_codecs *codecs)
Get the framing used for a set of codecs.
uintmax_t ast_debug_category_ice_id(void)
struct stasis_message_type * ast_rtp_rtcp_received_type(void)
Message type for an RTCP message received from some external source.
const char * ast_rtp_instance_get_channel_id(struct ast_rtp_instance *instance)
Get the unique ID of the channel that owns this RTP instance.
int ast_rtp_instance_extmap_enable(struct ast_rtp_instance *instance, int id, enum ast_rtp_extension extension, enum ast_rtp_extension_direction direction)
Enable support for an RTP extension on an instance.
void ast_rtp_instance_stun_request(struct ast_rtp_instance *instance, struct ast_sockaddr *suggestion, const char *username)
Request that the underlying RTP engine send a STUN BIND request.
void ast_rtp_instance_set_bridged(struct ast_rtp_instance *instance, struct ast_rtp_instance *bridged)
Set the other RTP instance that an instance is bridged to.
int ast_rtp_instance_get_sdes_received(struct ast_rtp_instance *instance)
Get the value of sdes_received on the test engine.
struct ast_rtp_engine_dtls * dtls
struct ast_format * ast_rtp_codecs_get_payload_format(struct ast_rtp_codecs *codecs, int payload)
Retrieve the actual ast_format stored on the codecs structure for a specific tx payload type...
void ast_rtp_instance_stop(struct ast_rtp_instance *instance)
Stop an RTP instance.
const char * ast_rtp_lookup_mime_subtype2(const int asterisk_format, const struct ast_format *format, int code, enum ast_rtp_options options)
Retrieve mime subtype information on a payload.
int ast_rtp_engine_unregister(struct ast_rtp_engine *engine)
Unregister an RTP engine.
size_t ast_rtp_instance_get_send_buffer_count(struct ast_rtp_instance *instance)
Get the current size of the send buffer.
void ast_rtp_instance_set_data(struct ast_rtp_instance *instance, void *data)
Set the data portion of an RTP instance.
Maximum number of RTP properties supported.
int ast_rtp_codecs_payload_code(struct ast_rtp_codecs *codecs, int asterisk_format, struct ast_format *format, int code)
Retrieve a rx mapped payload type based on whether it is an Asterisk format and the code...
void ast_rtp_instance_set_remote_ssrc(struct ast_rtp_instance *rtp, unsigned int ssrc)
Set the remote SSRC for an RTP instance.
ast_rtp_ice_role
ICE role during negotiation.
static struct ao2_container * codecs
Registered codecs.
struct ast_rtp_engine_test * test
Scheduler Routines (derived from cheops)
structure to hold extensions
Asterisk internal frame definitions.
ast_rtp_ice_component_type
ICE component types.
struct ast_rtp_engine * ast_rtp_instance_get_engine(struct ast_rtp_instance *instance)
Get the RTP engine in use on an RTP instance.
double local_stdevrxploss
int ast_rtp_instance_extmap_negotiate(struct ast_rtp_instance *instance, int id, enum ast_rtp_extension_direction direction, const char *uri, const char *attributes)
Negotiate received RTP extension information.
#define AST_VECTOR(name, type)
Define a vector structure.
void ast_rtp_instance_set_extended_prop(struct ast_rtp_instance *instance, int property, void *value)
Set the value of an RTP instance extended property.
char * ast_rtp_instance_get_quality(struct ast_rtp_instance *instance, enum ast_rtp_instance_stat_field field, char *buf, size_t size)
Retrieve quality statistics about an RTP instance.
void ast_rtp_publish_rtcp_message(struct ast_rtp_instance *rtp, struct stasis_message_type *message_type, struct ast_rtp_rtcp_report *report, struct ast_json *blob)
Publish an RTCP message to Stasis Message Bus API.
unsigned int txoctetcount
static struct ast_srtp_policy_res policy_res
int ast_rtp_codecs_payloads_set_rtpmap_type(struct ast_rtp_codecs *codecs, struct ast_rtp_instance *instance, int payload, char *mimetype, char *mimesubtype, enum ast_rtp_options options)
Record tx payload type information that was seen in an a=rtpmap: SDP line.
int ast_rtp_get_rate(const struct ast_format *format)
Retrieve the sample rate of a format according to RTP specifications.
double remote_normdevrxploss
struct ast_rtp_rtcp_report * ast_rtp_rtcp_report_alloc(unsigned int report_blocks)
Allocate an ao2 ref counted instance of ast_rtp_rtcp_report.
Structure that represents the optional DTLS SRTP support within an RTP engine.
int ast_rtp_instance_set_local_address(struct ast_rtp_instance *instance, const struct ast_sockaddr *address)
Set the address that we are expecting to receive RTP on.
ast_rtp_dtls_setup
DTLS setup types.
int ast_rtp_engine_register_srtp(struct ast_srtp_res *srtp_res, struct ast_srtp_policy_res *policy_res)
int ast_rtp_instance_get_hold_timeout(struct ast_rtp_instance *instance)
Get the RTP timeout value for when an RTP instance is on hold.
time_t ast_rtp_instance_get_last_tx(const struct ast_rtp_instance *rtp)
Get the last RTP transmission time.
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
unsigned int rxoctetcount
struct ast_rtp_engine_dtls * ast_rtp_instance_get_dtls(struct ast_rtp_instance *instance)
Obtain a pointer to the DTLS support present on an RTP instance.
ast_rtp_extension_direction
Directions for RTP extensions.
enum ast_rtp_extension_direction ast_rtp_instance_extmap_get_direction(struct ast_rtp_instance *instance, int id)
Retrieve the negotiated direction for an RTP extension id.
int ast_rtp_instance_sendcng(struct ast_rtp_instance *instance, int level)
Send a comfort noise packet to the RTP instance.
ast_rtp_dtls_connection
DTLS connection states.
struct ast_rtp_engine_ice * ice
struct ast_format * format
unsigned int packet_count
unsigned int ast_rtp_instance_get_ssrc(struct ast_rtp_instance *rtp)
Retrieve the local SSRC value that we will be using.
int ast_rtp_instance_dtmf_begin(struct ast_rtp_instance *instance, char digit)
Begin sending a DTMF digit.
ast_rtp_dtls_hash
DTLS fingerprint hashes.
int ast_rtp_dtls_cfg_validate(struct ast_rtp_dtls_cfg *dtls_cfg)
Validates DTLS related configuration options.
int ast_rtp_instance_set_read_format(struct ast_rtp_instance *instance, struct ast_format *format)
Request that the underlying RTP engine provide audio frames in a specific format. ...
unsigned int ast_rtp_lookup_sample_rate2(int asterisk_format, const struct ast_format *format, int code)
Get the sample rate associated with known RTP payload types.
time_t ast_rtp_instance_get_last_rx(const struct ast_rtp_instance *rtp)
void * ast_rtp_instance_get_data(struct ast_rtp_instance *instance)
Get the data portion of an RTP instance.
static void destroy(struct ast_trans_pvt *pvt)
uintmax_t ast_debug_category_dtls_id(void)
void ast_rtp_instance_set_hold_timeout(struct ast_rtp_instance *instance, int timeout)
Set the RTP timeout value for when the instance is on hold.
int ast_rtp_instance_fd(struct ast_rtp_instance *instance, int rtcp)
Get the file descriptor for an RTP session (or RTCP)
const char * ast_rtp_instance_extmap_get_uri(struct ast_rtp_instance *instance, int id)
Retrieve the URI for an RTP extension id.
Vector container support.
size_t ast_rtp_instance_get_recv_buffer_count(struct ast_rtp_instance *instance)
Get the current size of the receive buffer.
unsigned int ephemeral_cert
Structure that represents the test functionality for res_rtp_asterisk unit tests. ...
void ast_rtp_codecs_payloads_clear(struct ast_rtp_codecs *codecs, struct ast_rtp_instance *instance)
Clear rx and tx payload mapping information from an RTP instance.
void ast_rtp_codecs_payloads_destroy(struct ast_rtp_codecs *codecs)
Destroy the contents of an RTP codecs structure (but not the structure itself)
void ast_rtp_instance_get_local_address(struct ast_rtp_instance *instance, struct ast_sockaddr *address)
Get the local address that we are expecting RTP on.
int ast_rtp_instance_destroy(struct ast_rtp_instance *instance)
Destroy an RTP instance.
void ast_rtp_instance_drop_packets(struct ast_rtp_instance *instance, int num)
Set the number of packets to drop on RTP read.
void ast_rtp_instance_set_keepalive(struct ast_rtp_instance *instance, int timeout)
Set the RTP keepalive interval.
struct ast_rtp_instance * bridged
void ast_rtp_codecs_payloads_copy(struct ast_rtp_codecs *src, struct ast_rtp_codecs *dest, struct ast_rtp_instance *instance)
Copy payload information from one RTP instance to another.
ast_rtp_instance_stat_field
int ast_rtp_instance_set_write_format(struct ast_rtp_instance *instance, struct ast_format *format)
Tell underlying RTP engine that audio frames will be provided in a specific format.
size_t ast_rtp_instance_get_recv_buffer_max(struct ast_rtp_instance *instance)
Get the maximum size of the receive buffer.
int ast_rtp_codecs_payloads_initialize(struct ast_rtp_codecs *codecs)
Initialize an RTP codecs structure.
char * ast_rtp_lookup_mime_multiple2(struct ast_str *buf, struct ast_format_cap *ast_format_capability, int rtp_capability, const int asterisk_format, enum ast_rtp_options options)
Convert formats into a string and put them into a buffer.
Structure for rwlock and tracking information.
int ast_rtp_red_buffer(struct ast_rtp_instance *instance, struct ast_frame *frame)
Buffer a frame in an RTP instance for RED.
void ast_rtp_codecs_payloads_unset(struct ast_rtp_codecs *codecs, struct ast_rtp_instance *instance, int payload)
Remove tx payload type mapped information.
void ast_rtp_dtls_cfg_free(struct ast_rtp_dtls_cfg *dtls_cfg)
Free contents of a DTLS configuration structure.
struct ast_rtp_instance * ast_rtp_instance_get_bridged(struct ast_rtp_instance *instance)
Get the other RTP instance that an instance is bridged to.
struct stasis_topic * ast_rtp_topic(void)
Stasis Message Bus API topic for RTP and RTCP related messages
void ast_rtp_instance_get_requested_target_address(struct ast_rtp_instance *instance, struct ast_sockaddr *address)
Get the requested target address of the remote endpoint.
int ast_rtp_engine_srtp_is_registered(void)
int ast_rtp_glue_unregister(struct ast_rtp_glue *glue)
Unregister RTP glue.
int ast_rtp_instance_get_prop(struct ast_rtp_instance *instance, enum ast_rtp_property property)
Get the value of an RTP instance property.
int ast_rtp_codecs_payloads_set_rtpmap_type_rate(struct ast_rtp_codecs *codecs, struct ast_rtp_instance *instance, int pt, char *mimetype, char *mimesubtype, enum ast_rtp_options options, unsigned int sample_rate)
Set tx payload type to a known MIME media type for a codec with a specific sample rate...
enum ast_rtp_dtmf_mode ast_rtp_instance_dtmf_mode_get(struct ast_rtp_instance *instance)
Get the DTMF mode of an RTP instance.
void ast_rtp_instance_set_stats_vars(struct ast_channel *chan, struct ast_rtp_instance *instance)
Set standard statistics from an RTP instance on a channel.
Data structure associated with a single frame of data.
int ast_rtp_instance_get_keepalive(struct ast_rtp_instance *instance)
Get the RTP keepalive interval.
int ast_rtp_codecs_find_payload_code(struct ast_rtp_codecs *codecs, int payload)
Search for the tx payload type in the ast_rtp_codecs structure.
double remote_stdevrxploss
int ast_rtp_instance_get_and_cmp_local_address(struct ast_rtp_instance *instance, struct ast_sockaddr *address)
Get the address of the local endpoint that we are sending RTP to, comparing its address to another...
Structure that represents the optional ICE support within an RTP engine.
Abstract JSON element (object, array, string, int, ...).
int ast_rtp_engine_load_format(struct ast_format *format)
Custom formats declared in codecs.conf at startup must be communicated to the rtp_engine so their mim...
int ast_rtp_codecs_payload_set_rx(struct ast_rtp_codecs *codecs, int code, struct ast_format *format)
Set a payload code for use with a specific Asterisk format.
static void update_peer(struct sip_peer *p, int expire)
Update peer data in database (if used)
void ast_rtp_instance_set_prop(struct ast_rtp_instance *instance, enum ast_rtp_property property, int value)
Set the value of an RTP instance property.
ast_media_type
Types of media.
double local_normdevjitter
int ast_rtp_instance_dtmf_end_with_duration(struct ast_rtp_instance *instance, char digit, unsigned int duration)
void ast_rtp_dtls_cfg_copy(const struct ast_rtp_dtls_cfg *src_cfg, struct ast_rtp_dtls_cfg *dst_cfg)
Copy contents of a DTLS configuration structure.
unsigned int primary_mapping
struct timeval when_retired
enum ast_media_type ast_rtp_codecs_get_stream_type(struct ast_rtp_codecs *codecs)
Determine the type of RTP stream media from the codecs mapped.
struct ast_rtp_instance * ast_rtp_instance_new(const char *engine_name, struct ast_sched_context *sched, const struct ast_sockaddr *sa, void *data)
Create a new RTP instance.
struct ast_rtp_glue * ast_rtp_instance_get_glue(const char *type)
Get the RTP glue that binds a channel to the RTP engine.
void ast_rtp_instance_early_bridge_make_compatible(struct ast_channel *c_dst, struct ast_channel *c_src)
Make two channels compatible for early bridging.
void ast_rtp_instance_update_source(struct ast_rtp_instance *instance)
Indicate that the RTP marker bit should be set on an RTP stream.
const char * ast_rtp_instance_get_cname(struct ast_rtp_instance *rtp)
Retrieve the CNAME used in RTCP SDES items.
struct ast_json * ast_rtp_convert_stats_json(const struct ast_rtp_instance_stats *stats)
Convert given stat instance into json format.
enum ast_rtp_extension ast_rtp_instance_extmap_get_extension(struct ast_rtp_instance *instance, int id)
Retrieve the extension for an RTP extension id.
void ast_rtp_codecs_payloads_set_m_type(struct ast_rtp_codecs *codecs, struct ast_rtp_instance *instance, int payload)
Record tx payload type information that was seen in an m= SDP line.
int ast_rtp_engine_register2(struct ast_rtp_engine *engine, struct ast_module *module)
Register an RTP engine.
int ast_rtp_instance_set_incoming_source_address(struct ast_rtp_instance *instance, const struct ast_sockaddr *address)
Set the incoming source address of the remote endpoint that we are sending RTP to.
void ast_rtp_instance_queue_report(struct ast_rtp_instance *instance)
Sends a SR/RR report the next time RTP would be sent.
void ast_rtp_instance_set_last_rx(struct ast_rtp_instance *rtp, time_t time)
Set the last RTP reception time.
int ast_rtp_instance_set_requested_target_address(struct ast_rtp_instance *instance, const struct ast_sockaddr *address)
Set the requested target address of the remote endpoint.
void ast_rtp_instance_reset_test_engine(struct ast_rtp_instance *instance)
Resets all the fields to default values for the test engine.
struct ast_frame * ast_rtp_instance_read(struct ast_rtp_instance *instance, int rtcp)
Receive a frame over RTP.
void ast_rtp_instance_get_incoming_source_address(struct ast_rtp_instance *instance, struct ast_sockaddr *address)
Get the incoming source address of the remote endpoint.
DTLS configuration structure.
struct ast_json * ast_rtp_instance_get_stats_all_json(struct ast_rtp_instance *instance)
Retrieve statistics about an RTP instance in json format.
int ast_rtp_instance_dtmf_end(struct ast_rtp_instance *instance, char digit)
Stop sending a DTMF digit.
uintmax_t ast_debug_category_rtcp_id(void)