diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp
index 345fb7df667cac41ccbd41ddfaa2c03bea97e44a..0b020633f33d574497ca97173bc1ae83586adeb2 100644
--- a/sflphone-common/src/managerimpl.cpp
+++ b/sflphone-common/src/managerimpl.cpp
@@ -2210,11 +2210,15 @@ void ManagerImpl::setMicVolume (unsigned short mic_vol)
 
 void ManagerImpl::setSipPort (int port)
 {
+    _debug("Setting to new port %d\n", port);
+    setConfig(PREFERENCES, CONFIG_SIP_PORT, port);
+    
+    this->restartPJSIP ();
 }
 
 int ManagerImpl::getSipPort (void)
 {
-    return 5060;
+    return getConfigInt (PREFERENCES , CONFIG_SIP_PORT);
 }
 
 
diff --git a/sflphone-common/src/sipvoiplink.cpp b/sflphone-common/src/sipvoiplink.cpp
index 7d402327517b2d17505b39c2e501abd055f32681..6d01264343029c39b7af4ba873e1fde3a681e84c 100644
--- a/sflphone-common/src/sipvoiplink.cpp
+++ b/sflphone-common/src/sipvoiplink.cpp
@@ -217,6 +217,8 @@ bool SIPVoIPLink::init()
     if (initDone())
         return false;
 
+    _regPort = Manager::instance().getSipPort();
+    
     /* Instanciate the C++ thread */
     _evThread = new EventThread (this);
 
@@ -890,7 +892,7 @@ SIPVoIPLink::transfer (const CallID& id, const std::string& to)
      */
     pjsip_evsub_set_mod_data (sub, getModId(), this);
 
-    _debug ("SIP port listener = %i ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", _localExternPort);
+    _debug ("SIP port listener = %i", _localExternPort);
 
     /*
      * Create REFER request.