Hi again, on high-density gateways we have problem with radius h323-ivr-in=terminal-alias attributes
because there many aliases and we reach radius attribute length limit, but we can send multiple VSA from
radius and spread aliases across it, this patch allow processing multiple terminal-alias VSA on GK side.
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/radauth.cxx openh323gk-new/radauth.cxx
--- openh323gk/radauth.cxx 2013-10-23 03:48:09.000000000 +0400
+++ openh323gk-new/radauth.cxx 2013-10-27 03:01:42.254706535 +0400
@@ -261,9 +261,12 @@
// process h323-ivr-in=terminal-alias attribute
if (result) {
+ PTRACE(2, "RADAUTH\t Cisco VSA terminal-alias Attributes processing started");
attr = response->FindVsaAttr(RadiusAttr::CiscoVendorId,
RadiusAttr::CiscoVSA_AV_Pair
);
+ PTRACE(2, "RADAUTH found Cisco VSA Attribute\t" << attr->AsCiscoString());
+ PStringArray aliases;
while (attr != NULL) {
PINDEX index;
value = attr->AsCiscoString();
@@ -273,34 +276,40 @@
const PINDEX semicolonpos = value.Find(';', index);
value = value.Mid(index, semicolonpos == P_MAX_INDEX
? P_MAX_INDEX : (semicolonpos-index));
- PStringArray aliases = value.Tokenise(",");
- if (aliases.GetSize() > 0
- && rrq.HasOptionalField(H225_RegistrationRequest::e_terminalAlias)) {
- PINDEX i = 0;
- while (i < rrq.m_terminalAlias.GetSize()) {
- PINDEX j = aliases.GetStringsIndex(AsString(rrq.m_terminalAlias[i], FALSE));
- if( j == P_MAX_INDEX )
- rrq.m_terminalAlias.RemoveAt(i);
- else {
- i++;
- aliases.RemoveAt(j);
- }
- }
- }
- for (PINDEX i = 0; i < aliases.GetSize(); i++) {
- if (rrq.HasOptionalField(H225_RegistrationRequest::e_terminalAlias))
- rrq.m_terminalAlias.SetSize(rrq.m_terminalAlias.GetSize()+1);
- else {
- rrq.IncludeOptionalField(H225_RegistrationRequest::e_terminalAlias);
- rrq.m_terminalAlias.SetSize(1);
- }
- H323SetAliasAddress(aliases[i], rrq.m_terminalAlias[rrq.m_terminalAlias.GetSize()-1]);
- }
- break;
+ aliases += value.Tokenise(",");
+ PTRACE(2, "RADAUTH\t" << attr->AsCiscoString() << " Cisco VSA terminal-alias added to alias list");
}
attr = response->FindVsaAttr(RadiusAttr::CiscoVendorId,
RadiusAttr::CiscoVSA_AV_Pair, attr);
}
+
+ if (aliases.GetSize() > 0 ) {
+
+ if (rrq.HasOptionalField(H225_RegistrationRequest::e_terminalAlias)) {
+ PINDEX i = 0;
+ while (i < rrq.m_terminalAlias.GetSize()) {
+ PINDEX j = aliases.GetStringsIndex(AsString(rrq.m_terminalAlias[i], FALSE));
+ if( j == P_MAX_INDEX )
+ rrq.m_terminalAlias.RemoveAt(i);
+ else {
+ i++;
+ aliases.RemoveAt(j);
+ }
+ }
+ }
+
+ for (PINDEX i = 0; i < aliases.GetSize(); i++) {
+ if (rrq.HasOptionalField(H225_RegistrationRequest::e_terminalAlias))
+ rrq.m_terminalAlias.SetSize(rrq.m_terminalAlias.GetSize()+1);
+ else {
+ rrq.IncludeOptionalField(H225_RegistrationRequest::e_terminalAlias);
+ rrq.m_terminalAlias.SetSize(1);
+ }
+ H323SetAliasAddress(aliases[i], rrq.m_terminalAlias[rrq.m_terminalAlias.GetSize()-1]);
+ }
+ PTRACE(2, "RADAUTH\t alias list added to RCF successful");
+ }
+ PTRACE(2, "RADAUTH\t Cisco VSA terminal-alias Attributes processing ended");
}
if (!result)
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________________
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/