r2922 - in trunk/libmsip: include/libmsip source

mikma at minisip.org mikma at minisip.org
Fri Nov 17 21:02:06 CET 2006


Author: mikma
Date: 2006-11-17 21:02:05 +0100 (Fri, 17 Nov 2006)
New Revision: 2922

Modified:
   trunk/libmsip/include/libmsip/SipDialogConfig.h
   trunk/libmsip/source/SipDialogConfig.cxx
Log:
Remove SipProxy::findProxy. Autodetection has been moved to
the transport layer, as part of the implementation of
RFC 3263 "Locating SIP Server".


Modified: trunk/libmsip/include/libmsip/SipDialogConfig.h
===================================================================
--- trunk/libmsip/include/libmsip/SipDialogConfig.h	2006-11-17 19:52:09 UTC (rev 2921)
+++ trunk/libmsip/include/libmsip/SipDialogConfig.h	2006-11-17 20:02:05 UTC (rev 2922)
@@ -80,16 +80,6 @@
 		
 		std::string getDebugString();
 
-		/**
-		Find the proxy settings for the given uri
-		@param uri user's AOR, from where we extract the hostpart to check for SRV
-		@param port return parameter, where the port used by the service is obtained (the hostname is
-		returned as the return param
-		@param transport transport protocol to find the host:port settings for
-		@return the proxy hostname (the port is returned by reference)
-		*/
-		static SipUri findProxy(const SipUri &uri, const std::string &transport="UDP");
-
 		std::string sipProxyUsername;
 		std::string sipProxyPassword;
 		

Modified: trunk/libmsip/source/SipDialogConfig.cxx
===================================================================
--- trunk/libmsip/source/SipDialogConfig.cxx	2006-11-17 19:52:09 UTC (rev 2921)
+++ trunk/libmsip/source/SipDialogConfig.cxx	2006-11-17 20:02:05 UTC (rev 2922)
@@ -97,33 +97,6 @@
 		+"; expires="+itoa(defaultExpires);
 }
 
-SipUri SipProxy::findProxy(const SipUri &uri, const string &transport){
-	const std::string &domain = uri.getIp();
-	
-	//Do a SRV lookup according to the transport ...
-	string srv;
-	if( transport == "TLS" || transport == "tls") { srv = "_sips._tcp"; }
-	else if( transport == "TCP" || transport == "tls") { srv = "_sip._tcp"; }
-	else { //if( trans == "UDP" || trans == "udp") { 
-		srv = "_sip._udp"; 
-	}
-
-	uint16_t port = 0;
-	std::string proxy = NetworkFunctions::getHostHandlingService(srv, domain, port);
-	#ifdef DEBUG_OUTPUT
-	cerr << "SipProxy::findProxy : srv=" << srv << "; domain=" << domain << "; port=" << port << endl;
-	#endif
-
-	if (proxy.length()<=0){
-		throw HostNotFound( "[Proxy for <" + uri.getString() + ">]" );
-	}
-
-	SipUri proxyUri(proxy);
-	proxyUri.setPort(port);
-
-	return proxyUri;
-}
-
 int SipProxy::getRegisterExpires_int( ) {
 	return registerExpires;
 }



More information about the Minisip-devel mailing list