ms_message("Defer ringing to gather ICE candidates");
return;
}
+#ifdef BUILD_UPNP
+ if ((linphone_core_get_firewall_policy(lc) == LinphonePolicyUseUpnp) && (call->upnp_session != NULL)) {
+ /* Defer ringing until the end of the ICE candidates gathering process. */
+ ms_message("Defer ringing to gather uPnP candidates");
+ return;
+ }
+#endif //BUILD_UPNP
linphone_core_notify_incoming_call(lc,call);
}
if (call->ice_session != NULL) {
linphone_core_update_ice_from_remote_media_description(call, sal_call_get_remote_media_description(op));
}
+#ifdef BUILD_UPNP
+ if (call->upnp_session != NULL) {
+ linphone_core_update_upnp_from_remote_media_description(call, sal_call_get_remote_media_description(op));
+ }
+#endif //BUILD_UPNP
md=sal_call_get_final_media_description(op);
call->params.has_video &= linphone_core_media_description_contains_video_stream(md);
linphone_core_update_ice_from_remote_media_description(call,rmd);
linphone_core_update_local_media_description_from_ice(call->localdesc,call->ice_session);
}
+#ifdef BUILD_UPNP
+ if(call->upnp_session != NULL) {
+ linphone_core_update_upnp_from_remote_media_description(call, rmd);
+ linphone_core_update_local_media_description_from_upnp(call->localdesc,call->upnp_session);
+ }
+#endif //BUILD_UPNP
linphone_call_update_remote_session_id_and_ver(call);
sal_call_accept(call->op);
md=sal_call_get_final_media_description(call->op);
if (lc->vtable.display_status!=NULL)
lc->vtable.display_status(lc,_("Call terminated."));
+#ifdef BUILD_UPNP
+ linphone_call_delete_upnp_session(call);
+#endif //BUILD_UPNP
+
linphone_call_set_state(call, LinphoneCallEnd,"Call ended");
}
/*resume to the call that send us the refer automatically*/
linphone_core_resume_call(lc,call->referer);
}
+
+#ifdef BUILD_UPNP
+ linphone_call_delete_upnp_session(call);
+#endif //BUILD_UPNP
+
if (sr == SalReasonDeclined) {
call->reason=LinphoneReasonDeclined;
linphone_call_set_state(call,LinphoneCallEnd,"Call declined.");