summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-12-22 13:11:53 -0600
committerJoshua Colp <jcolp@digium.com>2018-04-25 15:58:24 -0300
commit661fec4b59117a48394dcbf31a149b0f32247c48 (patch)
tree7ca2785617196e67efdaed14efad418e72c1ce41 /include
parent1dedc7395143d7bd828213ef2327d1fd7777bf14 (diff)
core: Remove unused/incomplete SDP modules.
Change-Id: Icc28fbdc46f58e54a21554e6fe8b078f841b1f86
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/sdp.h703
-rw-r--r--include/asterisk/sdp_options.h774
-rw-r--r--include/asterisk/sdp_state.h345
-rw-r--r--include/asterisk/sdp_translator.h103
4 files changed, 0 insertions, 1925 deletions
diff --git a/include/asterisk/sdp.h b/include/asterisk/sdp.h
deleted file mode 100644
index 768469544..000000000
--- a/include/asterisk/sdp.h
+++ /dev/null
@@ -1,703 +0,0 @@
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2017, Digium, Inc.
- *
- * Mark Michelson <mmichelson@digium.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-
-/* NOTE: It is unlikely that you need to include this file. You probably will only need
- * this if you are an SDP translator, or if you are an inner part of the SDP API
- */
-
-#ifndef _SDP_PRIV_H
-#define _SDP_PRIV_H
-
-#include "asterisk/vector.h"
-#include "asterisk/format.h"
-#include "asterisk/sdp_state.h"
-#include "asterisk/stream.h"
-
-/*!
- * \brief Structure representing an SDP Attribute
- */
-struct ast_sdp_a_line {
- /*! Attribute name */
- char *name;
- /*! Attribute value. For attributes that have no value, this will be an empty string */
- char *value;
-};
-
-/*!
- * \brief A collection of SDP Attributes
- */
-AST_VECTOR(ast_sdp_a_lines, struct ast_sdp_a_line *);
-
-/*!
- * \brief Structure representing an SDP Connection
- */
-struct ast_sdp_c_line {
- /* IP family string (e.g. IP4 or IP6) */
- char *address_type;
- /* Connection address. Can be an IP address or FQDN */
- char *address;
-};
-
-/*!
- * \brief Structre representing SDP Media Payloads
- */
-struct ast_sdp_payload {
- /* Media format description */
- char *fmt;
-};
-
-/*!
- * \brief A collection of SDP Media Payloads
- */
-AST_VECTOR(ast_sdp_payloads, struct ast_sdp_payload *);
-
-/*!
- * \brief Structure representing an SDP Media Stream
- *
- * This contains both the m line, as well as its
- * constituent a lines.
- */
-struct ast_sdp_m_line {
- /*! Media type (e.g. "audio" or "video") */
- char *type;
- /*! RTP profile string (e.g. "RTP/AVP") */
- char *proto;
- /*! Port number in m line */
- uint16_t port;
- /*! Number of ports specified in m line */
- uint16_t port_count;
- /*! RTP payloads */
- struct ast_sdp_payloads *payloads;
- /*! Connection information for this media stream */
- struct ast_sdp_c_line *c_line;
- /*! The attributes for this media stream */
- struct ast_sdp_a_lines *a_lines;
-};
-
-/*!
- * \brief A collection of SDP Media Streams
- */
-AST_VECTOR(ast_sdp_m_lines, struct ast_sdp_m_line *);
-
-/*!
- * \brief Structure representing an SDP Origin
- */
-struct ast_sdp_o_line {
- /*! Origin user name */
- char *username;
- /*! Origin id */
- uint64_t session_id;
- /*! Origin version */
- uint64_t session_version;
- /*! Origin IP address type (e.g. "IP4" or "IP6") */
- char *address_type;
- /*! Origin address. Can be an IP address or FQDN */
- char *address;
-};
-
-/*!
- * \brief Structure representing an SDP Session Name
- */
-struct ast_sdp_s_line {
- /* Session Name */
- char *session_name;
-};
-
-/*!
- * \brief Structure representing SDP Timing
- */
-struct ast_sdp_t_line {
- /*! Session start time */
- uint64_t start_time;
- /*! Session end time */
- uint64_t stop_time;
-};
-
-/*!
- * \brief An SDP
- */
-struct ast_sdp {
- /*! SDP Origin line */
- struct ast_sdp_o_line *o_line;
- /*! SDP Session name */
- struct ast_sdp_s_line *s_line;
- /*! SDP top-level connection information */
- struct ast_sdp_c_line *c_line;
- /*! SDP timing information */
- struct ast_sdp_t_line *t_line;
- /*! SDP top-level attributes */
- struct ast_sdp_a_lines *a_lines;
- /*! SDP media streams */
- struct ast_sdp_m_lines *m_lines;
-};
-
-/*!
- * \brief A structure representing an SDP rtpmap attribute
- */
-struct ast_sdp_rtpmap {
- /*! The RTP payload number for the rtpmap */
- int payload;
- /*! The Name of the codec */
- char *encoding_name;
- /*! The clock rate of the codec */
- int clock_rate;
- /*! Optional encoding parameters */
- char *encoding_parameters;
- /*! Area where strings are stored */
- char buf[0];
-};
-
-/*!
- * \brief Free an SDP Attribute
- *
- * \param a_line The attribute to free
- *
- * \since 15
- */
-void ast_sdp_a_free(struct ast_sdp_a_line *a_line);
-
-/*!
- * \brief Free an SDP Attribute collection
- *
- * \param a_lines The attribute collection to free
- *
- * \since 15
- */
-void ast_sdp_a_lines_free(struct ast_sdp_a_lines *a_lines);
-
-/*!
- * \brief Free SDP Connection Data
- *
- * \param c_line The connection data to free
- *
- * \since 15
- */
-void ast_sdp_c_free(struct ast_sdp_c_line *c_line);
-
-/*!
- * \brief Free an SDP Media Description Payload
- *
- * \param payload The payload to free
- *
- * \since 15
- */
-void ast_sdp_payload_free(struct ast_sdp_payload *payload);
-
-/*!
- * \brief Free an SDP Media Description Payload collection
- *
- * \param payloads collection to free
- *
- * \since 15
- */
-void ast_sdp_payloads_free(struct ast_sdp_payloads *payloads);
-
-/*!
- * \brief Free an SDP Media Description
- * Frees the media description and all resources it contains
- *
- * \param m_line The media description to free
- *
- * \since 15
- */
-void ast_sdp_m_free(struct ast_sdp_m_line *m_line);
-
-/*!
- * \brief Free an SDP Media Description collection
- *
- * \param m_lines The collection description to free
- *
- * \since 15
- */
-void ast_sdp_m_lines_free(struct ast_sdp_m_lines *m_lines);
-
-/*!
- * \brief Free an SDP Origin
- *
- * \param o_line The origin description to free
- *
- * \since 15
- */
-void ast_sdp_o_free(struct ast_sdp_o_line *o_line);
-
-/*!
- * \brief Free an SDP Session
- *
- * \param s_line The session to free
- *
- * \since 15
- */
-void ast_sdp_s_free(struct ast_sdp_s_line *s_line);
-
-/*!
- * \brief Free SDP Timing
- *
- * \param t_line The timing description to free
- *
- * \since 15
- */
-void ast_sdp_t_free(struct ast_sdp_t_line *t_line);
-
-/*!
- * \brief Allocate an SDP Attribute
- *
- * \param name Attribute Name
- * \param value Attribute Name
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_a_line *ast_sdp_a_alloc(const char *name, const char *value);
-
-/*!
- * \brief Allocate an SDP Connection
- *
- * \param family Family ("IN", etc)
- * \param addr Address
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_c_line *ast_sdp_c_alloc(const char *family, const char *addr);
-
-/*!
- * \brief Allocate an SDP Media Description Payload
- *
- * \param fmt The media format description
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_payload *ast_sdp_payload_alloc(const char *fmt);
-
-/*!
- * \brief Allocate an SDP Media Description
- *
- * \param type ("audio", "video", etc)
- * \param port Starting port
- * \param port_count Port pairs to allocate
- * \param proto ("RTP/AVP", "RTP/SAVP", "udp")
- * \param c_line Connection to add. May be NULL
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_m_line *ast_sdp_m_alloc(const char *type, uint16_t port,
- uint16_t port_count, const char *proto, struct ast_sdp_c_line *c_line);
-
-/*!
- * \brief Allocate an SDP Session
- *
- * \param session_name The session name
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_s_line *ast_sdp_s_alloc(const char *session_name);
-
-/*!
- * \brief Allocate SDP Timing
- *
- * \param start_time (Seconds since 1900)
- * \param end_time (Seconds since 1900)
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_t_line *ast_sdp_t_alloc(uint64_t start_time, uint64_t stop_time);
-
-/*!
- * \brief Allocate an SDP Origin
- *
- * \param username User name
- * \param sesison_id Session ID
- * \param sesison_version Session Version
- * \param address_type Address type ("IN4", "IN6", etc)
- * \param address Unicast address
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_o_line *ast_sdp_o_alloc(const char *username, uint64_t session_id,
- uint64_t session_version, const char *address_type, const char *address);
-
-/*!
- * \brief Add an SDP Attribute to an SDP
- *
- * \param sdp SDP
- * \param a_line Attribute
- *
- * \retval 0 Success
- * \retval non-0 Failure
- *
- * \since 15
- */
-int ast_sdp_add_a(struct ast_sdp *sdp, struct ast_sdp_a_line *a_line);
-
-/*!
- * \brief Get the count of Attributes on an SDP
- *
- * \param sdp SDP
- *
- * \returns Number of Attributes
- *
- * \since 15
- */
-int ast_sdp_get_a_count(const struct ast_sdp *sdp);
-
-/*!
- * \brief Get an Attribute from an SDP
- *
- * \param sdp SDP
- * \param index Attribute index
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_a_line *ast_sdp_get_a(const struct ast_sdp *sdp, int index);
-
-/*!
- * \brief Add a Media Description to an SDP
- *
- * \param sdp SDP
- * \param m_line Media Description
- *
- * \retval 0 Success
- * \retval non-0 Failure
- *
- * \since 15
- */
-int ast_sdp_add_m(struct ast_sdp *sdp, struct ast_sdp_m_line *m_line);
-
-/*!
- * \brief Add an RTP Media Description to an SDP
- *
- * \param sdp SDP
- * \param sdp_state SDP state information
- * \param options SDP Options
- * \param stream_index stream
- *
- * \retval 0 Success
- * \retval non-0 Failure
- *
- * \since 15
- */
-int ast_sdp_add_m_from_rtp_stream(struct ast_sdp *sdp, const struct ast_sdp_state *sdp_state,
- const struct ast_sdp_options *options, int stream_index);
-
-/*!
- * \brief Get the count of Media Descriptions on an SDP
- *
- * \param sdp SDP
- *
- * \returns The number of Media Descriptions
- *
- * \since 15
- */
-int ast_sdp_get_m_count(const struct ast_sdp *sdp);
-
-/*!
- * \brief Get a Media Descriptions from an SDP
- *
- * \param sdp SDP
- * \param index Media Description index
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_m_line *ast_sdp_get_m(const struct ast_sdp *sdp, int index);
-
-/*!
- * \brief Add an SDP Attribute to a Media Description
- *
- * \param m_line Media Description
- * \param a_line Attribute
- *
- * \retval 0 Success
- * \retval non-0 Failure
- *
- * \since 15
- */
-int ast_sdp_m_add_a(struct ast_sdp_m_line *m_line, struct ast_sdp_a_line *a_line);
-
-/*!
- * \brief Get the count of Attributes on a Media Description
- *
- * \param m_line Media Description
- *
- * \returns Number of Attributes
- *
- * \since 15
- */
-int ast_sdp_m_get_a_count(const struct ast_sdp_m_line *m_line);
-
-/*!
- * \brief Get an Attribute from a Media Description
- *
- * \param m_line Media Description
- * \param index Attribute index
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_a_line *ast_sdp_m_get_a(const struct ast_sdp_m_line *m_line, int index);
-
-/*!
- * \brief Add a Payload to a Media Description
- *
- * \param m_line Media Description
- * \param payload Payload
- *
- * \retval 0 Success
- * \retval non-0 Failure
- *
- * \since 15
- */
-int ast_sdp_m_add_payload(struct ast_sdp_m_line *m_line,
- struct ast_sdp_payload *payload);
-
-/*!
- * \brief Get the count of Payloads on a Media Description
- *
- * \param m_line Media Description
- *
- * \returns Number of Attributes
- *
- * \since 15
- */
-int ast_sdp_m_get_payload_count(const struct ast_sdp_m_line *m_line);
-
-/*!
- * \brief Get a Payload from a Media Description
- *
- * \param m_line Media Description
- * \param index Payload index
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp_payload *ast_sdp_m_get_payload(const struct ast_sdp_m_line *m_line, int index);
-
-/*!
- * \brief Add a Format to a Media Description
- *
- * \param m_line Media Description
- * \param options SDP Options
- * \param rtp_code rtp_code from ast_rtp_codecs_payload_code
- * \param asterisk_format True if the value in format is to be used.
- * \param format Format
- * \param code from AST_RTP list
- *
- * \retval 0 Success
- * \retval non-0 Failure
- *
- * \since 15
- */
-int ast_sdp_m_add_format(struct ast_sdp_m_line *m_line, const struct ast_sdp_options *options,
- int rtp_code, int asterisk_format, const struct ast_format *format, int code);
-
-/*!
- * \brief Create an SDP ao2 object
- *
- * \param o_line Origin
- * \param c_line Connection
- * \param s_line Session
- * \param t_line Timing
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \since 15
- */
-struct ast_sdp *ast_sdp_alloc(struct ast_sdp_o_line *o_line,
- struct ast_sdp_c_line *c_line, struct ast_sdp_s_line *s_line,
- struct ast_sdp_t_line *t_line);
-
-/*!
- * \brief Find the first attribute match index in the top-level SDP
- *
- * \note This will not search within streams for the given attribute.
- *
- * \param sdp The SDP in which to search
- * \param attr_name The name of the attribute to search for
- * \param payload Optional payload number to search for. If irrelevant, set to -1
- *
- * \retval index of attribute line on success.
- * \retval -1 on failure or not found.
- *
- * \since 15.0.0
- */
-int ast_sdp_find_a_first(const struct ast_sdp *sdp, const char *attr_name, int payload);
-
-/*!
- * \brief Find the next attribute match index in the top-level SDP
- *
- * \note This will not search within streams for the given attribute.
- *
- * \param sdp The SDP in which to search
- * \param last The last matching index found
- * \param attr_name The name of the attribute to search for
- * \param payload Optional payload number to search for. If irrelevant, set to -1
- *
- * \retval index of attribute line on success.
- * \retval -1 on failure or not found.
- *
- * \since 15.0.0
- */
-int ast_sdp_find_a_next(const struct ast_sdp *sdp, int last, const char *attr_name, int payload);
-
-/*!
- * \brief Find an attribute in the top-level SDP
- *
- * \note This will not search within streams for the given attribute.
- *
- * \param sdp The SDP in which to search
- * \param attr_name The name of the attribute to search for
- * \param payload Optional payload number to search for. If irrelevant, set to -1
- *
- * \retval NULL Could not find the given attribute
- * \retval Non-NULL The attribute to find
- *
- * \since 15.0.0
- */
-struct ast_sdp_a_line *ast_sdp_find_attribute(const struct ast_sdp *sdp,
- const char *attr_name, int payload);
-
-/*!
- * \brief Find the first attribute match index in an SDP stream (m-line)
- *
- * \param m_line The SDP m-line in which to search
- * \param attr_name The name of the attribute to search for
- * \param payload Optional payload number to search for. If irrelevant, set to -1
- *
- * \retval index of attribute line on success.
- * \retval -1 on failure or not found.
- *
- * \since 15.0.0
- */
-int ast_sdp_m_find_a_first(const struct ast_sdp_m_line *m_line, const char *attr_name,
- int payload);
-
-/*!
- * \brief Find the next attribute match index in an SDP stream (m-line)
- *
- * \param m_line The SDP m-line in which to search
- * \param last The last matching index found
- * \param attr_name The name of the attribute to search for
- * \param payload Optional payload number to search for. If irrelevant, set to -1
- *
- * \retval index of attribute line on success.
- * \retval -1 on failure or not found.
- *
- * \since 15.0.0
- */
-int ast_sdp_m_find_a_next(const struct ast_sdp_m_line *m_line, int last,
- const char *attr_name, int payload);
-
-/*!
- * \brief Find an attribute in an SDP stream (m-line)
- *
- * \param m_line The SDP m-line in which to search
- * \param attr_name The name of the attribute to search for
- * \param payload Optional payload number to search for. If irrelevant, set to -1
- *
- * \retval NULL Could not find the given attribute
- * \retval Non-NULL The attribute to find
- *
- * \since 15.0.0
- */
-struct ast_sdp_a_line *ast_sdp_m_find_attribute(const struct ast_sdp_m_line *m_line,
- const char *attr_name, int payload);
-
-/*!
- * \brief Convert an SDP a_line into an rtpmap
- *
- * The returned value is heap-allocated and must be freed with
- * ast_sdp_rtpmap_free()
- *
- * \param a_line The SDP a_line to convert
- *
- * \retval NULL Fail
- * \retval non-NULL Success
- *
- * \since 15.0.0
- */
-struct ast_sdp_rtpmap *ast_sdp_a_get_rtpmap(const struct ast_sdp_a_line *a_line);
-
-
-/*!
- * \brief Allocate a new SDP rtpmap
- *
- * \param payload The RTP payload number
- * \param encoding_name The human-readable name for the codec
- * \param clock_rate The rate of the codec, in cycles per second
- * \param encoding_parameters Optional codec-specific parameters (such as number of channels)
- *
- * \retval NULL Fail
- * \retval non-NULL Success
- *
- * \since 15.0.0
- */
-struct ast_sdp_rtpmap *ast_sdp_rtpmap_alloc(int payload, const char *encoding_name,
- int clock_rate, const char *encoding_parameters);
-
-/*!
- * \brief Free an SDP rtpmap
- *
- * \since 15.0.0
- */
-void ast_sdp_rtpmap_free(struct ast_sdp_rtpmap *rtpmap);
-
-/*!
- * \brief Turn an SDP into a stream topology
- *
- * This traverses the m-lines of the SDP and creates a stream topology, with
- * each m-line corresponding to a stream in the created topology.
- *
- * \param sdp The SDP to convert
- * \param g726_non_standard Non-zero if G.726 is non-standard
- *
- * \retval NULL An error occurred when converting
- * \retval non-NULL The generated stream topology
- *
- * \since 15.0.0
- */
-struct ast_stream_topology *ast_get_topology_from_sdp(const struct ast_sdp *sdp, int g726_non_standard);
-#endif /* _SDP_PRIV_H */
diff --git a/include/asterisk/sdp_options.h b/include/asterisk/sdp_options.h
deleted file mode 100644
index e45ae8cb1..000000000
--- a/include/asterisk/sdp_options.h
+++ /dev/null
@@ -1,774 +0,0 @@
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2017, Digium, Inc.
- *
- * Mark Michelson <mmichelson@digium.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-
-#ifndef _ASTERISK_SDP_OPTIONS_H
-#define _ASTERISK_SDP_OPTIONS_H
-
-#include "asterisk/udptl.h"
-#include "asterisk/format_cap.h"
-
-struct ast_sdp_options;
-
-/*!
- * \brief SDP DTMF mode options
- */
-enum ast_sdp_options_dtmf {
- /*! No DTMF to be used */
- AST_SDP_DTMF_NONE,
- /*! Use RFC 4733 events for DTMF */
- AST_SDP_DTMF_RFC_4733,
- /*! Use DTMF in the audio stream */
- AST_SDP_DTMF_INBAND,
- /*! Use SIP 4733 if supported by the other side or INBAND if not */
- AST_SDP_DTMF_AUTO,
-};
-
-/*!
- * \brief ICE options
- *
- * This is an enum because it will support a TRICKLE-ICE option
- * in the future.
- */
-enum ast_sdp_options_ice {
- /*! ICE is not enabled on this session */
- AST_SDP_ICE_DISABLED,
- /*! Standard ICE is enabled on this session */
- AST_SDP_ICE_ENABLED_STANDARD,
-};
-
-/*!
- * \brief Implementation of the SDP
- *
- * Users of the SDP API set the implementation based on what they
- * natively handle. This indicates the type of SDP that the API expects
- * when being given an SDP, and it indicates the type of SDP that the API
- * returns when asked for one.
- */
-enum ast_sdp_options_impl {
- /*! SDP is represented as a string */
- AST_SDP_IMPL_STRING,
- /*! SDP is represented as a pjmedia_sdp_session */
- AST_SDP_IMPL_PJMEDIA,
- /*! End of the list */
- AST_SDP_IMPL_END,
-};
-
-/*!
- * \brief SDP encryption options
- */
-enum ast_sdp_options_encryption {
- /*! No encryption */
- AST_SDP_ENCRYPTION_DISABLED,
- /*! SRTP SDES encryption */
- AST_SDP_ENCRYPTION_SRTP_SDES,
- /*! DTLS encryption */
- AST_SDP_ENCRYPTION_DTLS,
-};
-
-/*!
- * \brief Callback when processing an offer SDP for our answer SDP.
- * \since 15.0.0
- *
- * \details
- * This callback is called after merging our last negotiated topology
- * with the remote's offer topology and before we have sent our answer
- * SDP. At this point you can alter new_topology streams. You can
- * decline, remove formats, or rename streams. Changing anything else
- * on the streams is likely to not end well.
- *
- * * To decline a stream simply set the stream state to
- * AST_STREAM_STATE_REMOVED. You could implement a maximum number
- * of active streams of a given type policy.
- *
- * * To remove formats use the format API to remove any formats from a
- * stream. The streams have the current joint negotiated formats.
- * Most likely you would want to remove all but the first format.
- *
- * * To rename a stream you need to clone the stream and give it a
- * new name and then set it in new_topology using
- * ast_stream_topology_set_stream().
- *
- * \note Removing all formats is an error. You should decline the
- * stream instead.
- *
- * \param context User supplied context data pointer for the SDP
- * state.
- * \param old_topology Active negotiated topology. NULL if this is
- * the first SDP negotiation. The old topology is available so you
- * can tell if any streams are new or changing type.
- * \param new_topology New negotiated topology that we intend to
- * generate the answer SDP.
- *
- * \return Nothing
- */
-typedef void (*ast_sdp_answerer_modify_cb)(void *context,
- const struct ast_stream_topology *old_topology,
- struct ast_stream_topology *new_topology);
-
-/*!
- * \internal
- * \brief Callback when generating a topology for our SDP offer.
- * \since 15.0.0
- *
- * \details
- * This callback is called after merging any topology updates from the
- * system by ast_sdp_state_update_local_topology() and before we have
- * sent our offer SDP. At this point you can alter new_topology
- * streams. You can decline, add/remove/update formats, or rename
- * streams. Changing anything else on the streams is likely to not
- * end well.
- *
- * * To decline a stream simply set the stream state to
- * AST_STREAM_STATE_REMOVED. You could implement a maximum number
- * of active streams of a given type policy.
- *
- * * To update formats use the format API to change formats of the
- * streams. The streams have the current proposed formats. You
- * could do whatever you want for formats but you should stay within
- * the configured formats for the stream type's endpoint. However,
- * you should use ast_sdp_state_update_local_topology() instead of
- * this backdoor method.
- *
- * * To rename a stream you need to clone the stream and give it a
- * new name and then set it in new_topology using
- * ast_stream_topology_set_stream().
- *
- * \note Removing all formats is an error. You should decline the
- * stream instead.
- *
- * \note Declined new streams that are in slots higher than present in
- * old_topology are removed so the SDP can be smaller. The remote has
- * never seen those slots so we shouldn't bother keeping them.
- *
- * \param context User supplied context data pointer for the SDP
- * state.
- * \param old_topology Active negotiated topology. NULL if this is
- * the first SDP negotiation. The old topology is available so you
- * can tell if any streams are new or changing type.
- * \param new_topology Merged topology that we intend to generate the
- * offer SDP.
- *
- * \return Nothing
- */
-typedef void (*ast_sdp_offerer_modify_cb)(void *context,
- const struct ast_stream_topology *old_topology,
- struct ast_stream_topology *new_topology);
-
-/*!
- * \brief Callback when generating an offer SDP to configure extra stream data.
- * \since 15.0.0
- *
- * \details
- * This callback is called after any ast_sdp_offerer_modify_cb
- * callback and before we have sent our offer SDP. The callback can
- * call several SDP API calls to configure the proposed capabilities
- * of streams before we create the SDP offer. For example, the
- * callback could configure a stream specific connection address, T.38
- * parameters, RTP instance, or UDPTL instance parameters.
- *
- * \param context User supplied context data pointer for the SDP
- * state.
- * \param topology Topology ready to configure extra stream options.
- *
- * \return Nothing
- */
-typedef void (*ast_sdp_offerer_config_cb)(void *context, const struct ast_stream_topology *topology);
-
-/*!
- * \brief Callback before applying a topology.
- * \since 15.0.0
- *
- * \details
- * This callback is called before the topology is applied so the
- * using module can do what is necessary before the topology becomes
- * active.
- *
- * \param context User supplied context data pointer for the SDP
- * state.
- * \param topology Topology ready to be applied.
- *
- * \return Nothing
- */
-typedef void (*ast_sdp_preapply_cb)(void *context, const struct ast_stream_topology *topology);
-
-/*!
- * \brief Callback after applying a topology.
- * \since 15.0.0
- *
- * \details
- * This callback is called after the topology is applied so the
- * using module can do what is necessary after the topology becomes
- * active.
- *
- * \param context User supplied context data pointer for the SDP
- * state.
- * \param topology Topology already applied.
- *
- * \return Nothing
- */
-typedef void (*ast_sdp_postapply_cb)(void *context, const struct ast_stream_topology *topology);
-
-/*!
- * \since 15.0.0
- * \brief Allocate a new SDP options structure.
- *
- * This will heap-allocate an SDP options structure and
- * initialize it to a set of default values.
- *
- * \retval NULL Allocation failure
- * \retval non-NULL Newly allocated SDP options
- */
-struct ast_sdp_options *ast_sdp_options_alloc(void);
-
-/*!
- * \since 15.0.0
- * \brief Free an SDP options structure.
- *
- * \note This only needs to be called if an error occurs between
- * options allocation and a call to ast_sdp_state_alloc()
- * Otherwise, the SDP state will take care of freeing the
- * options for you.
- *
- * \param options The options to free
- */
-void ast_sdp_options_free(struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options media_address
- *
- * \param options SDP Options
- * \param media_address
- */
-void ast_sdp_options_set_media_address(struct ast_sdp_options *options,
- const char *media_address);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options media_address
- *
- * \param options SDP Options
- *
- * \returns media_address
- */
-const char *ast_sdp_options_get_media_address(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options interface_address
- *
- * \param options SDP Options
- * \param interface_address
- */
-void ast_sdp_options_set_interface_address(struct ast_sdp_options *options,
- const char *interface_address);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options interface_address
- *
- * \param options SDP Options
- *
- * \returns interface_address
- */
-const char *ast_sdp_options_get_interface_address(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options sdpowner
- *
- * \param options SDP Options
- * \param sdpowner
- */
-void ast_sdp_options_set_sdpowner(struct ast_sdp_options *options,
- const char *sdpowner);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options sdpowner
- *
- * \param options SDP Options
- *
- * \returns sdpowner
- */
-const char *ast_sdp_options_get_sdpowner(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options sdpsession
- *
- * \param options SDP Options
- * \param sdpsession
- */
-void ast_sdp_options_set_sdpsession(struct ast_sdp_options *options,
- const char *sdpsession);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options sdpsession
- *
- * \param options SDP Options
- *
- * \returns sdpsession
- */
-const char *ast_sdp_options_get_sdpsession(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options rtp_engine
- *
- * \param options SDP Options
- * \param rtp_engine
- */
-void ast_sdp_options_set_rtp_engine(struct ast_sdp_options *options,
- const char *rtp_engine);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options rtp_engine
- *
- * \param options SDP Options
- *
- * \returns rtp_engine
- */
-const char *ast_sdp_options_get_rtp_engine(const struct ast_sdp_options *options);
-
-void ast_sdp_options_set_state_context(struct ast_sdp_options *options, void *state_context);
-void *ast_sdp_options_get_state_context(const struct ast_sdp_options *options);
-
-void ast_sdp_options_set_answerer_modify_cb(struct ast_sdp_options *options, ast_sdp_answerer_modify_cb answerer_modify_cb);
-ast_sdp_answerer_modify_cb ast_sdp_options_get_answerer_modify_cb(const struct ast_sdp_options *options);
-
-void ast_sdp_options_set_offerer_modify_cb(struct ast_sdp_options *options, ast_sdp_offerer_modify_cb offerer_modify_cb);
-ast_sdp_offerer_modify_cb ast_sdp_options_get_offerer_modify_cb(const struct ast_sdp_options *options);
-
-void ast_sdp_options_set_offerer_config_cb(struct ast_sdp_options *options, ast_sdp_offerer_config_cb offerer_config_cb);
-ast_sdp_offerer_config_cb ast_sdp_options_get_offerer_config_cb(const struct ast_sdp_options *options);
-
-void ast_sdp_options_set_preapply_cb(struct ast_sdp_options *options, ast_sdp_preapply_cb preapply_cb);
-ast_sdp_preapply_cb ast_sdp_options_get_preapply_cb(const struct ast_sdp_options *options);
-
-void ast_sdp_options_set_postapply_cb(struct ast_sdp_options *options, ast_sdp_postapply_cb postapply_cb);
-ast_sdp_postapply_cb ast_sdp_options_get_postapply_cb(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options rtp_symmetric
- *
- * \param options SDP Options
- * \param rtp_symmetric
- */
-void ast_sdp_options_set_rtp_symmetric(struct ast_sdp_options *options,
- unsigned int rtp_symmetric);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options rtp_symmetric
- *
- * \param options SDP Options
- *
- * \returns rtp_symmetric
- */
-unsigned int ast_sdp_options_get_rtp_symmetric(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options rtp_ipv6
- *
- * \param options SDP Options
- * \param rtp_ipv6
- */
-void ast_sdp_options_set_rtp_ipv6(struct ast_sdp_options *options,
- unsigned int rtp_ipv6);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options rtp_ipv6
- *
- * \param options SDP Options
- *
- * \returns rtp_ipv6
- */
-unsigned int ast_sdp_options_get_rtp_ipv6(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options g726_non_standard
- *
- * \param options SDP Options
- * \param g726_non_standard
- */
-void ast_sdp_options_set_g726_non_standard(struct ast_sdp_options *options,
- unsigned int g726_non_standard);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options g726_non_standard
- *
- * \param options SDP Options
- *
- * \returns g726_non_standard
- */
-unsigned int ast_sdp_options_get_g726_non_standard(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options tos_audio
- *
- * \param options SDP Options
- * \param tos_audio
- */
-void ast_sdp_options_set_tos_audio(struct ast_sdp_options *options,
- unsigned int tos_audio);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options tos_audio
- *
- * \param options SDP Options
- *
- * \returns tos_audio
- */
-unsigned int ast_sdp_options_get_tos_audio(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options cos_audio
- *
- * \param options SDP Options
- * \param cos_audio
- */
-void ast_sdp_options_set_cos_audio(struct ast_sdp_options *options,
- unsigned int cos_audio);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options cos_audio
- *
- * \param options SDP Options
- *
- * \returns cos_audio
- */
-unsigned int ast_sdp_options_get_cos_audio(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options tos_video
- *
- * \param options SDP Options
- * \param tos_video
- */
-void ast_sdp_options_set_tos_video(struct ast_sdp_options *options,
- unsigned int tos_video);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options tos_video
- *
- * \param options SDP Options
- *
- * \returns tos_video
- */
-unsigned int ast_sdp_options_get_tos_video(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options cos_video
- *
- * \param options SDP Options
- * \param cos_video
- */
-void ast_sdp_options_set_cos_video(struct ast_sdp_options *options,
- unsigned int cos_video);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options cos_video
- *
- * \param options SDP Options
- *
- * \returns cos_video
- */
-unsigned int ast_sdp_options_get_cos_video(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options dtmf
- *
- * \param options SDP Options
- * \param dtmf
- */
-void ast_sdp_options_set_dtmf(struct ast_sdp_options *options,
- enum ast_sdp_options_dtmf dtmf);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options dtmf
- *
- * \param options SDP Options
- *
- * \returns dtmf
- */
-enum ast_sdp_options_dtmf ast_sdp_options_get_dtmf(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options ice
- *
- * \param options SDP Options
- * \param ice
- */
-void ast_sdp_options_set_ice(struct ast_sdp_options *options,
- enum ast_sdp_options_ice ice);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options ice
- *
- * \param options SDP Options
- *
- * \returns ice
- */
-enum ast_sdp_options_ice ast_sdp_options_get_ice(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options impl
- *
- * \param options SDP Options
- * \param impl
- */
-void ast_sdp_options_set_impl(struct ast_sdp_options *options,
- enum ast_sdp_options_impl impl);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options impl
- *
- * \param options SDP Options
- *
- * \returns impl
- */
-enum ast_sdp_options_impl ast_sdp_options_get_impl(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options encryption
- *
- * \param options SDP Options
- * \param encryption
- */
-void ast_sdp_options_set_encryption(struct ast_sdp_options *options,
- enum ast_sdp_options_encryption encryption);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options encryption
- *
- * \param options SDP Options
- *
- * \returns encryption
- */
-enum ast_sdp_options_encryption ast_sdp_options_get_encryption(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options RTCP MUX
- *
- * \param options SDP Options
- *
- * \returns Boolean indicating if RTCP MUX is enabled.
- */
-unsigned int ast_sdp_options_get_rtcp_mux(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options RTCP MUX
- *
- * \param options SDP Options
- * \param value Boolean that indicates if RTCP MUX should be enabled.
- */
-void ast_sdp_options_set_rtcp_mux(struct ast_sdp_options *options, unsigned int value);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options udptl_symmetric
- *
- * \param options SDP Options
- * \param udptl_symmetric
- */
-void ast_sdp_options_set_udptl_symmetric(struct ast_sdp_options *options,
- unsigned int udptl_symmetric);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options udptl_symmetric
- *
- * \param options SDP Options
- *
- * \returns udptl_symmetric
- */
-unsigned int ast_sdp_options_get_udptl_symmetric(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options udptl_error_correction
- *
- * \param options SDP Options
- * \param error_correction
- */
-void ast_sdp_options_set_udptl_error_correction(struct ast_sdp_options *options,
- enum ast_t38_ec_modes error_correction);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options udptl_error_correction
- *
- * \param options SDP Options
- *
- * \returns udptl_error_correction
- */
-enum ast_t38_ec_modes ast_sdp_options_get_udptl_error_correction(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options udptl_far_max_datagram
- *
- * \param options SDP Options
- * \param far_max_datagram
- */
-void ast_sdp_options_set_udptl_far_max_datagram(struct ast_sdp_options *options,
- unsigned int far_max_datagram);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options udptl_far_max_datagram
- *
- * \param options SDP Options
- *
- * \returns udptl_far_max_datagram
- */
-unsigned int ast_sdp_options_get_udptl_far_max_datagram(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Set SDP Options max_streams
- *
- * \param options SDP Options
- * \param max_streams
- */
-void ast_sdp_options_set_max_streams(struct ast_sdp_options *options,
- unsigned int max_streams);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options max_streams
- *
- * \param options SDP Options
- *
- * \returns max_streams
- */
-unsigned int ast_sdp_options_get_max_streams(const struct ast_sdp_options *options);
-
-/*!
- * \since 15.0.0
- * \brief Enable setting SSRC level attributes on SDPs
- *
- * \param options SDP Options
- * \param ssrc Boolean indicating if SSRC attributes should be included in generated SDPs
- */
-void ast_sdp_options_set_ssrc(struct ast_sdp_options *options, unsigned int ssrc);
-
-/*!
- * \since 15.0.0
- * \brief Get SDP Options ssrc
- *
- * \param options SDP Options
- *
- * \returns Whether SSRC-level attributes will be added to our SDP.
- */
-unsigned int ast_sdp_options_get_ssrc(const struct ast_sdp_options *options);
-
-/*!
- * \brief Set the SDP options scheduler context used to create new streams of the type.
- * \since 15.0.0
- *
- * \param options SDP Options
- * \param type Media type the scheduler context is for.
- * \param sched Scheduler context to use for the specified media type.
- *
- * \return Nothing
- */
-void ast_sdp_options_set_sched_type(struct ast_sdp_options *options,
- enum ast_media_type type, struct ast_sched_context *sched);
-
-/*!
- * \brief Get the SDP options scheduler context used to create new streams of the type.
- * \since 15.0.0
- *
- * \param options SDP Options
- * \param type Media type the format cap represents.
- *
- * \return The stored scheduler context to create new streams of the type.
- */
-struct ast_sched_context *ast_sdp_options_get_sched_type(const struct ast_sdp_options *options,
- enum ast_media_type type);
-
-/*!
- * \brief Set all allowed stream types to create new streams.
- * \since 15.0.0
- *
- * \param options SDP Options
- * \param cap Format capabilities to set all allowed stream types at once.
- * Could be NULL to disable creating any new streams.
- *
- * \return Nothing
- */
-void ast_sdp_options_set_format_caps(struct ast_sdp_options *options,
- struct ast_format_cap *cap);
-
-/*!
- * \brief Set the SDP options format cap used to create new streams of the type.
- * \since 15.0.0
- *
- * \param options SDP Options
- * \param type Media type the format cap represents.
- * \param cap Format capabilities to use for the specified media type.
- * Could be NULL to disable creating new streams of type.
- *
- * \return Nothing
- */
-void ast_sdp_options_set_format_cap_type(struct ast_sdp_options *options,
- enum ast_media_type type, struct ast_format_cap *cap);
-
-/*!
- * \brief Get the SDP options format cap used to create new streams of the type.
- * \since 15.0.0
- *
- * \param options SDP Options
- * \param type Media type the format cap represents.
- *
- * \retval NULL if stream not allowed to be created.
- * \retval cap to use in negotiating the new stream.
- *
- * \note The returned cap does not have its own ao2 ref.
- */
-struct ast_format_cap *ast_sdp_options_get_format_cap_type(const struct ast_sdp_options *options,
- enum ast_media_type type);
-
-#endif /* _ASTERISK_SDP_OPTIONS_H */
diff --git a/include/asterisk/sdp_state.h b/include/asterisk/sdp_state.h
deleted file mode 100644
index ec9d502e2..000000000
--- a/include/asterisk/sdp_state.h
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2017, Digium, Inc.
- *
- * Mark Michelson <mmichelson@digium.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-
-#ifndef _ASTERISK_SDP_STATE_H
-#define _ASTERISK_SDP_STATE_H
-
-#include "asterisk/stream.h"
-#include "asterisk/sdp_options.h"
-
-struct ast_sdp_state;
-struct ast_sockaddr;
-struct ast_udptl;
-struct ast_control_t38_parameters;
-
-/*!
- * \brief Allocate a new SDP state
- *
- * \details
- * SDP state keeps tabs on everything SDP-related for a media session.
- * Most SDP operations will require the state to be provided.
- * Ownership of the SDP options is taken on by the SDP state.
- * A good strategy is to call this during session creation.
- *
- * \param topology Initial stream topology to offer.
- * NULL if we are going to be the answerer. We can always
- * update the local topology later if it turns out we need
- * to be the offerer.
- * \param options SDP options for the duration of the session.
- *
- * \retval SDP state struct
- * \retval NULL on failure
- */
-struct ast_sdp_state *ast_sdp_state_alloc(struct ast_stream_topology *topology,
- struct ast_sdp_options *options);
-
-/*!
- * \brief Free the SDP state.
- *
- * A good strategy is to call this during session destruction
- */
-void ast_sdp_state_free(struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Get the associated RTP instance for a particular stream on the SDP state.
- *
- * Stream numbers correspond to the streams in the topology of the associated channel
- */
-struct ast_rtp_instance *ast_sdp_state_get_rtp_instance(const struct ast_sdp_state *sdp_state,
- int stream_index);
-
-/*!
- * \brief Get the associated UDPTL instance for a particular stream on the SDP state.
- *
- * Stream numbers correspond to the streams in the topology of the associated channel
- */
-struct ast_udptl *ast_sdp_state_get_udptl_instance(const struct ast_sdp_state *sdp_state,
- int stream_index);
-
-/*!
- * \brief Get the global connection address on the SDP state.
- */
-const struct ast_sockaddr *ast_sdp_state_get_connection_address(const struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Get the connection address for a particular stream.
- *
- * \param sdp_state
- * \param stream_index The particular stream to get the connection address of
- * \param address[out] A place to store the address in
- *
- * \retval 0 Success
- *
- * \note
- * Stream numbers correspond to the streams in the topology of the associated channel
- */
-int ast_sdp_state_get_stream_connection_address(const struct ast_sdp_state *sdp_state,
- int stream_index, struct ast_sockaddr *address);
-
-/*!
- * \brief Get the joint negotiated streams based on local and remote capabilities.
- *
- * If this is called prior to receiving a remote SDP, then this will just mirror
- * the local configured endpoint capabilities.
- *
- * \note Cannot return NULL. It is a BUG if it does.
- */
-const struct ast_stream_topology *ast_sdp_state_get_joint_topology(
- const struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Get the local topology
- *
- * \note Cannot return NULL. It is a BUG if it does.
- */
-const struct ast_stream_topology *ast_sdp_state_get_local_topology(
- const struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Get the sdp_state options
- *
- */
-const struct ast_sdp_options *ast_sdp_state_get_options(
- const struct ast_sdp_state *sdp_state);
-
-
-/*!
- * \brief Get the local SDP.
- *
- * \param sdp_state
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \note
- * This function will return the last local SDP created if one were
- * previously requested for the current negotiation. Otherwise it
- * creates our SDP offer/answer depending on what role we are playing
- * in the current negotiation.
- */
-const struct ast_sdp *ast_sdp_state_get_local_sdp(struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Get the local SDP Implementation.
- *
- * \param sdp_state
- *
- * \retval non-NULL Success
- * \retval NULL Failure
- *
- * \note
- * This function calls ast_sdp_state_get_local_sdp then translates it into
- * the defined implementation.
- *
- * The return here is const. The use case for this is so that a channel can add
- * the SDP to an outgoing message. The API user should not attempt to modify the SDP.
- * SDP modification should only be done through the API.
- *
- * \since 15
- */
-const void *ast_sdp_state_get_local_sdp_impl(struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Set the remote SDP
- *
- * \param sdp_state
- * \param sdp
- *
- * \note It is assumed that the passed in SDP has been checked for sanity
- * already. e.g., There are no syntax errors, a c= line is reachable for
- * each m= line, etc...
- *
- * \retval 0 Success
- * \retval non-0 Failure
- * Use ast_sdp_state_is_offer_rejected() to see if the SDP offer was rejected.
- *
- * \since 15
- */
-int ast_sdp_state_set_remote_sdp(struct ast_sdp_state *sdp_state, const struct ast_sdp *sdp);
-
-/*!
- * \brief Set the remote SDP from an Implementation
- *
- * \param sdp_state
- * \param remote The implementation's representation of an SDP.
- *
- * \retval 0 Success
- * \retval non-0 Failure
- * Use ast_sdp_state_is_offer_rejected() to see if the SDP offer was rejected.
- *
- * \since 15
- */
-int ast_sdp_state_set_remote_sdp_from_impl(struct ast_sdp_state *sdp_state, const void *remote);
-
-/*!
- * \brief Was the set remote offer rejected.
- * \since 15.0.0
- *
- * \param sdp_state
- *
- * \retval 0 if not rejected.
- * \retval non-zero if rejected.
- */
-int ast_sdp_state_is_offer_rejected(struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Are we the SDP offerer.
- * \since 15.0.0
- *
- * \param sdp_state
- *
- * \retval 0 if we are not the offerer.
- * \retval non-zero we are the offerer.
- */
-int ast_sdp_state_is_offerer(struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Are we the SDP answerer.
- * \since 15.0.0
- *
- * \param sdp_state
- *
- * \retval 0 if we are not the answerer.
- * \retval non-zero we are the answerer.
- */
-int ast_sdp_state_is_answerer(struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Restart the SDP offer/answer negotiations.
- *
- * \param sdp_state
- *
- * \retval 0 Success
- * \retval non-0 Failure
- */
-int ast_sdp_state_restart_negotiations(struct ast_sdp_state *sdp_state);
-
-/*!
- * \brief Update the local stream topology on the SDP state.
- *
- * \details
- * Basically we are saving off any topology updates until we create the
- * next SDP offer. Repeated updates merge with the previous updated
- * topology.
- *
- * \param sdp_state
- * \param topology The new stream topology.
- *
- * \retval 0 Success
- * \retval non-0 Failure
- *
- * \since 15
- */
-int ast_sdp_state_update_local_topology(struct ast_sdp_state *sdp_state, struct ast_stream_topology *topology);
-
-/*!
- * \brief Set the local address (IP address) to use for connection addresses
- *
- * \param sdp_state
- * \param address The local address
- *
- * \note
- * Passing NULL as an address will unset the explicit local connection address.
- *
- * \since 15
- */
-void ast_sdp_state_set_local_address(struct ast_sdp_state *sdp_state, struct ast_sockaddr *address);
-
-/*!
- * \brief Set the connection address (IP address and port) to use for a specific stream
- *
- * \param sdp_state
- * \param stream_index The stream to set the connection address for
- * \param address The connection address
- *
- * \retval 0 Success
- *
- * \note
- * Passing NULL as an address will unset the explicit local connection address.
- *
- * \since 15
- */
-int ast_sdp_state_set_connection_address(struct ast_sdp_state *sdp_state, int stream_index,
- struct ast_sockaddr *address);
-
-/*!
- * \since 15.0.0
- * \brief Set the global locally held state.
- *
- * \param sdp_state
- * \param locally_held
- */
-void ast_sdp_state_set_global_locally_held(struct ast_sdp_state *sdp_state, unsigned int locally_held);
-
-/*!
- * \since 15.0.0
- * \brief Get the global locally held state.
- *
- * \param sdp_state
- *
- * \returns locally_held
- */
-unsigned int ast_sdp_state_get_global_locally_held(const struct ast_sdp_state *sdp_state);
-
-/*!
- * \since 15.0.0
- * \brief Set a stream to be held or unheld locally
- *
- * \param sdp_state
- * \param stream_index The stream to set the held value for
- * \param locally_held
- */
-void ast_sdp_state_set_locally_held(struct ast_sdp_state *sdp_state,
- int stream_index, unsigned int locally_held);
-
-/*!
- * \since 15.0.0
- * \brief Get whether a stream is locally held or not
- *
- * \param sdp_state
- * \param stream_index The stream to get the held state for
- *
- * \returns locally_held
- */
-unsigned int ast_sdp_state_get_locally_held(const struct ast_sdp_state *sdp_state,
- int stream_index);
-
-/*!
- * \since 15.0.0
- * \brief Get whether a stream is remotely held or not
- *
- * \param sdp_state
- * \param stream_index The stream to get the held state for
- *
- * \returns remotely_held
- */
-unsigned int ast_sdp_state_get_remotely_held(const struct ast_sdp_state *sdp_state,
- int stream_index);
-
-/*!
- * \since 15.0.0
- * \brief Set the UDPTL session parameters
- *
- * \param sdp_state
- * \param stream_index The stream to set the UDPTL session parameters for
- * \param params
- */
-void ast_sdp_state_set_t38_parameters(struct ast_sdp_state *sdp_state,
- int stream_index, struct ast_control_t38_parameters *params);
-
-#endif /* _ASTERISK_SDP_STATE_H */
diff --git a/include/asterisk/sdp_translator.h b/include/asterisk/sdp_translator.h
deleted file mode 100644
index e1d51f0be..000000000
--- a/include/asterisk/sdp_translator.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 2017, Digium, Inc.
- *
- * Mark Michelson <mmichelson@digium.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-
-#ifndef _ASTERISK_SDP_TRANSLATOR_H
-#define _ASTERISK_SDP_TRANSLATOR_H
-
-#include "asterisk/sdp_options.h"
-
-struct sdp;
-
-/*!
- * \brief SDP translator operations
- */
-struct ast_sdp_translator_ops {
- /*! The SDP representation on which this translator operates */
- enum ast_sdp_options_impl repr;
- /*! Allocate new translator private data for a translator */
- void *(*translator_new)(void);
- /*! Free translator private data */
- void (*translator_free)(void *translator_priv);
- /*! Convert the channel-native SDP into an internal Asterisk SDP */
- struct ast_sdp *(*to_sdp)(const void *repr_sdp, void *translator_priv);
- /*! Convert an internal Asterisk SDP into a channel-native SDP */
- const void *(*from_sdp)(const struct ast_sdp *sdp, void *translator_priv);
-};
-
-/*!
- * \brief An SDP translator
- *
- * An SDP translator is responsible for converting between Asterisk's internal
- * representation of an SDP and the representation that is native to the channel
- * driver. Translators are allocated per-use.
- */
-struct ast_sdp_translator {
- /*! The operations this translator uses */
- struct ast_sdp_translator_ops *ops;
- /*! Private data this translator uses */
- void *translator_priv;
-};
-
-/*!
- * \brief Register an SDP translator
- * \param ops The SDP operations defined by this translator
- * \retval 0 Success
- * \retval -1 FAIL
- */
-int ast_sdp_register_translator(struct ast_sdp_translator_ops *ops);
-
-/*!
- * \brief Unregister an SDP translator
- */
-void ast_sdp_unregister_translator(struct ast_sdp_translator_ops *ops);
-
-/*!
- * \brief Allocate a new SDP translator
- * \param Representation corresponding to the translator_ops to use
- * \retval NULL FAIL
- * \retval non-NULL New SDP translator
- */
-struct ast_sdp_translator *ast_sdp_translator_new(enum ast_sdp_options_impl repr);
-
-/*!
- * \brief Free an SDP translator
- */
-void ast_sdp_translator_free(struct ast_sdp_translator *translator);
-
-/*!
- * \brief Translate a native SDP to internal Asterisk SDP
- *
- * \param translator The translator to use when translating
- * \param native_sdp The SDP from the channel driver
- * \retval NULL FAIL
- * \retval Non-NULL The translated SDP
- */
-struct ast_sdp *ast_sdp_translator_to_sdp(struct ast_sdp_translator *translator, const void *native_sdp);
-
-/*!
- * \brief Translate an internal Asterisk SDP to a native SDP
- *
- * \param translator The translator to use when translating
- * \param ast_sdp The Asterisk SDP to translate
- * \retval NULL FAIL
- * \retval non-NULL The translated SDP
- */
-const void *ast_sdp_translator_from_sdp(struct ast_sdp_translator *translator,
- const struct ast_sdp *ast_sdp);
-
-#endif /* _ASTERISK_SDP_TRANSLATOR_H */