diff --git a/coreapi/bellesip_sal/sal_impl.c b/coreapi/bellesip_sal/sal_impl.c index 0ef2250df..49f6fa792 100644 --- a/coreapi/bellesip_sal/sal_impl.c +++ b/coreapi/bellesip_sal/sal_impl.c @@ -517,22 +517,23 @@ void sal_use_session_timers(Sal *ctx, int expires){ return ; } void sal_use_double_registrations(Sal *ctx, bool_t enabled){ - ms_error("sal_use_double_registrations not implemented yet"); + ms_warning("sal_use_double_registrations is deprecated"); return ; } void sal_reuse_authorization(Sal *ctx, bool_t enabled){ - ms_error("sal_reuse_authorization not implemented yet"); + ms_warning("sal_reuse_authorization is deprecated"); return ; } void sal_use_one_matching_codec_policy(Sal *ctx, bool_t one_matching_codec){ ctx->one_matching_codec=one_matching_codec; } void sal_use_rport(Sal *ctx, bool_t use_rports){ - ms_error("sal_use_rport not implemented yet"); + belle_sip_provider_enable_rport(ctx->prov,use_rports); + ms_message("Sal use rport [%s]",use_rports?"enabled":"disabled"); return ; } void sal_use_101(Sal *ctx, bool_t use_101){ - ms_error("sal_use_101 not implemented yet"); + ms_warning("sal_use_101 is deprecated"); return ; } void sal_set_root_ca(Sal* ctx, const char* rootCa){ diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 8691f0a31..a43b36362 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -470,8 +470,6 @@ static void net_config_read (LinphoneCore *lc) linphone_core_set_mtu(lc,tmp); tmp=lp_config_get_int(lc->config,"net","download_ptime",0); linphone_core_set_download_ptime(lc,tmp); - /*only set at setup*/ - sal_nat_helper_enable(lc->sal,lp_config_get_int(lc->config,"net","enable_nat_helper",1)); } static void build_sound_devices_table(LinphoneCore *lc){ @@ -4351,9 +4349,11 @@ void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy switch(pol) { case LinphonePolicyUseUpnp: sal_nat_helper_enable(lc->sal, FALSE); + sal_use_rport(lc->sal, FALSE); break; default: - sal_nat_helper_enable(lc->sal, TRUE); + sal_nat_helper_enable(lc->sal, lp_config_get_int(lc->config,"net","enable_nat_helper",1)); + sal_use_rport(lc->sal, lp_config_get_int(lc->config,"sip","use_rport",1)); break; } if (lc->sip_conf.contact) update_primary_contact(lc); diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 54fe50aa9..2917d14b7 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -286,7 +286,7 @@ LinphoneAddress *guess_contact_for_register(LinphoneProxyConfig *obj){ linphone_address_destroy(contact); contact=linphone_address_new(tmp); if (!contact) { - ms_error("No valid contact_params for [%p]",linphone_address_get_domain(proxy)); + ms_error("No valid contact_params for [%s]",linphone_address_get_domain(proxy)); return NULL; }