summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-04-27 05:38:14 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-04-27 05:38:14 -0500
commit78eb08e7ba6f44436bd0ff2f3885277fca8f0cc5 (patch)
tree0942d203983d1748ff8e6c6718c8a9165c056992 /include/asterisk
parented69471f94058879b0fe7fa44bf4509dac98c449 (diff)
parent19a79ae12c73992508910d2c7cddc059e10bc48c (diff)
Merge "sdp: Add support for T.38"
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/format_cache.h5
-rw-r--r--include/asterisk/sdp_options.h82
-rw-r--r--include/asterisk/sdp_state.h21
3 files changed, 108 insertions, 0 deletions
diff --git a/include/asterisk/format_cache.h b/include/asterisk/format_cache.h
index 6099c59ea..92272e8eb 100644
--- a/include/asterisk/format_cache.h
+++ b/include/asterisk/format_cache.h
@@ -224,6 +224,11 @@ extern struct ast_format *ast_format_t140;
extern struct ast_format *ast_format_t140_red;
/*!
+ * \brief Built-in cached T.38 format.
+ */
+extern struct ast_format *ast_format_t38;
+
+/*!
* \brief Built-in "null" format.
*/
extern struct ast_format *ast_format_none;
diff --git a/include/asterisk/sdp_options.h b/include/asterisk/sdp_options.h
index 4b411c771..af694cd14 100644
--- a/include/asterisk/sdp_options.h
+++ b/include/asterisk/sdp_options.h
@@ -19,6 +19,8 @@
#ifndef _ASTERISK_SDP_OPTIONS_H
#define _ASTERISK_SDP_OPTIONS_H
+#include "asterisk/udptl.h"
+
struct ast_sdp_options;
/*!
@@ -427,4 +429,84 @@ unsigned int ast_sdp_options_get_rtcp_mux(const struct ast_sdp_options *options)
*/
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 bind_udptl_to_media_address
+ *
+ * \param options SDP Options
+ * \param bind_udptl_to_media_address
+ */
+void ast_sdp_options_set_bind_udptl_to_media_address(struct ast_sdp_options *options,
+ unsigned int bind_udptl_to_media_address);
+
+/*!
+ * \since 15.0.0
+ * \brief Get SDP Options bind_udptl_to_media_address
+ *
+ * \param options SDP Options
+ *
+ * \returns bind_udptl_to_media_address
+ */
+unsigned int ast_sdp_options_get_bind_udptl_to_media_address(const struct ast_sdp_options *options);
+
#endif /* _ASTERISK_SDP_OPTIONS_H */
diff --git a/include/asterisk/sdp_state.h b/include/asterisk/sdp_state.h
index 7f25c2532..1382ed6af 100644
--- a/include/asterisk/sdp_state.h
+++ b/include/asterisk/sdp_state.h
@@ -24,6 +24,8 @@
struct ast_sdp_state;
struct ast_sockaddr;
+struct ast_udptl;
+struct ast_control_t38_parameters;
/*!
* \brief Allocate a new SDP state
@@ -52,6 +54,14 @@ struct ast_rtp_instance *ast_sdp_state_get_rtp_instance(const struct ast_sdp_sta
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);
@@ -225,6 +235,17 @@ void ast_sdp_state_set_locally_held(struct ast_sdp_state *sdp_state,
/*!
* \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);
+
+/*!
+ * \since 15.0.0
* \brief Get whether a stream is held or not
*
* \param sdp_state