Skip to content
Snippets Groups Projects
Commit 824c28e1 authored by Adrien Béraud's avatar Adrien Béraud Committed by Guillaume Roguez
Browse files

don't duplicate <sip:> hostname encapsulation in IP2IP

Refs #63591

Change-Id: I33a4a215db406d07f1ceb13db9b2a818b1d98e10
parent 7f972e43
No related branches found
No related tags found
No related merge requests found
...@@ -184,7 +184,6 @@ SIPAccount::newOutgoingCall(const std::string& id, const std::string& toUrl) ...@@ -184,7 +184,6 @@ SIPAccount::newOutgoingCall(const std::string& id, const std::string& toUrl)
ipv6 = IpAddr::isIpv6(toUrl); ipv6 = IpAddr::isIpv6(toUrl);
#endif #endif
to = ipv6 ? IpAddr(toUrl).toString(false, true) : toUrl; to = ipv6 ? IpAddr(toUrl).toString(false, true) : toUrl;
toUri = getToUri(to);
family = ipv6 ? pj_AF_INET6() : pj_AF_INET(); family = ipv6 ? pj_AF_INET6() : pj_AF_INET();
// TODO: resolve remote host using SIPVoIPLink::resolveSrvName // TODO: resolve remote host using SIPVoIPLink::resolveSrvName
...@@ -200,14 +199,6 @@ SIPAccount::newOutgoingCall(const std::string& id, const std::string& toUrl) ...@@ -200,14 +199,6 @@ SIPAccount::newOutgoingCall(const std::string& id, const std::string& toUrl)
} }
else { else {
to = toUrl; to = toUrl;
// If toUrl is not a well formatted sip URI, use account information to process it
if (toUrl.find("sip:") != std::string::npos or
toUrl.find("sips:") != std::string::npos)
toUri = toUrl;
else
toUri = getToUri(to);
call->setTransport(transport_); call->setTransport(transport_);
// FIXME : for now, use the same address family as the SIP transport // FIXME : for now, use the same address family as the SIP transport
family = pjsip_transport_type_get_af(getTransportType()); family = pjsip_transport_type_get_af(getTransportType());
...@@ -215,6 +206,12 @@ SIPAccount::newOutgoingCall(const std::string& id, const std::string& toUrl) ...@@ -215,6 +206,12 @@ SIPAccount::newOutgoingCall(const std::string& id, const std::string& toUrl)
RING_DBG("UserAgent: New registered account call to %s", toUrl.c_str()); RING_DBG("UserAgent: New registered account call to %s", toUrl.c_str());
} }
// If toUrl is not a well formatted sip URI, use account information to process it
if (toUrl.find("sip:") != std::string::npos or
toUrl.find("sips:") != std::string::npos)
toUri = toUrl;
else
toUri = getToUri(to);
call->initIceTransport(true); call->initIceTransport(true);
call->setIPToIP(isIP2IP()); call->setIPToIP(isIP2IP());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment