diff --git a/coreapi/sal_eXosip2_sdp.c b/coreapi/sal_eXosip2_sdp.c index bf6c196a9..1d25d1f51 100644 --- a/coreapi/sal_eXosip2_sdp.c +++ b/coreapi/sal_eXosip2_sdp.c @@ -709,7 +709,8 @@ int sdp_to_media_description(sdp_message_t *msg, SalMediaDescription *desc, IceS ice_session_set_remote_credentials(*ice_session, ice_ufrag, ice_pwd); ice_dump_session(*ice_session); } - if ((ice_session_just_created == FALSE) && ((ice_ufrag == NULL) || (ice_pwd == NULL))) { + if (((ice_session_just_created == FALSE) && ((ice_ufrag == NULL) || (ice_pwd == NULL))) + || (ice_session_state(*ice_session) == IS_Failed)) { /* We started with ICE activated but the peer apparently do not support ICE, so stop using it. */ ice_session_destroy(*ice_session); *ice_session = NULL;