diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index a1add1c39..fe66b520b 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -480,6 +480,7 @@ static void call_ringing(SalOp *h){ linphone_core_notify_display_status(lc,_("Remote ringing...")); linphone_call_set_state(call,LinphoneCallOutgoingRinging,"Remote ringing"); }else{ + SalMediaDescription *rmd = sal_call_get_remote_media_description(call->op); /*initialize the remote call params by invoking linphone_call_get_remote_params(). This is useful as the SDP may not be present in the 200Ok*/ linphone_call_get_remote_params(call); /*accept early media */ @@ -496,7 +497,7 @@ static void call_ringing(SalOp *h){ video_stream_send_vfu(call->videostream); } #endif - return; + return; } linphone_core_notify_show_interface(lc); @@ -504,6 +505,9 @@ static void call_ringing(SalOp *h){ linphone_call_set_state(call,LinphoneCallOutgoingEarlyMedia,"Early media"); linphone_core_stop_ringing(lc); ms_message("Doing early media..."); + if (call->ice_session != NULL && rmd) { + linphone_call_update_ice_from_remote_media_description(call, rmd, !sal_call_is_offerer(call->op)); + } linphone_call_update_streams(call, md, call->state); if ((linphone_call_params_get_audio_direction(linphone_call_get_current_params(call)) == LinphoneMediaDirectionInactive) && call->audiostream) { if (lc->ringstream != NULL) return; /* Already ringing! */ diff --git a/tester/call_multi_tester.c b/tester/call_multi_tester.c index 0a4c22072..273bf60c4 100644 --- a/tester/call_multi_tester.c +++ b/tester/call_multi_tester.c @@ -1139,10 +1139,13 @@ void do_not_stop_ringing_when_declining_one_of_two_incoming_calls(void) { pauline_called_by_marie=linphone_core_get_current_call(marie->lc); linphone_call_decline(pauline_called_by_laure, LinphoneReasonDeclined); BC_ASSERT_TRUE(wait_for(laure->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallEnd,1)); + BC_ASSERT_TRUE(wait_for(laure->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallReleased,1)); BC_ASSERT_TRUE(linphone_ringtoneplayer_is_started(pauline->lc->ringtoneplayer)); linphone_call_terminate(pauline_called_by_marie); BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallEnd,2)); + + BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallReleased,2)); linphone_core_manager_destroy(marie); linphone_core_manager_destroy(pauline);