Re: annoing endpoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012-01-17 21:44 +0100, Jan Willamowius wrote openh323gk-users@xxxxxxxxx...:

Thanks Jan, see it already, i have another one - it fixes unregistered calls with no src/empty
username/alis/calling paty and radalias auth scheme, if such calls comes, request to radius 
contains no User-Name attribute, but it is mandatory for radius, hi cannot process request 
without this attribute, and call is rejected, there is one switch which define username in
such case which is send to radius if we cannot compose User-Name attribute from incoming 
setup message.

JW>Thanks, Yuriy!
JW>
JW>Patch applied.
JW>
JW>
JW>Georgiewskiy Yuriy wrote:
JW>> 
JW>> Hi, we have a number of annoing enpoints which send full RRQ regardless hi is registered already,
JW>> more, for example cisco as5300 send RRQ on ethery outbound call and i don't known why and i don't
JW>> find any way to disable such behavior, all this produse RCF messages on console which is annoing
JW>> me and my support, i make a small patch, it add one switch to config which disable RCF printing
JW>> if endpoint already registered.
JW>
JW>

C уважением                       With Best Regards
Георгиевский Юрий.                Georgiewskiy Yuriy
+7 4872 711666                    +7 4872 711666
факс +7 4872 711143               fax +7 4872 711143
Компания ООО "Ай Ти Сервис"       IT Service Ltd
http://nkoort.ru                  http://nkoort.ru
JID: GHhost@xxxxxxxxxx            JID: GHhost@xxxxxxxxxx
YG129-RIPE                        YG129-RIPE
diff -ruN openh323gk/gk.cxx openh323gk-new/gk.cxx
--- openh323gk/gk.cxx	2012-01-17 20:14:00.000000000 +0400
+++ openh323gk-new/gk.cxx	2012-01-18 00:52:47.000000000 +0400
@@ -309,6 +309,7 @@
 	{ "RadAliasAuth", "SharedSecret" },
 	{ "RadAliasAuth", "SocketDeleteTimeout" },
 	{ "RadAliasAuth", "UseDialedNumber" },
+	{ "RadAliasAuth", "EmptyUsername" },
 	{ "RadAuth", "AppendCiscoAttributes" },
 	{ "RadAuth", "DefaultAuthPort" },
 	{ "RadAuth", "IdCacheTimeout" },
diff -ruN openh323gk/radauth.cxx openh323gk-new/radauth.cxx
--- openh323gk/radauth.cxx	2011-12-08 09:34:00.000000000 +0400
+++ openh323gk-new/radauth.cxx	2012-01-18 00:51:52.000000000 +0400
@@ -1249,6 +1249,9 @@
 	m_fixedPassword = Toolkit::Instance()->ReadPassword(
 		RadAliasAuthConfigSectionName, "FixedPassword"
 		);
+	m_emptyUsername = GetConfig()->GetString(
+		RadAliasAuthConfigSectionName, "EmptyUsername", ""
+		);
 }
 
 RadAliasAuth::~RadAliasAuth()
@@ -1333,14 +1336,19 @@
 	) const
 {
 	const PString id = GetUsername(setup, authData);
-	if (id.IsEmpty() && m_fixedUsername.IsEmpty()) {
+	if (id.IsEmpty() && m_fixedUsername.IsEmpty() && m_emptyUsername.IsEmpty()) {
 		PTRACE(3, "RADAUTH\t" << GetName() << " Setup check failed: "
-			"neither FixedUsername nor alias inside Setup were found"
+			"neither EmptyUsername nor FixedUsername nor alias inside Setup were found"
 			);
 		authData.m_rejectReason = H225_ReleaseCompleteReason::e_badFormatAddress;
 		return GetDefaultStatus();
 	}
-	
+
+	// append EmptyUsername
+	if (id.IsEmpty() && !m_emptyUsername.IsEmpty()) {
+	pdu.AppendAttr(RadiusAttr::UserName, m_emptyUsername);
+	}
+
 	// append User-Name
    	pdu.AppendAttr(RadiusAttr::UserName, 
 		m_fixedUsername.IsEmpty() ? id : m_fixedUsername
diff -ruN openh323gk/radauth.h openh323gk-new/radauth.h
--- openh323gk/radauth.h	2011-12-08 09:34:00.000000000 +0400
+++ openh323gk-new/radauth.h	2012-01-18 00:51:52.000000000 +0400
@@ -288,6 +288,8 @@
 protected:
 	/// fixed value for User-Name attribute, read from config
 	PString m_fixedUsername;
+	/// fixed value for User-Name attribute for unregistered calls with empty h323 id
+	PString m_emptyUsername;
 	/// fixed valud for User-Password attribute, read from config
 	PString m_fixedPassword;
 };
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________________

Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: http://www.gnugk.org/

[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux