Re: [Openh323gk-users] partynumber vs e164 problem

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

 



hi   Tais M. Hansen


first of all i want to thank u for ur help for the patch u have sent

when i used this patch it doesn't work so i copied the changes in the
code to the specified functions but it also doesn't work so i have to
debug what is going on and i fount that the modification in the party
number to dialed digits was wrong  for example (E164:453:partyNumber)
must be modified to (453:dialedDigits) but the code modify it to
(453:part:dialedDigits) which is not recognized as a registered called
party so i deduced that the function (mid) that modifies the string cut
more characters than needed so i modified it to cut only 3 characters

i think this was used in a system with E164 of 8 digits also there was
an if condition that was wrong which force the function to return false
all the time so i modified it and it worked well


thank u again for ur help 

the following is the modified code i have made to
EndpointRec::CompareAlias in the rastbl.cxx 



for (PINDEX i = 0; i < a->GetSize(); i++)
{
for (PINDEX j = 0; j < m_terminalAliases.GetSize(); j++)
{
PTRACE( 3, "CXNET\ta[i] = '" << (*a)[i] << "'" );
PTRACE( 3, "CXNET\tm_terminalAliases[j] = '" << m_terminalAliases[j] <<
"'" );
if ((*a)[i] == m_terminalAliases[j])
{
PTRACE( 3, "CXNET\tMatch found." );
return true;
}
else
{
PTRACE( 3, "CXNET\tNo match - Testing for Siemens Surpass partyNumber
format." );
PString cxnet_CalledAlias, cxnet_TerminalAlias;
cxnet_CalledAlias = AsString((*a)[i]);
cxnet_TerminalAlias = AsString(m_terminalAliases[j]);
PTRACE( 3, "CXNET\tcxnet_CalledAlias = '" << cxnet_CalledAlias << "'" );
PTRACE( 3, "CXNET\tcxnet_TerminalAlias = '" << cxnet_TerminalAlias <<
"'" );

if( cxnet_CalledAlias.Left( 5 ) == "E164:"
 && cxnet_CalledAlias.Right( 12 ) == ":partyNumber" )
{
PTRACE( 3, "CXNET\tSiemens Surpass partyNumber format detected in
cxnet_CalledAlias." );

PString cxnet_ReformedAlias;
cxnet_ReformedAlias = cxnet_CalledAlias.Mid( 5, 3 ) + ":dialedDigits";

cxnet_CalledAlias = cxnet_ReformedAlias;
PTRACE( 3, "CXNET\tcxnet_ReformedAlias: '" <<  cxnet_CalledAlias << "'"
);

if( cxnet_CalledAlias == cxnet_TerminalAlias )
{
PTRACE( 3, "CXNET\tMatch found." );
return true;
}
}
}
}
}
PTRACE( 3, "CXNET\tNo match." );
return false;








-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
List: Openh323gk-users@lists.sourceforge.net
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549
Homepage: http://www.gnugk.org/

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

  Powered by Linux