diff --git a/src/account/account-params.cpp b/src/account/account-params.cpp
index b8a2bc7ce77a5c6bcf25a36f276f2f553fcc2dff..4a1d8d4a76729b2a203de440f766f5c03f4401c3 100644
--- a/src/account/account-params.cpp
+++ b/src/account/account-params.cpp
@@ -376,6 +376,8 @@ void AccountParams::setOutboundProxyEnabled(bool enable) {
 		}
 
 		mRoutes.emplace_back(mProxyAddress);
+	} else {
+		mRoutes.clear();
 	}
 }
 
@@ -814,6 +816,8 @@ void AccountParams::writeToConfigFile(LinphoneConfig *config, int index) {
 		auto routesString = L_GET_C_LIST_FROM_CPP_LIST(getRoutesString());
 		linphone_config_set_string_list(config, key, "reg_route", routesString);
 		bctbx_list_free_with_data(routesString, (bctbx_list_free_func)bctbx_free);
+	} else {
+		linphone_config_clean_entry(config, key, "reg_route");
 	}
 	if (!mIdentity.empty()) {
 		linphone_config_set_string(config, key, "reg_identity", mIdentity.c_str());