Changed the name of the SCCP parameters for Called/CallingPartyAddress plan and translation type.
git-svn-id: http://voip.null.ro/svn/yate@5401 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
9abfd8ab44
commit
e9eac89fcf
|
@ -389,17 +389,17 @@ static bool decodeItuAddress(const SS7SCCP* sccp, NamedList& params,const SCCPPa
|
|||
} else if (gti == 0x02) { // GT includes Translation Type
|
||||
if (length < 1)
|
||||
break;
|
||||
params.addParam(gtName + ".tt", String((int)*buffer++));
|
||||
params.addParam(gtName + ".translation", String((int)*buffer++));
|
||||
length--;
|
||||
tmp.hexify((void*)buffer,length,' ');
|
||||
} else if (gti == 0x03) { // GT includes tt, np & es
|
||||
if (length < 2)
|
||||
break;
|
||||
params.addParam(gtName+ ".tt", String((int)*buffer++));
|
||||
params.addParam(gtName+ ".translation", String((int)*buffer++));
|
||||
length--;
|
||||
unsigned char npes = *buffer++;
|
||||
length--;
|
||||
getDictValue(params,gtName + ".np", npes >> 4,s_numberingPlan);
|
||||
getDictValue(params,gtName + ".plan", npes >> 4,s_numberingPlan);
|
||||
unsigned int es = npes & 0x0f;
|
||||
getDictValue(params,gtName + ".encoding", es,s_encodingScheme);
|
||||
switch (es) {
|
||||
|
@ -413,12 +413,12 @@ static bool decodeItuAddress(const SS7SCCP* sccp, NamedList& params,const SCCPPa
|
|||
} else if (gti == 0x04) { // GT includes tt, np, es & nai
|
||||
if (length < 3)
|
||||
break;
|
||||
params.addParam(gtName+ ".tt", String((int)*buffer++));
|
||||
params.addParam(gtName+ ".translation", String((int)*buffer++));
|
||||
length--;
|
||||
unsigned char npes = *buffer++;
|
||||
unsigned char es = npes & 0x0f;
|
||||
length--;
|
||||
getDictValue(params,gtName + ".np", npes >> 4,s_numberingPlan);
|
||||
getDictValue(params,gtName + ".plan", npes >> 4,s_numberingPlan);
|
||||
getDictValue(params,gtName + ".encoding", es,s_encodingScheme);
|
||||
getDictValue(params,gtName + ".nature", *buffer++ & 0x7f,s_nai);
|
||||
length--;
|
||||
|
@ -476,12 +476,12 @@ static bool decodeAnsiAddress(const SS7SCCP* sccp, NamedList& params,const SCCPP
|
|||
if (gti == 0x01) { // GT includes tt, np & es
|
||||
if (length < 2)
|
||||
break;
|
||||
params.addParam(gtName + ".tt", String((int)*buffer++));
|
||||
params.addParam(gtName + ".translation", String((int)*buffer++));
|
||||
length--;
|
||||
unsigned char npes = *buffer++;
|
||||
unsigned char es = npes & 0x0f;
|
||||
length--;
|
||||
getDictValue(params,gtName + ".np", npes >> 4, s_numberingPlan);
|
||||
getDictValue(params,gtName + ".plan", npes >> 4, s_numberingPlan);
|
||||
getDictValue(params,gtName + ".encoding", es,s_encodingScheme);
|
||||
switch (es) {
|
||||
case 1:
|
||||
|
@ -494,7 +494,7 @@ static bool decodeAnsiAddress(const SS7SCCP* sccp, NamedList& params,const SCCPP
|
|||
} else if (gti == 0x02) { // GT includes Translation Type
|
||||
if (length < 1)
|
||||
break;
|
||||
params.addParam(gtName + ".tt", String((int)*buffer++));
|
||||
params.addParam(gtName + ".translation", String((int)*buffer++));
|
||||
length--;
|
||||
tmp.hexify((void*)buffer,length,' ');
|
||||
} else {
|
||||
|
@ -707,8 +707,8 @@ static unsigned char encodeItuAddress(const SS7SCCP* sccp, SS7MSU& msu,
|
|||
return data[0];
|
||||
}
|
||||
NamedString* nature = YOBJECT(NamedString,extra->getParam(preName + ".gt.nature"));
|
||||
NamedString* translation = YOBJECT(NamedString,extra->getParam(preName + ".gt.tt"));
|
||||
NamedString* plan = YOBJECT(NamedString,extra->getParam(preName + ".gt.np"));
|
||||
NamedString* translation = YOBJECT(NamedString,extra->getParam(preName + ".gt.translation"));
|
||||
NamedString* plan = YOBJECT(NamedString,extra->getParam(preName + ".gt.plan"));
|
||||
NamedString* encoding = YOBJECT(NamedString,extra->getParam(preName + ".gt.encoding"));
|
||||
bool odd = false;
|
||||
DataBlock* digits = 0;
|
||||
|
@ -771,7 +771,7 @@ static unsigned char encodeItuAddress(const SS7SCCP* sccp, SS7MSU& msu,
|
|||
int nai = nature->toInteger(s_nai);
|
||||
data[++length] = nai & 0x7f;
|
||||
} else {
|
||||
Debug(sccp,DebugWarn,"Can not encode ITU GTI. Unknown GTI value for : nai= %s, NpEs = %s, tt = %s",
|
||||
Debug(sccp,DebugWarn,"Can not encode ITU GTI. Unknown GTI value for : nai= %s, Plan & Encoding = %s, TranslationType = %s",
|
||||
nature? "present" : "missing",(plan && encoding)? "present" : "missing",translation ? "present" : "missing");
|
||||
return 0;
|
||||
}
|
||||
|
@ -830,8 +830,8 @@ static unsigned char encodeAnsiAddress(const SS7SCCP* sccp, SS7MSU& msu,
|
|||
tmp.clear(false);
|
||||
return data[0];
|
||||
}
|
||||
NamedString* translation = YOBJECT(NamedString,extra->getParam(preName + ".gt.tt"));
|
||||
NamedString* plan = YOBJECT(NamedString,extra->getParam(preName + ".gt.np"));
|
||||
NamedString* translation = YOBJECT(NamedString,extra->getParam(preName + ".gt.translation"));
|
||||
NamedString* plan = YOBJECT(NamedString,extra->getParam(preName + ".gt.plan"));
|
||||
NamedString* encoding = YOBJECT(NamedString,extra->getParam(preName + ".gt.encoding"));
|
||||
DataBlock* digits = 0;
|
||||
bool odd = false;
|
||||
|
@ -865,7 +865,7 @@ static unsigned char encodeAnsiAddress(const SS7SCCP* sccp, SS7MSU& msu,
|
|||
}
|
||||
data[++length] = ((np & 0x0f) << 4) | (es & 0x0f);
|
||||
} else {
|
||||
Debug(sccp,DebugWarn,"Can not encode ANSI GTI. Unknown GTI value for : NpEs = %s, tt = %s",
|
||||
Debug(sccp,DebugWarn,"Can not encode ANSI GTI. Unknown GTI value for : Plan & Encoding = %s, TranslationType = %s",
|
||||
(plan && encoding)? "present" : "missing",translation ? "present" : "missing");
|
||||
return 0;
|
||||
}
|
||||
|
@ -3221,8 +3221,8 @@ unsigned int SS7SCCP::getAddressLength(const NamedList& params, const String& pr
|
|||
} else
|
||||
length += data.length();
|
||||
const NamedString* nature = YOBJECT(NamedString,params.getParam(prefix + ".gt.nature"));
|
||||
const NamedString* translation = YOBJECT(NamedString,params.getParam(prefix + ".gt.tt"));
|
||||
const NamedString* plan = YOBJECT(NamedString,params.getParam(prefix + ".gt.np"));
|
||||
const NamedString* translation = YOBJECT(NamedString,params.getParam(prefix + ".gt.translation"));
|
||||
const NamedString* plan = YOBJECT(NamedString,params.getParam(prefix + ".gt.plan"));
|
||||
const NamedString* encoding = YOBJECT(NamedString,params.getParam(prefix + ".gt.encoding"));
|
||||
if (nature)
|
||||
length++;
|
||||
|
|
|
@ -5261,13 +5261,13 @@ public:
|
|||
* RemotePC : integer. Remote pointcode
|
||||
* Address Parameter:
|
||||
* Address parameter starts with : CallingPartyAddress or CalledPartyAddress followed by:
|
||||
* .ssn : integer (0-255) Subsequence number
|
||||
* .pointcode : integer Packed pointcode
|
||||
* .gt : string The digits of the global title
|
||||
* .gt.np : integer GT numbering plan
|
||||
* .gt.encoding : integer GT encoding scheme
|
||||
* .gt.tt : integer GT Translation type
|
||||
* .gt.nature : integer Gt nature of address indicator (ITU only)
|
||||
* .ssn : integer (0-255) Subsequence number
|
||||
* .pointcode : integer Packed pointcode
|
||||
* .gt : string The digits of the global title
|
||||
* .gt.plan : integer GT numbering plan
|
||||
* .gt.encoding : integer GT encoding scheme
|
||||
* .gt.translation : integer GT Translation type
|
||||
* .gt.nature : integer Gt nature of address indicator (ITU only)
|
||||
* Importance : integer (0-7) Importance of the message! (ITU only)
|
||||
*/
|
||||
virtual int sendMessage(DataBlock& data, const NamedList& params);
|
||||
|
|
|
@ -7170,18 +7170,18 @@ const XMLMap TcapToXml::s_xmlMap[] = {
|
|||
{Regexp("^ReturnCause$"), "transport.sccp", "ReturnCause", TcapToXml::Element},
|
||||
{Regexp("^HopCounter$"), "transport.sccp", "HopCounter", TcapToXml::Element},
|
||||
{Regexp("^CallingPartyAddress\\.gt\\.encoding$"), "transport.sccp.CallingPartyAddress.gt", "encoding", TcapToXml::Attribute},
|
||||
{Regexp("^CallingPartyAddress\\.gt\\.np$"), "transport.sccp.CallingPartyAddress.gt", "plan", TcapToXml::Attribute},
|
||||
{Regexp("^CallingPartyAddress\\.gt\\.plan$"), "transport.sccp.CallingPartyAddress.gt", "plan", TcapToXml::Attribute},
|
||||
{Regexp("^CallingPartyAddress\\.gt\\.nature$"), "transport.sccp.CallingPartyAddress.gt", "nature", TcapToXml::Attribute},
|
||||
{Regexp("^CallingPartyAddress\\.gt\\.tt$"), "transport.sccp.CallingPartyAddress.gt", "translation", TcapToXml::Attribute},
|
||||
{Regexp("^CallingPartyAddress\\.gt\\.translation$"), "transport.sccp.CallingPartyAddress.gt", "translation", TcapToXml::Attribute},
|
||||
{Regexp("^CallingPartyAddress\\.gt$"), "transport.sccp.CallingPartyAddress", "gt", TcapToXml::Element},
|
||||
{Regexp("^CallingPartyAddress\\.ssn$"), "transport.sccp.CallingPartyAddress", "ssn", TcapToXml::Element},
|
||||
{Regexp("^CallingPartyAddress\\.route$"), "transport.sccp.CallingPartyAddress", "route", TcapToXml::Element},
|
||||
{Regexp("^CallingPartyAddress\\.pointcode$"), "transport.sccp.CallingPartyAddress", "pointcode", TcapToXml::Element},
|
||||
{Regexp("^CallingPartyAddress\\..\\+$"), "transport.sccp.CallingPartyAddress", "", TcapToXml::Element},
|
||||
{Regexp("^CalledPartyAddress\\.gt\\.encoding$"), "transport.sccp.CalledPartyAddress.gt", "encoding", TcapToXml::Attribute},
|
||||
{Regexp("^CalledPartyAddress\\.gt\\.np$"), "transport.sccp.CalledPartyAddress.gt", "plan", TcapToXml::Attribute},
|
||||
{Regexp("^CalledPartyAddress\\.gt\\.plan$"), "transport.sccp.CalledPartyAddress.gt", "plan", TcapToXml::Attribute},
|
||||
{Regexp("^CalledPartyAddress\\.gt\\.nature$"), "transport.sccp.CalledPartyAddress.gt", "nature", TcapToXml::Attribute},
|
||||
{Regexp("^CalledPartyAddress\\.gt\\.tt$"), "transport.sccp.CalledPartyAddress.gt", "translation", TcapToXml::Attribute},
|
||||
{Regexp("^CalledPartyAddress\\.gt\\.translation$"), "transport.sccp.CalledPartyAddress.gt", "translation", TcapToXml::Attribute},
|
||||
{Regexp("^CalledPartyAddress\\.gt$"), "transport.sccp.CalledPartyAddress", "gt", TcapToXml::Element},
|
||||
{Regexp("^CalledPartyAddress\\.ssn$"), "transport.sccp.CalledPartyAddress", "ssn", TcapToXml::Element},
|
||||
{Regexp("^CalledPartyAddress\\.route$"), "transport.sccp.CalledPartyAddress", "route", TcapToXml::Element},
|
||||
|
@ -7583,15 +7583,9 @@ bool TcapToXml::decodeOperation(Operation* op, XmlElement* elem, DataBlock& data
|
|||
const TCAPMap XmlToTcap::s_tcapMap[] = {
|
||||
{"c", false, ""},
|
||||
{"transport.mtp.", true, ""},
|
||||
{"transport.sccp.CallingPartyAddress.gt.encoding", false, "CallingPartyAddress.gt.encoding"},
|
||||
{"transport.sccp.CallingPartyAddress.gt.plan", false, "CallingPartyAddress.gt.np"},
|
||||
{"transport.sccp.CallingPartyAddress.gt.nature", false, "CallingPartyAddress.gt.nature"},
|
||||
{"transport.sccp.CallingPartyAddress.gt.translation", false, "CallingPartyAddress.gt.tt"},
|
||||
{"transport.sccp.CallingPartyAddress.gt.", true, "CallingPartyAddress.gt"},
|
||||
{"transport.sccp.CallingPartyAddress.", true, "CallingPartyAddress"},
|
||||
{"transport.sccp.CalledPartyAddress.gt.encoding", false, "CalledPartyAddress.gt.encoding"},
|
||||
{"transport.sccp.CalledPartyAddress.gt.plan", false, "CalledPartyAddress.gt.np"},
|
||||
{"transport.sccp.CalledPartyAddress.gt.nature", false, "CalledPartyAddress.gt.nature"},
|
||||
{"transport.sccp.CalledPartyAddress.gt.translation", false, "CalledPartyAddress.gt.tt"},
|
||||
{"transport.sccp.CalledPartyAddress.gt.", true, "CalledPartyAddress.gt"},
|
||||
{"transport.sccp.CalledPartyAddress.", true, "CalledPartyAddress"},
|
||||
{"transport.sccp.", true, ""},
|
||||
{"transport.tcap.request-type", false, "tcap.request.type"},
|
||||
|
@ -7945,10 +7939,14 @@ bool XmlToTcap::parse(NamedList& tcapParams, XmlElement* elem, String prefix, co
|
|||
String find = (!TelEngine::null(prefix) ? prefix + "." + ns->name() : ns->name());
|
||||
const TCAPMap* map = findMap(find);
|
||||
if (map) {
|
||||
if (!TelEngine::null(map->name))
|
||||
tcapParams.addParam(map->name,*ns);
|
||||
else
|
||||
tcapParams.addParam(ns->name(),elem->getText());
|
||||
if (TelEngine::null(map->name))
|
||||
tcapParams.addParam(find,*ns);
|
||||
else {
|
||||
if (map->isPrefix)
|
||||
tcapParams.addParam(map->name + "." + ns->name(),*ns);
|
||||
else
|
||||
tcapParams.addParam(map->name,*ns);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hasChildren) {
|
||||
|
|
Loading…
Reference in New Issue