If you use sipaccount, this an experimental patch to allow stun ;-)

Laurent

Tarrisse Laurent a écrit :
Hi Mathieu

What type of account do you  use ?

Stun support is implemented with wengo account type not sip account.

Laurent

Mathieu Osty a écrit :
Hi everybody,

I'm currently trying to setup an architecture based on a private
Kamailio server and Qutecom 2.2 RC3 clients (Windows and MacOS X). The
tricky part is that all of my Qutecom users are behind NATs.
I thought Qutecom could handle it quite easily as the STUN protocol is
listed in Qutecom's features. After several days of testing I still
haven't been able to make it work... It seems that the stun server
option isn't even used (I've tested the default stun.wengo.fr and
stun.ekiga.net). Wireshark doesn't show any STUN request.
I've tried a STUN config with X-lite on the same architecture and it
seems to work quite well but I really want to stick to Qutecom.

Does Qutecom really support STUN ? If yes, how can I enable it ?
Is it worth trying the daily snapshots instead of the 2.2 RC3 ?

Thanks for your help.

Mathieu
_______________________________________________
QuteCom-dev mailing list
QuteCom-dev@lists.qutecom.org
http://lists.qutecom.org/mailman/listinfo/qutecom-dev



_______________________________________________
QuteCom-dev mailing list
QuteCom-dev@lists.qutecom.org
http://lists.qutecom.org/mailman/listinfo/qutecom-dev



# HG changeset patch
# User laur...@deep-blue
# Date 1238022657 -3600
# Node ID 3a3d64260c88369aca1bff60118dc88a7811524d
# Parent  baf2ec72c4cfcfa625a61739386a14381d71a002
add stun support for sip account

diff -r baf2ec72c4cf -r 3a3d64260c88 wengophone/src/model/account/SipAccount.cpp
--- a/wengophone/src/model/account/SipAccount.cpp	Sun Mar 22 18:29:22 2009 +0100
+++ b/wengophone/src/model/account/SipAccount.cpp	Thu Mar 26 00:10:57 2009 +0100
@@ -30,6 +30,7 @@
 
 SipAccount SipAccount::empty;
 unsigned short SipAccount::_testSIPRetry = 4;
+unsigned short SipAccount::_testStunRetry = 2;
 int SipAccount::_initTimerMaximum = 4;
 int SipAccount::_initTimerInterval = 5000;
 
@@ -283,6 +284,20 @@
 	if (!config.getNetWorkTunnelNeeded()) {
 		LOG_DEBUG("SIP will use " + String::fromNumber(_localSIPPort) + " as local SIP port");
 
+		// Stun test
+		unsigned short iTestStun;
+		for (iTestStun = 0; iTestStun < _testStunRetry; iTestStun++) {
+			LOG_DEBUG("testUDP (Stun): " + String::fromNumber(iTestStun + 1));
+			if (_networkDiscovery.testUDP(config.getNetworkStunServer())) {
+				break;
+			}
+		}
+
+		if (iTestStun == _testStunRetry) {
+			// Stun test failed
+			_networkDiscovery.setNatConfig(EnumNatType::NatTypeFullCone);
+		}
+
 		// SIP test with UDP
 		for (unsigned short i = 0; i < _testSIPRetry; i++) {
 			LOG_DEBUG("testSIP test number: " + String::fromNumber(i + 1));
diff -r baf2ec72c4cf -r 3a3d64260c88 wengophone/src/model/account/SipAccount.h
--- a/wengophone/src/model/account/SipAccount.h	Sun Mar 22 18:29:22 2009 +0100
+++ b/wengophone/src/model/account/SipAccount.h	Thu Mar 26 00:10:57 2009 +0100
@@ -545,6 +545,9 @@
 	/** Number of testSIP retry. */
 	static unsigned short _testSIPRetry;
 
+	/** Number of testSTUN retry. */
+	static unsigned short _testStunRetry;
+
 	/** name of the userprofile that uses this sipaccount */
 	std::string _userProfileName;
 
_______________________________________________
QuteCom-dev mailing list
QuteCom-dev@lists.qutecom.org
http://lists.qutecom.org/mailman/listinfo/qutecom-dev

Reply via email to