From 98bd5cd6137b657fcc5b17a9c22d56f9243ea84c Mon Sep 17 00:00:00 2001 From: Simon Morlat <simon.morlat@belledonne-communications.com> Date: Thu, 11 Feb 2021 15:55:45 +0100 Subject: [PATCH] Fix an issue with broken media connectivity if the TURN server is behind a NAT device. --- include/linphone/core.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/linphone/core.h b/include/linphone/core.h index e670fc35dd..d1062f656d 100644 --- a/include/linphone/core.h +++ b/include/linphone/core.h @@ -2430,6 +2430,26 @@ LINPHONE_PUBLIC const char *linphone_core_get_nat_address(const LinphoneCore *co */ LINPHONE_PUBLIC void linphone_core_set_nat_policy(LinphoneCore *core, LinphoneNatPolicy *policy); +/** + * Artificially cause the relay path to be selected when ICE is used. + * This is mainly a function for test, for example to validate that the relay service (ever TURN or media-aware SIP proxy) + * is working as expected. Indeed, in many cases a path through host or server reflexive candidate will be found by ICE, + * which makes difficult to make sure that the relay service is working as expected. + * @param[in] lc #LinphoneCore object + * @param[in] enable boolean value + * @ingroup network_parameters + */ +LINPHONE_PUBLIC void linphone_core_enable_forced_ice_relay(LinphoneCore *core, bool_t enable); + +/** + * Indicates whether the ICE relay path is forcibly selected. + * @param[in] lc #LinphoneCore object + * @return a boolean value indicating whether forced relay is enabled. + * @ingroup network_parameters + * @see linphone_core_enable_forced_ice_relay(). + */ +LINPHONE_PUBLIC bool_t linphone_core_forced_ice_relay_enabled(const LinphoneCore *core); + /** * Get The policy that is used to pass through NATs/firewalls. * It may be overridden by a NAT policy for a specific proxy config. -- GitLab