Right now OpenBTS requires a port field in inbound invites. This shouldn't be the case, a lacking port should be assumed to be 5060, the SIP standard port. This patch adds this feature.

423e4c2adf
This commit is contained in:
Kurtis Heimerl
2014-04-04 20:13:13 +02:00
committed by Michael Iedema
parent 213373d433
commit 0d163d98c7

View File

@@ -220,9 +220,12 @@ bool IPAddressSpec::ipSet(string addrSpec, const char * provenance)
}
if (!resolveAddress(&mipSockAddr,addrSpec.c_str())) {
//try to resolve with default port if it fails without
if (!resolveAddress(&mipSockAddr,addrSpec.c_str(), 5060)) {
LOG(CRIT) << "cannot resolve IP address for " << addrSpec <<" from "<<provenance; // << sbText();
return false;
}
}
{ char host[256];
const char* ret = inet_ntop(AF_INET,&(mipSockAddr.sin_addr),host,255);