md->streams[i].ice_check_list = ice_check_list_new();
ice_session_add_check_list(call->ice_session, md->streams[i].ice_check_list);
}
+ if ((call->dir == LinphoneCallIncoming) && (sal_call_get_remote_media_description(call->op)->streams[i].ice_check_list != NULL)) {
+ md->streams[i].ice_check_list = sal_call_get_remote_media_description(call->op)->streams[i].ice_check_list;
+ }
+ }
+ if ((call->dir == LinphoneCallIncoming) && (md->streams[0].ice_check_list != NULL)) {
+ call->ice_session=md->streams[0].ice_check_list->session;
}
linphone_address_destroy(addr);
linphone_call_init_common(call, from, to);
linphone_core_init_default_params(lc, &call->params);
call->params.has_video &= !!lc->video_policy.automatically_accept;
- if (sal_call_get_remote_media_description(call->op)->streams[0].ice_check_list != NULL)
- call->ice_session=sal_call_get_remote_media_description(call->op)->streams[0].ice_check_list->session;
call->localdesc=create_local_media_description (lc,call);
call->camera_active=call->params.has_video;
switch (linphone_core_get_firewall_policy(call->core)) {
}
if (linphone_core_get_firewall_policy(lc) == LinphonePolicyUseIce){
rtp_session_set_pktinfo(audiostream->session,TRUE);
- audiostream->ice_check_list = call->localdesc->streams[0].ice_check_list;
+ if (call->dir == LinphoneCallOutgoing) audiostream->ice_check_list = call->localdesc->streams[0].ice_check_list;
+ else audiostream->ice_check_list = sal_call_get_remote_media_description(call->op)->streams[0].ice_check_list;
ice_check_list_register_success_cb(audiostream->ice_check_list, audio_stream_set_remote_from_ice, audiostream);
}
}
if (linphone_core_get_firewall_policy(lc) == LinphonePolicyUseIce){
rtp_session_set_pktinfo(call->videostream->session,TRUE);
- call->videostream->ice_check_list = call->localdesc->streams[1].ice_check_list;
+ if (call->dir == LinphoneCallOutgoing) call->videostream->ice_check_list = call->localdesc->streams[1].ice_check_list;
+ else call->videostream->ice_check_list = sal_call_get_remote_media_description(call->op)->streams[1].ice_check_list;
ice_check_list_register_success_cb(call->videostream->ice_check_list, video_stream_set_remote_from_ice, call->videostream);
}
call->videostream_app_evq = ortp_ev_queue_new();
video_responses[0] = video_responses[1] = FALSE;
audio_ice_bases[0] = audio_ice_bases[1] = NULL;
video_ice_bases[0] = video_ice_bases[1] = NULL;
- if (call->dir == LinphoneCallOutgoing) {
- audio_check_list = call->localdesc->streams[0].ice_check_list;
- video_check_list = call->localdesc->streams[1].ice_check_list;
- } else {
- SalMediaDescription *md = sal_call_get_remote_media_description(call->op);
- audio_check_list = md->streams[0].ice_check_list;
- video_check_list = md->streams[1].ice_check_list;
- }
+ audio_check_list = call->localdesc->streams[0].ice_check_list;
+ video_check_list = call->localdesc->streams[1].ice_check_list;
audio_socks[0] = create_socket(call->audio_port);
if (audio_socks[0] == -1) return;
audio_socks[1] = create_socket(call->audio_port + 1);
if (!match_crypto_algo(local_offer->crypto, remote_answer->crypto, &result->crypto[0], &result->crypto_local_tag, FALSE))
result->port = 0;
}
+ result->ice_check_list = remote_answer->ice_check_list;
}
result->port = 0;
}
+ result->ice_check_list = local_cap->ice_check_list;
}
/**
if (rs->type==SalOther){
strncpy(result->streams[i].typeother,rs->typeother,sizeof(rs->typeother)-1);
}
+ result->streams[i].ice_check_list = remote_offer->streams[i].ice_check_list;
}
}
result->nstreams=i;