From: Jehan Monnier Date: Mon, 3 Sep 2012 16:13:02 +0000 (+0200) Subject: add traces for ICE troubleshooting X-Git-Url: http://sjero.net/git/?p=linphone;a=commitdiff_plain;h=f252a1ad202aeb04f59c0e6b679e3cdaf94a5b3c add traces for ICE troubleshooting --- diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 786744fb..679d2da1 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -521,11 +521,7 @@ void linphone_call_set_state(LinphoneCall *call, LinphoneCallState cstate, const switch(call->reason){ case LinphoneReasonDeclined: call->log->status=LinphoneCallDeclined; -<<<<<<< HEAD - break; -======= break; ->>>>>>> add device identifier api case LinphoneReasonNotAnswered: call->log->status=LinphoneCallMissed; break; @@ -1747,6 +1743,7 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){ ice_session_eliminate_redundant_candidates(call->ice_session); ice_session_choose_default_candidates(call->ice_session); } else { + ms_warning("No STUN answer from [%s], disabling ICE",linphone_core_get_stun_server(call->core)); linphone_call_delete_ice_session(call); } switch (call->state) { diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index d67ba6d5..e4f35e38 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1903,7 +1903,8 @@ void linphone_core_iterate(LinphoneCore *lc){ if (call->state==LinphoneCallOutgoingInit && (curtime-call->start_time>=2)){ /*start the call even if the OPTIONS reply did not arrive*/ if (call->ice_session != NULL) { - /* ICE candidates gathering has not finished yet, proceed with the call without ICE anyway. */ + ms_warning("ICE candidates gathering from [%s] has not finished yet, proceed with the call without ICE anyway." + ,linphone_core_get_stun_server(lc)); linphone_call_delete_ice_session(call); linphone_call_stop_media_streams(call); } diff --git a/coreapi/misc.c b/coreapi/misc.c index a22bbc1d..b97f265b 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -611,6 +611,7 @@ int linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call) ice_add_local_candidate(video_check_list, "host", local_addr, call->video_port + 1, 2, NULL); } + ms_message("ICE: gathering candidate from [%s]",server); /* Gather local srflx candidates. */ ice_session_gather_candidates(call->ice_session, ss, ss_len); return 0;