diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
index 928209827dfaa8ed13fa4f9c4b1e580522d56150..8db39dd515dca06602be1d1226db6892aae0bcbb 100644
--- a/coreapi/linphonecore.c
+++ b/coreapi/linphonecore.c
@@ -3904,8 +3904,24 @@ static void set_network_reachable(LinphoneCore* lc,bool_t isReachable, time_t cu
 	}
 	lc->netup_time=curtime;
 	lc->network_reachable=isReachable;
-}
+	if(!isReachable) {
+		sal_unlisten_ports (lc->sal);
+	} else {
+		apply_transports(lc);
+	}
 
+}
+void linphone_core_refresh_registers(LinphoneCore* lc) {
+	const MSList *elem=linphone_core_get_proxy_config_list(lc);
+	for(;elem!=NULL;elem=elem->next){
+		LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+		if (linphone_proxy_config_register_enabled(cfg) ) {
+			cfg->registered=0;
+			cfg->commit=TRUE;
+		}
+	}
+	
+}
 void linphone_core_set_network_reachable(LinphoneCore* lc,bool_t isReachable) {
 	//first disable automatic mode
 	if (lc->auto_net_state_mon) {
diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h
index 82709208d587ef5145621a8211a494bfa08e3fec..81ab3e949948770cfd2d3446fb0b07d20f8c747d 100644
--- a/coreapi/linphonecore.h
+++ b/coreapi/linphonecore.h
@@ -972,7 +972,11 @@ int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *local, r
 const MSList *linphone_core_get_calls(LinphoneCore *lc);
 
 LinphoneGlobalState linphone_core_get_global_state(const LinphoneCore *lc);
-
+/**
+ * force registration refresh to be initiated upon next iterate
+ * @ingroup proxies
+ */
+void linphone_core_refresh_registers(LinphoneCore* lc);	
 #ifdef __cplusplus
 }
 #endif
diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c
index 61c7c494d036d20041bb0c8f494bc1c5a8836561..222e6e59759613850b5df59bf2593c4c2fc66385 100644
--- a/coreapi/sal_eXosip2.c
+++ b/coreapi/sal_eXosip2.c
@@ -329,6 +329,7 @@ int sal_unlisten_ports(Sal *ctx){
 	if (ctx->running){
 		eXosip_quit();
 		eXosip_init();
+		ctx->running=FALSE;
 	}
 	return 0;
 }