diff --git a/daemon/src/sip/siptransport.cpp b/daemon/src/sip/siptransport.cpp
index ece189460152aec6e91facca6c2fd6891f3ddb88..1cefb015194fbf3b236ade142b4676dcddbd599b 100644
--- a/daemon/src/sip/siptransport.cpp
+++ b/daemon/src/sip/siptransport.cpp
@@ -418,7 +418,8 @@ SipTransport::createUdpTransport(const std::string &interface, unsigned int port
     std::ostringstream fullAddress;
     fullAddress << listeningAddress << ":" << listeningPort;
     pj_str_t udpString;
-    pj_cstr(&udpString, fullAddress.str().c_str());
+    std::string fullAddressStr(fullAddress.str());
+    pj_cstr(&udpString, fullAddressStr.c_str());
     pj_sockaddr boundAddr;
     pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &udpString, &boundAddr);
     pj_status_t status;