diff --git a/daemon/src/sip/sipaccount.cpp b/daemon/src/sip/sipaccount.cpp
index 050123f442d28a525de1767900311ca2b8b0bce7..1fce8c82e412488ad33eb7c3cdb37398e368e134 100644
--- a/daemon/src/sip/sipaccount.cpp
+++ b/daemon/src/sip/sipaccount.cpp
@@ -400,7 +400,7 @@ void SIPAccount::setAccountDetails(std::map<std::string, std::string> details)
     publishedIpAddress_ = details[CONFIG_PUBLISHED_ADDRESS];
     localPort_ = atoi(details[CONFIG_LOCAL_PORT].c_str());
     publishedPort_ = atoi(details[CONFIG_PUBLISHED_PORT].c_str());
-    if(stunServer_ != details[CONFIG_STUN_SERVER]) {
+    if (stunServer_ != details[CONFIG_STUN_SERVER]) {
         DEBUG("Stun server changed!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
         link_->sipTransport.destroyStunResolver(stunServer_);
         // pj_stun_sock_destroy(pj_stun_sock *stun_sock);
diff --git a/daemon/src/sip/sipaccount.h b/daemon/src/sip/sipaccount.h
index fb6980f19d4b8b132a7450d931cb884f1ffd3dc3..82ac7d9e871271f8de5f6b2c94a1f449eb49c765 100644
--- a/daemon/src/sip/sipaccount.h
+++ b/daemon/src/sip/sipaccount.h
@@ -469,7 +469,7 @@ class SIPAccount : public Account {
          * @param The public IPV4 address in the standard dot notation.
          * @return void
          */
-        void setPublishedAddress(const std::string& publishedIpAddress) {
+        void setPublishedAddress(const std::string &publishedIpAddress) {
             publishedIpAddress_ = publishedIpAddress;
         }
 
@@ -497,11 +497,11 @@ class SIPAccount : public Account {
             return zrtpHelloHash_;
         }
 
-        void setReceivedParameter(std::string received) {
+        void setReceivedParameter(const std::string &received) {
             receivedParameter_ = received;
         }
 
-        std::string getReceivedParameter() {
+        std::string getReceivedParameter() const {
             return receivedParameter_;
         }
 
diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp
index b1ebcc915342f962d880979053a55d51dae5a02f..041af3f9032afd912a4015a5cb5963766402ffdf 100644
--- a/daemon/src/sip/sipvoiplink.cpp
+++ b/daemon/src/sip/sipvoiplink.cpp
@@ -1563,13 +1563,12 @@ void update_contact_header(pjsip_regc_cbparam *param, SIPAccount *account)
     pj_pool_release(pool);
 }
 
-static void looksForReceivedParameter(pjsip_regc_cbparam *param, SIPAccount *account) {
+void lookForReceivedParameter(pjsip_regc_cbparam *param, SIPAccount *account)
+{
     pj_str_t receivedValue = param->rdata->msg_info.via->recvd_param;
-    std::string publicIpFromReceived = "";
 
-    ERROR("looksForReceivedParameter");
-    if(receivedValue.slen) {
-        publicIpFromReceived = std::string(receivedValue.ptr, receivedValue.slen);
+    if (receivedValue.slen) {
+        std::string publicIpFromReceived(receivedValue.ptr, receivedValue.slen);
         DEBUG("Cool received received parameter... uhhh?, the value is %s", publicIpFromReceived.c_str());
         account->setReceivedParameter(publicIpFromReceived);
     }
@@ -1614,7 +1613,7 @@ void registration_cb(pjsip_regc_cbparam *param)
     if (param->code < 0 || param->code >= 300) {
         switch (param->code) {
             case 606:
-                looksForReceivedParameter(param, account);
+                lookForReceivedParameter(param, account);
                 account->setRegistrationState(ErrorNotAcceptable);
                 break;