mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 02:09:22 +00:00
prepare the removal of a=nortpproxy attribute for ICE reINVITE.
This commit is contained in:
parent
b86952810c
commit
2a6213d90c
6 changed files with 18 additions and 15 deletions
|
|
@ -320,7 +320,7 @@ static void stream_description_to_sdp ( belle_sdp_session_description_t *session
|
|||
belle_sdp_media_description_add_attribute(media_desc,belle_sdp_attribute_create ("rtcp",buffer));
|
||||
}
|
||||
}
|
||||
if (stream->ice_completed == TRUE) {
|
||||
if (stream->set_nortpproxy == TRUE) {
|
||||
belle_sdp_media_description_add_attribute(media_desc,belle_sdp_attribute_create ("nortpproxy","yes"));
|
||||
}
|
||||
if (stream->ice_mismatch == TRUE) {
|
||||
|
|
@ -423,7 +423,7 @@ belle_sdp_session_description_t * media_description_to_sdp ( const SalMediaDescr
|
|||
belle_sdp_session_description_set_bandwidth ( session_desc,"AS",desc->bandwidth );
|
||||
}
|
||||
|
||||
if (desc->ice_completed == TRUE) belle_sdp_session_description_add_attribute(session_desc, belle_sdp_attribute_create("nortpproxy","yes"));
|
||||
if (desc->set_nortpproxy == TRUE) belle_sdp_session_description_add_attribute(session_desc, belle_sdp_attribute_create("nortpproxy","yes"));
|
||||
if (desc->ice_pwd[0] != '\0') belle_sdp_session_description_add_attribute(session_desc, belle_sdp_attribute_create("ice-pwd",desc->ice_pwd));
|
||||
if (desc->ice_ufrag[0] != '\0') belle_sdp_session_description_add_attribute(session_desc, belle_sdp_attribute_create("ice-ufrag",desc->ice_ufrag));
|
||||
|
||||
|
|
|
|||
|
|
@ -579,8 +579,11 @@ void linphone_call_increment_local_media_description(LinphoneCall *call){
|
|||
}
|
||||
|
||||
void linphone_call_update_local_media_description_from_ice_or_upnp(LinphoneCall *call){
|
||||
LinphoneCore *lc = call->core;
|
||||
if (call->ice_session != NULL) {
|
||||
_update_local_media_description_from_ice(call->localdesc, call->ice_session);
|
||||
/*set this to FALSE once flexisip are updated*/
|
||||
bool_t use_nortpproxy = lp_config_get_int(lc->config, "sip", "ice_uses_nortpproxy", TRUE);
|
||||
_update_local_media_description_from_ice(call->localdesc, call->ice_session, use_nortpproxy);
|
||||
linphone_core_update_ice_state_in_call_stats(call);
|
||||
}
|
||||
#ifdef BUILD_UPNP
|
||||
|
|
|
|||
|
|
@ -806,7 +806,7 @@ void linphone_call_stop_ice_for_inactive_streams(LinphoneCall *call, SalMediaDes
|
|||
linphone_core_update_ice_state_in_call_stats(call);
|
||||
}
|
||||
|
||||
void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session) {
|
||||
void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session, bool_t use_nortpproxy) {
|
||||
const char *rtp_addr, *rtcp_addr;
|
||||
IceSessionState session_state = ice_session_state(session);
|
||||
int nb_candidates;
|
||||
|
|
@ -814,7 +814,7 @@ void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSess
|
|||
bool_t result;
|
||||
|
||||
if (session_state == IS_Completed) {
|
||||
desc->ice_completed = TRUE;
|
||||
if (use_nortpproxy) desc->set_nortpproxy = TRUE;
|
||||
result = ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, 0), &rtp_addr, NULL, NULL, NULL);
|
||||
if (result == TRUE) {
|
||||
strncpy(desc->addr, rtp_addr, sizeof(desc->addr));
|
||||
|
|
@ -823,7 +823,7 @@ void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSess
|
|||
}
|
||||
}
|
||||
else {
|
||||
desc->ice_completed = FALSE;
|
||||
desc->set_nortpproxy = FALSE;
|
||||
}
|
||||
strncpy(desc->ice_pwd, ice_session_local_pwd(session), sizeof(desc->ice_pwd));
|
||||
strncpy(desc->ice_ufrag, ice_session_local_ufrag(session), sizeof(desc->ice_ufrag));
|
||||
|
|
@ -833,10 +833,10 @@ void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSess
|
|||
nb_candidates = 0;
|
||||
if (!sal_stream_description_active(stream) || (cl == NULL)) continue;
|
||||
if (ice_check_list_state(cl) == ICL_Completed) {
|
||||
stream->ice_completed = TRUE;
|
||||
if (use_nortpproxy) stream->set_nortpproxy = TRUE;
|
||||
result = ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, i), &rtp_addr, &stream->rtp_port, &rtcp_addr, &stream->rtcp_port);
|
||||
} else {
|
||||
stream->ice_completed = FALSE;
|
||||
stream->set_nortpproxy = FALSE;
|
||||
result = ice_check_list_default_local_candidate(ice_session_check_list(session, i), &rtp_addr, &stream->rtp_port, &rtcp_addr, &stream->rtcp_port);
|
||||
}
|
||||
if (result == TRUE) {
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ static void initiate_incoming(const SalStreamDescription *local_cap,
|
|||
strcpy(result->ice_pwd, local_cap->ice_pwd);
|
||||
strcpy(result->ice_ufrag, local_cap->ice_ufrag);
|
||||
result->ice_mismatch = local_cap->ice_mismatch;
|
||||
result->ice_completed = local_cap->ice_completed;
|
||||
result->set_nortpproxy = local_cap->set_nortpproxy;
|
||||
memcpy(result->ice_candidates, local_cap->ice_candidates, sizeof(result->ice_candidates));
|
||||
memcpy(result->ice_remote_candidates, local_cap->ice_remote_candidates, sizeof(result->ice_remote_candidates));
|
||||
strcpy(result->name,local_cap->name);
|
||||
|
|
@ -603,7 +603,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
|
|||
strcpy(result->ice_pwd, local_capabilities->ice_pwd);
|
||||
strcpy(result->ice_ufrag, local_capabilities->ice_ufrag);
|
||||
result->ice_lite = local_capabilities->ice_lite;
|
||||
result->ice_completed = local_capabilities->ice_completed;
|
||||
result->set_nortpproxy = local_capabilities->set_nortpproxy;
|
||||
result->custom_sdp_attributes = sal_custom_sdp_attribute_clone(local_capabilities->custom_sdp_attributes);
|
||||
|
||||
strcpy(result->name,local_capabilities->name);
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ int linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call);
|
|||
void linphone_core_update_ice_state_in_call_stats(LinphoneCall *call);
|
||||
void linphone_call_stats_fill(LinphoneCallStats *stats, MediaStream *ms, OrtpEvent *ev);
|
||||
void linphone_call_stop_ice_for_inactive_streams(LinphoneCall *call, SalMediaDescription *result);
|
||||
void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session);
|
||||
void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session, bool_t use_nortpproxy);
|
||||
void linphone_call_update_local_media_description_from_ice_or_upnp(LinphoneCall *call);
|
||||
void linphone_call_update_ice_from_remote_media_description(LinphoneCall *call, const SalMediaDescription *md);
|
||||
void linphone_call_clear_unused_ice_candidates(LinphoneCall *call, const SalMediaDescription *md);
|
||||
|
|
|
|||
|
|
@ -246,8 +246,8 @@ typedef struct SalStreamDescription{
|
|||
SalSrtpCryptoAlgo crypto[SAL_CRYPTO_ALGO_MAX];
|
||||
unsigned int crypto_local_tag;
|
||||
int max_rate;
|
||||
bool_t implicit_rtcp_fb;
|
||||
OrtpRtcpFbConfiguration rtcp_fb;
|
||||
bool_t implicit_rtcp_fb;
|
||||
OrtpRtcpFbConfiguration rtcp_fb;
|
||||
OrtpRtcpXrConfiguration rtcp_xr;
|
||||
SalCustomSdpAttribute *custom_sdp_attributes;
|
||||
SalIceCandidate ice_candidates[SAL_MEDIA_DESCRIPTION_MAX_ICE_CANDIDATES];
|
||||
|
|
@ -255,7 +255,7 @@ typedef struct SalStreamDescription{
|
|||
char ice_ufrag[SAL_MEDIA_DESCRIPTION_MAX_ICE_UFRAG_LEN];
|
||||
char ice_pwd[SAL_MEDIA_DESCRIPTION_MAX_ICE_PWD_LEN];
|
||||
bool_t ice_mismatch;
|
||||
bool_t ice_completed;
|
||||
bool_t set_nortpproxy; /*Formely set by ICE to indicate to the proxy that it has nothing to do*/
|
||||
bool_t rtcp_mux;
|
||||
bool_t pad[1];
|
||||
char dtls_fingerprint[256];
|
||||
|
|
@ -285,7 +285,7 @@ typedef struct SalMediaDescription{
|
|||
char ice_ufrag[SAL_MEDIA_DESCRIPTION_MAX_ICE_UFRAG_LEN];
|
||||
char ice_pwd[SAL_MEDIA_DESCRIPTION_MAX_ICE_PWD_LEN];
|
||||
bool_t ice_lite;
|
||||
bool_t ice_completed;
|
||||
bool_t set_nortpproxy;
|
||||
bool_t pad[2];
|
||||
} SalMediaDescription;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue