Optimized const String usage in the ysig library.
git-svn-id: http://voip.null.ro/svn/yate@4428 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
07502db52d
commit
cba5cf2e63
|
@ -211,20 +211,20 @@ bool SignallingDumpable::setDumper(const String& name, bool create, bool append)
|
||||||
|
|
||||||
bool SignallingDumpable::control(NamedList& params, SignallingComponent* owner)
|
bool SignallingDumpable::control(NamedList& params, SignallingComponent* owner)
|
||||||
{
|
{
|
||||||
String* tmp = params.getParam("operation");
|
String* tmp = params.getParam(YSTRING("operation"));
|
||||||
if (!(tmp && (*tmp == "sigdump")))
|
if (!(tmp && (*tmp == YSTRING("sigdump"))))
|
||||||
return false;
|
return false;
|
||||||
tmp = params.getParam("component");
|
tmp = params.getParam(YSTRING("component"));
|
||||||
if (tmp && *tmp && owner && (owner->toString() != *tmp))
|
if (tmp && *tmp && owner && (owner->toString() != *tmp))
|
||||||
return false;
|
return false;
|
||||||
tmp = params.getParam("completion");
|
tmp = params.getParam(YSTRING("completion"));
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
if (!owner)
|
if (!owner)
|
||||||
return false;
|
return false;
|
||||||
String part = params.getValue("partword");
|
String part = params.getValue(YSTRING("partword"));
|
||||||
return Module::itemComplete(*tmp,owner->toString(),part);
|
return Module::itemComplete(*tmp,owner->toString(),part);
|
||||||
}
|
}
|
||||||
tmp = params.getParam("file");
|
tmp = params.getParam(YSTRING("file"));
|
||||||
if (tmp)
|
if (tmp)
|
||||||
return setDumper(*tmp);
|
return setDumper(*tmp);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -92,21 +92,21 @@ SignallingComponent* SignallingFactory::build(const String& type, const NamedLis
|
||||||
lock.drop();
|
lock.drop();
|
||||||
DDebug(DebugInfo,"Factory creating default '%s' named '%s'",type.c_str(),name->c_str());
|
DDebug(DebugInfo,"Factory creating default '%s' named '%s'",type.c_str(),name->c_str());
|
||||||
// now build some objects we know about
|
// now build some objects we know about
|
||||||
if (type == "SS7MTP2")
|
if (type == YSTRING("SS7MTP2"))
|
||||||
return new SS7MTP2(*name);
|
return new SS7MTP2(*name);
|
||||||
else if (type == "SS7M2PA")
|
else if (type == YSTRING("SS7M2PA"))
|
||||||
return new SS7M2PA(*name);
|
return new SS7M2PA(*name);
|
||||||
else if (type == "SS7MTP3")
|
else if (type == YSTRING("SS7MTP3"))
|
||||||
return new SS7MTP3(*name);
|
return new SS7MTP3(*name);
|
||||||
else if (type == "SS7Router")
|
else if (type == YSTRING("SS7Router"))
|
||||||
return new SS7Router(*name);
|
return new SS7Router(*name);
|
||||||
else if (type == "SS7Management")
|
else if (type == YSTRING("SS7Management"))
|
||||||
return new SS7Management(*name);
|
return new SS7Management(*name);
|
||||||
else if (type == "ISDNQ921")
|
else if (type == YSTRING("ISDNQ921"))
|
||||||
return new ISDNQ921(*name,*name);
|
return new ISDNQ921(*name,*name);
|
||||||
else if (type == "ISDNQ931")
|
else if (type == YSTRING("ISDNQ931"))
|
||||||
return new ISDNQ931(*name,*name);
|
return new ISDNQ931(*name,*name);
|
||||||
else if (type == "ISDNQ931Monitor")
|
else if (type == YSTRING("ISDNQ931Monitor"))
|
||||||
return new ISDNQ931Monitor(*name,*name);
|
return new ISDNQ931Monitor(*name,*name);
|
||||||
Debug(DebugMild,"Factory could not create '%s' named '%s'",type.c_str(),name->c_str());
|
Debug(DebugMild,"Factory could not create '%s' named '%s'",type.c_str(),name->c_str());
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -132,9 +132,9 @@ SignallingComponent::SignallingComponent(const char* name, const NamedList* para
|
||||||
: m_engine(0), m_compType("unknown")
|
: m_engine(0), m_compType("unknown")
|
||||||
{
|
{
|
||||||
if (params) {
|
if (params) {
|
||||||
name = params->getValue("debugname",name);
|
name = params->getValue(YSTRING("debugname"),name);
|
||||||
m_compType = params->getValue("type",m_compType);
|
m_compType = params->getValue(YSTRING("type"),m_compType);
|
||||||
debugLevel(params->getIntValue("debuglevel",-1));
|
debugLevel(params->getIntValue(YSTRING("debuglevel"),-1));
|
||||||
}
|
}
|
||||||
DDebug(engine(),DebugAll,"Component '%s' created [%p]",name,this);
|
DDebug(engine(),DebugAll,"Component '%s' created [%p]",name,this);
|
||||||
setName(name);
|
setName(name);
|
||||||
|
|
|
@ -2062,7 +2062,7 @@ static void getMsgCompat(SS7MsgISUP* msg, bool& release, bool& cnf)
|
||||||
{
|
{
|
||||||
if (!msg)
|
if (!msg)
|
||||||
return;
|
return;
|
||||||
String* msgCompat = msg->params().getParam("MessageCompatInformation");
|
String* msgCompat = msg->params().getParam(YSTRING("MessageCompatInformation"));
|
||||||
if (msgCompat) {
|
if (msgCompat) {
|
||||||
ObjList* l = msgCompat->split(',',false);
|
ObjList* l = msgCompat->split(',',false);
|
||||||
// Use a while() to make sure the list is destroyed
|
// Use a while() to make sure the list is destroyed
|
||||||
|
@ -2209,7 +2209,7 @@ SignallingEvent* SS7ISUPCall::getEvent(const Time& when)
|
||||||
}
|
}
|
||||||
// Process received messages
|
// Process received messages
|
||||||
msg = static_cast<SS7MsgISUP*>(dequeue());
|
msg = static_cast<SS7MsgISUP*>(dequeue());
|
||||||
if (msg && validMsgState(false,msg->type(),(msg->params().getParam("BackwardCallIndicators") != 0)))
|
if (msg && validMsgState(false,msg->type(),(msg->params().getParam(YSTRING("BackwardCallIndicators")) != 0)))
|
||||||
switch (msg->type()) {
|
switch (msg->type()) {
|
||||||
case SS7MsgISUP::IAM:
|
case SS7MsgISUP::IAM:
|
||||||
case SS7MsgISUP::CCR:
|
case SS7MsgISUP::CCR:
|
||||||
|
@ -2237,7 +2237,7 @@ SignallingEvent* SS7ISUPCall::getEvent(const Time& when)
|
||||||
break;
|
break;
|
||||||
case SS7MsgISUP::SAM:
|
case SS7MsgISUP::SAM:
|
||||||
setOverlapped(isCalledIncomplete(msg->params(),"SubsequentNumber"));
|
setOverlapped(isCalledIncomplete(msg->params(),"SubsequentNumber"));
|
||||||
msg->params().addParam("tone",msg->params().getValue("SubsequentNumber"));
|
msg->params().addParam("tone",msg->params().getValue(YSTRING("SubsequentNumber")));
|
||||||
msg->params().addParam("dialing",String::boolText(true));
|
msg->params().addParam("dialing",String::boolText(true));
|
||||||
m_lastEvent = new SignallingEvent(SignallingEvent::Info,msg,this);
|
m_lastEvent = new SignallingEvent(SignallingEvent::Info,msg,this);
|
||||||
break;
|
break;
|
||||||
|
@ -2380,7 +2380,7 @@ bool SS7ISUPCall::sendEvent(SignallingEvent* event)
|
||||||
setOverlapped(isCalledIncomplete(m_iamMsg->params()));
|
setOverlapped(isCalledIncomplete(m_iamMsg->params()));
|
||||||
if (m_overlap) {
|
if (m_overlap) {
|
||||||
// Check for maximum number of digits allowed
|
// Check for maximum number of digits allowed
|
||||||
String* called = m_iamMsg->params().getParam("CalledPartyNumber");
|
String* called = m_iamMsg->params().getParam(YSTRING("CalledPartyNumber"));
|
||||||
if (called && called->length() > isup()->m_maxCalledDigits) {
|
if (called && called->length() > isup()->m_maxCalledDigits) {
|
||||||
m_samDigits = called->substr(isup()->m_maxCalledDigits);
|
m_samDigits = called->substr(isup()->m_maxCalledDigits);
|
||||||
*called = called->substr(0,isup()->m_maxCalledDigits);
|
*called = called->substr(0,isup()->m_maxCalledDigits);
|
||||||
|
@ -2398,7 +2398,7 @@ bool SS7ISUPCall::sendEvent(SignallingEvent* event)
|
||||||
if (event->message()) {
|
if (event->message()) {
|
||||||
copyUpper(m->params(),event->message()->params());
|
copyUpper(m->params(),event->message()->params());
|
||||||
m_inbandAvailable = m_inbandAvailable ||
|
m_inbandAvailable = m_inbandAvailable ||
|
||||||
event->message()->params().getBoolValue("earlymedia");
|
event->message()->params().getBoolValue(YSTRING("earlymedia"));
|
||||||
}
|
}
|
||||||
if (m_inbandAvailable)
|
if (m_inbandAvailable)
|
||||||
SignallingUtils::appendFlag(m->params(),"OptionalBackwardCallIndicators","inband");
|
SignallingUtils::appendFlag(m->params(),"OptionalBackwardCallIndicators","inband");
|
||||||
|
@ -2413,7 +2413,7 @@ bool SS7ISUPCall::sendEvent(SignallingEvent* event)
|
||||||
if (event->message()) {
|
if (event->message()) {
|
||||||
copyUpper(m->params(),event->message()->params());
|
copyUpper(m->params(),event->message()->params());
|
||||||
m_inbandAvailable = m_inbandAvailable ||
|
m_inbandAvailable = m_inbandAvailable ||
|
||||||
event->message()->params().getBoolValue("earlymedia");
|
event->message()->params().getBoolValue(YSTRING("earlymedia"));
|
||||||
}
|
}
|
||||||
if (m_inbandAvailable)
|
if (m_inbandAvailable)
|
||||||
SignallingUtils::appendFlag(m->params(),"OptionalBackwardCallIndicators","inband");
|
SignallingUtils::appendFlag(m->params(),"OptionalBackwardCallIndicators","inband");
|
||||||
|
@ -2440,7 +2440,7 @@ bool SS7ISUPCall::sendEvent(SignallingEvent* event)
|
||||||
break;
|
break;
|
||||||
case SignallingEvent::Generic:
|
case SignallingEvent::Generic:
|
||||||
if (event->message()) {
|
if (event->message()) {
|
||||||
const String& oper = event->message()->params()["operation"];
|
const String& oper = event->message()->params()[YSTRING("operation")];
|
||||||
if (oper != "transport")
|
if (oper != "transport")
|
||||||
break;
|
break;
|
||||||
if (!validMsgState(true,SS7MsgISUP::APM))
|
if (!validMsgState(true,SS7MsgISUP::APM))
|
||||||
|
@ -2474,7 +2474,7 @@ bool SS7ISUPCall::sendEvent(SignallingEvent* event)
|
||||||
case SignallingEvent::Info:
|
case SignallingEvent::Info:
|
||||||
if (validMsgState(true,SS7MsgISUP::SAM)) {
|
if (validMsgState(true,SS7MsgISUP::SAM)) {
|
||||||
mylock.drop();
|
mylock.drop();
|
||||||
transmitSAM(event->message()->params().getValue("tone"));
|
transmitSAM(event->message()->params().getValue(YSTRING("tone")));
|
||||||
result = true;
|
result = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2498,9 +2498,9 @@ bool SS7ISUPCall::sendEvent(SignallingEvent* event)
|
||||||
// Get reserved circuit or this object
|
// Get reserved circuit or this object
|
||||||
void* SS7ISUPCall::getObject(const String& name) const
|
void* SS7ISUPCall::getObject(const String& name) const
|
||||||
{
|
{
|
||||||
if (name == "SignallingCircuit")
|
if (name == YSTRING("SignallingCircuit"))
|
||||||
return m_circuit;
|
return m_circuit;
|
||||||
if (name == "SS7ISUPCall")
|
if (name == YSTRING("SS7ISUPCall"))
|
||||||
return (void*)this;
|
return (void*)this;
|
||||||
return SignallingCall::getObject(name);
|
return SignallingCall::getObject(name);
|
||||||
}
|
}
|
||||||
|
@ -2601,23 +2601,23 @@ bool SS7ISUPCall::copyParamIAM(SS7MsgISUP* msg, bool outgoing, SignallingMessage
|
||||||
param(dest,src,"CallingPartyNumber.restrict","callerpres",isup()->m_numPresentation);
|
param(dest,src,"CallingPartyNumber.restrict","callerpres",isup()->m_numPresentation);
|
||||||
param(dest,src,"CallingPartyNumber.screened","callerscreening",isup()->m_numScreening);
|
param(dest,src,"CallingPartyNumber.screened","callerscreening",isup()->m_numScreening);
|
||||||
param(dest,src,"CallingPartyNumber.complete","complete","true");
|
param(dest,src,"CallingPartyNumber.complete","complete","true");
|
||||||
m_format = src.getValue("format",isup()->format());
|
m_format = src.getValue(YSTRING("format"),isup()->format());
|
||||||
dest.addParam("UserServiceInformation",m_format);
|
dest.addParam("UserServiceInformation",m_format);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Incoming call
|
// Incoming call
|
||||||
m_format = dest.getValue("UserServiceInformation",isup()->format());
|
m_format = dest.getValue(YSTRING("UserServiceInformation"),isup()->format());
|
||||||
dest.setParam("format",m_format);
|
dest.setParam("format",m_format);
|
||||||
dest.setParam("caller",dest.getValue("CallingPartyNumber"));
|
dest.setParam("caller",dest.getValue(YSTRING("CallingPartyNumber")));
|
||||||
//dest.setParam("callername",dest.getValue(""));
|
//dest.setParam("callername",dest.getValue(""));
|
||||||
dest.setParam("callernumtype",dest.getValue("CallingPartyNumber.nature"));
|
dest.setParam("callernumtype",dest.getValue(YSTRING("CallingPartyNumber.nature")));
|
||||||
dest.setParam("callernumplan",dest.getValue("CallingPartyNumber.plan"));
|
dest.setParam("callernumplan",dest.getValue(YSTRING("CallingPartyNumber.plan")));
|
||||||
dest.setParam("callerpres",dest.getValue("CallingPartyNumber.restrict"));
|
dest.setParam("callerpres",dest.getValue(YSTRING("CallingPartyNumber.restrict")));
|
||||||
dest.setParam("callerscreening",dest.getValue("CallingPartyNumber.screened"));
|
dest.setParam("callerscreening",dest.getValue(YSTRING("CallingPartyNumber.screened")));
|
||||||
dest.setParam("called",dest.getValue("CalledPartyNumber"));
|
dest.setParam("called",dest.getValue(YSTRING("CalledPartyNumber")));
|
||||||
dest.setParam("callednumtype",dest.getValue("CalledPartyNumber.nature"));
|
dest.setParam("callednumtype",dest.getValue(YSTRING("CalledPartyNumber.nature")));
|
||||||
dest.setParam("callednumplan",dest.getValue("CalledPartyNumber.plan"));
|
dest.setParam("callednumplan",dest.getValue(YSTRING("CalledPartyNumber.plan")));
|
||||||
dest.setParam("inn",dest.getValue("CalledPartyNumber.inn"));
|
dest.setParam("inn",dest.getValue(YSTRING("CalledPartyNumber.inn")));
|
||||||
if (m_label.sls() != 0xff)
|
if (m_label.sls() != 0xff)
|
||||||
dest.setParam("sls",String((unsigned int)m_label.sls()));
|
dest.setParam("sls",String((unsigned int)m_label.sls()));
|
||||||
return true;
|
return true;
|
||||||
|
@ -2670,9 +2670,9 @@ void SS7ISUPCall::setReason(const char* reason, SignallingMessage* msg,
|
||||||
m_location = location;
|
m_location = location;
|
||||||
}
|
}
|
||||||
else if (msg) {
|
else if (msg) {
|
||||||
m_reason = msg->params().getValue("CauseIndicators",msg->params().getValue("reason"));
|
m_reason = msg->params().getValue(YSTRING("CauseIndicators"),msg->params().getValue(YSTRING("reason")));
|
||||||
m_diagnostic = msg->params().getValue("CauseIndicators.diagnostic",diagnostic);
|
m_diagnostic = msg->params().getValue(YSTRING("CauseIndicators.diagnostic"),diagnostic);
|
||||||
m_location = msg->params().getValue("CauseIndicators.location",location);
|
m_location = msg->params().getValue(YSTRING("CauseIndicators.location"),location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2865,7 +2865,7 @@ bool SS7ISUPCall::needsTesting(const SS7MsgISUP* msg)
|
||||||
{
|
{
|
||||||
if ((m_state >= Testing) || !msg)
|
if ((m_state >= Testing) || !msg)
|
||||||
return false;
|
return false;
|
||||||
const String* naci = msg->params().getParam("NatureOfConnectionIndicators");
|
const String* naci = msg->params().getParam(YSTRING("NatureOfConnectionIndicators"));
|
||||||
if (!naci)
|
if (!naci)
|
||||||
return false;
|
return false;
|
||||||
ObjList* list = naci->split(',',false);
|
ObjList* list = naci->split(',',false);
|
||||||
|
@ -2887,12 +2887,12 @@ SignallingEvent* SS7ISUPCall::processSegmented(SS7MsgISUP* sgm, bool timeout)
|
||||||
#define COPY_PARAM(param) \
|
#define COPY_PARAM(param) \
|
||||||
m_sgmMsg->params().copyParam(sgm->params(),param); \
|
m_sgmMsg->params().copyParam(sgm->params(),param); \
|
||||||
m_sgmMsg->params().copyParam(sgm->params(),param,'.');
|
m_sgmMsg->params().copyParam(sgm->params(),param,'.');
|
||||||
COPY_PARAM("AccessTranport")
|
COPY_PARAM(YSTRING("AccessTranport"))
|
||||||
COPY_PARAM("UserToUserInformation")
|
COPY_PARAM(YSTRING("UserToUserInformation"))
|
||||||
COPY_PARAM("MessageCompatInformation")
|
COPY_PARAM(YSTRING("MessageCompatInformation"))
|
||||||
COPY_PARAM("GenericDigits")
|
COPY_PARAM(YSTRING("GenericDigits"))
|
||||||
COPY_PARAM("GenericNotification")
|
COPY_PARAM(YSTRING("GenericNotification"))
|
||||||
COPY_PARAM("GenericNumber")
|
COPY_PARAM(YSTRING("GenericNumber"))
|
||||||
#undef COPY_PARAM
|
#undef COPY_PARAM
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2907,8 +2907,8 @@ SignallingEvent* SS7ISUPCall::processSegmented(SS7MsgISUP* sgm, bool timeout)
|
||||||
switch (m_sgmMsg->type()) {
|
switch (m_sgmMsg->type()) {
|
||||||
case SS7MsgISUP::COT:
|
case SS7MsgISUP::COT:
|
||||||
{
|
{
|
||||||
const String* cont = m_sgmMsg->params().getParam("ContinuityIndicators");
|
const String* cont = m_sgmMsg->params().getParam(YSTRING("ContinuityIndicators"));
|
||||||
bool ok = cont && (*cont == "success");
|
bool ok = cont && (*cont == YSTRING("success"));
|
||||||
if (ok) {
|
if (ok) {
|
||||||
Debug(isup(),DebugNote,"Call(%u). Continuity check succeeded [%p]",
|
Debug(isup(),DebugNote,"Call(%u). Continuity check succeeded [%p]",
|
||||||
id(),this);
|
id(),this);
|
||||||
|
@ -3141,7 +3141,7 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
||||||
¶ms,this,tmp.c_str());
|
¶ms,this,tmp.c_str());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
const char* stype = params.getValue("pointcodetype");
|
const char* stype = params.getValue(YSTRING("pointcodetype"));
|
||||||
m_type = SS7PointCode::lookup(stype);
|
m_type = SS7PointCode::lookup(stype);
|
||||||
if (m_type == SS7PointCode::Other) {
|
if (m_type == SS7PointCode::Other) {
|
||||||
Debug(this,DebugWarn,"Invalid point code type '%s'",c_safe(stype));
|
Debug(this,DebugWarn,"Invalid point code type '%s'",c_safe(stype));
|
||||||
|
@ -3150,7 +3150,7 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
||||||
if (m_type == SS7PointCode::ITU)
|
if (m_type == SS7PointCode::ITU)
|
||||||
m_defaultSls = SlsCircuit;
|
m_defaultSls = SlsCircuit;
|
||||||
|
|
||||||
m_format = params.getValue("format");
|
m_format = params.getValue(YSTRING("format"));
|
||||||
if (-1 == lookup(m_format,SignallingUtils::dict(1,0),-1))
|
if (-1 == lookup(m_format,SignallingUtils::dict(1,0),-1))
|
||||||
switch (m_type) {
|
switch (m_type) {
|
||||||
case SS7PointCode::ANSI:
|
case SS7PointCode::ANSI:
|
||||||
|
@ -3163,29 +3163,29 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
||||||
m_format = "alaw";
|
m_format = "alaw";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* rpc = params.getValue("remotepointcode");
|
const char* rpc = params.getValue(YSTRING("remotepointcode"));
|
||||||
m_remotePoint = new SS7PointCode(0,0,0);
|
m_remotePoint = new SS7PointCode(0,0,0);
|
||||||
if (!(m_remotePoint->assign(rpc,m_type) && m_remotePoint->pack(m_type))) {
|
if (!(m_remotePoint->assign(rpc,m_type) && m_remotePoint->pack(m_type))) {
|
||||||
Debug(this,DebugMild,"Invalid remotepointcode='%s'",rpc);
|
Debug(this,DebugMild,"Invalid remotepointcode='%s'",rpc);
|
||||||
TelEngine::destruct(m_remotePoint);
|
TelEngine::destruct(m_remotePoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lockGroup = params.getBoolValue("lockgroup",m_lockGroup);
|
m_lockGroup = params.getBoolValue(YSTRING("lockgroup"),m_lockGroup);
|
||||||
m_earlyAcm = params.getBoolValue("earlyacm",m_earlyAcm);
|
m_earlyAcm = params.getBoolValue(YSTRING("earlyacm"),m_earlyAcm);
|
||||||
m_inn = params.getBoolValue("inn",m_inn);
|
m_inn = params.getBoolValue(YSTRING("inn"),m_inn);
|
||||||
m_numPlan = params.getValue("numplan");
|
m_numPlan = params.getValue(YSTRING("numplan"));
|
||||||
if (-1 == lookup(m_numPlan,s_dict_numPlan,-1))
|
if (-1 == lookup(m_numPlan,s_dict_numPlan,-1))
|
||||||
m_numPlan = "unknown";
|
m_numPlan = "unknown";
|
||||||
m_numType = params.getValue("numtype");
|
m_numType = params.getValue(YSTRING("numtype"));
|
||||||
if (-1 == lookup(m_numType,s_dict_nai,-1))
|
if (-1 == lookup(m_numType,s_dict_nai,-1))
|
||||||
m_numType = "unknown";
|
m_numType = "unknown";
|
||||||
m_numPresentation = params.getValue("presentation");
|
m_numPresentation = params.getValue(YSTRING("presentation"));
|
||||||
if (-1 == lookup(m_numPresentation,s_dict_presentation,-1))
|
if (-1 == lookup(m_numPresentation,s_dict_presentation,-1))
|
||||||
m_numPresentation = "allowed";
|
m_numPresentation = "allowed";
|
||||||
m_numScreening = params.getValue("screening");
|
m_numScreening = params.getValue(YSTRING("screening"));
|
||||||
if (-1 == lookup(m_numScreening,s_dict_screening,-1))
|
if (-1 == lookup(m_numScreening,s_dict_screening,-1))
|
||||||
m_numScreening = "user-provided";
|
m_numScreening = "user-provided";
|
||||||
m_callerCat = params.getValue("callercategory");
|
m_callerCat = params.getValue(YSTRING("callercategory"));
|
||||||
if (-1 == lookup(m_callerCat,s_dict_callerCat,-1))
|
if (-1 == lookup(m_callerCat,s_dict_callerCat,-1))
|
||||||
m_callerCat = "ordinary";
|
m_callerCat = "ordinary";
|
||||||
|
|
||||||
|
@ -3202,15 +3202,15 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
||||||
// Timers
|
// Timers
|
||||||
m_t9Interval = SignallingTimer::getInterval(params,"t9",ISUP_T9_MINVAL,0,ISUP_T9_MAXVAL,true);
|
m_t9Interval = SignallingTimer::getInterval(params,"t9",ISUP_T9_MINVAL,0,ISUP_T9_MAXVAL,true);
|
||||||
|
|
||||||
m_continuity = params.getValue("continuity");
|
m_continuity = params.getValue(YSTRING("continuity"));
|
||||||
m_confirmCCR = params.getBoolValue("confirm_ccr",true);
|
m_confirmCCR = params.getBoolValue(YSTRING("confirm_ccr"),true);
|
||||||
m_dropOnUnknown = params.getBoolValue("drop_unknown",true);
|
m_dropOnUnknown = params.getBoolValue(YSTRING("drop_unknown"),true);
|
||||||
m_ignoreGRSSingle = params.getBoolValue("ignore-grs-single");
|
m_ignoreGRSSingle = params.getBoolValue(YSTRING("ignore-grs-single"));
|
||||||
m_ignoreCGBSingle = params.getBoolValue("ignore-cgb-single");
|
m_ignoreCGBSingle = params.getBoolValue(YSTRING("ignore-cgb-single"));
|
||||||
m_ignoreCGUSingle = params.getBoolValue("ignore-cgu-single");
|
m_ignoreCGUSingle = params.getBoolValue(YSTRING("ignore-cgu-single"));
|
||||||
m_duplicateCGB = params.getBoolValue("duplicate-cgb",
|
m_duplicateCGB = params.getBoolValue(YSTRING("duplicate-cgb"),
|
||||||
(SS7PointCode::ANSI == m_type || SS7PointCode::ANSI8 == m_type));
|
(SS7PointCode::ANSI == m_type || SS7PointCode::ANSI8 == m_type));
|
||||||
int testMsg = params.getIntValue("parttestmsg",s_names,SS7MsgISUP::UPT);
|
int testMsg = params.getIntValue(YSTRING("parttestmsg"),s_names,SS7MsgISUP::UPT);
|
||||||
switch (testMsg) {
|
switch (testMsg) {
|
||||||
case SS7MsgISUP::CVT:
|
case SS7MsgISUP::CVT:
|
||||||
if (SS7PointCode::ANSI != m_type && SS7PointCode::ANSI8 != m_type)
|
if (SS7PointCode::ANSI != m_type && SS7PointCode::ANSI8 != m_type)
|
||||||
|
@ -3221,14 +3221,14 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
||||||
case SS7MsgISUP::UPT:
|
case SS7MsgISUP::UPT:
|
||||||
m_uptMessage = (SS7MsgISUP::Type)testMsg;
|
m_uptMessage = (SS7MsgISUP::Type)testMsg;
|
||||||
}
|
}
|
||||||
m_ignoreUnkDigits = params.getBoolValue("ignore-unknown-digits",true);
|
m_ignoreUnkDigits = params.getBoolValue(YSTRING("ignore-unknown-digits"),true);
|
||||||
m_defaultSls = params.getIntValue("sls",s_dict_callSls,m_defaultSls);
|
m_defaultSls = params.getIntValue(YSTRING("sls"),s_dict_callSls,m_defaultSls);
|
||||||
m_maxCalledDigits = params.getIntValue("maxcalleddigits",m_maxCalledDigits);
|
m_maxCalledDigits = params.getIntValue(YSTRING("maxcalleddigits"),m_maxCalledDigits);
|
||||||
if (m_maxCalledDigits < 1)
|
if (m_maxCalledDigits < 1)
|
||||||
m_maxCalledDigits = 16;
|
m_maxCalledDigits = 16;
|
||||||
|
|
||||||
setDebug(params.getBoolValue("print-messages",false),
|
setDebug(params.getBoolValue(YSTRING("print-messages"),false),
|
||||||
params.getBoolValue("extended-debug",false));
|
params.getBoolValue(YSTRING("extended-debug"),false));
|
||||||
|
|
||||||
if (debugAt(DebugInfo)) {
|
if (debugAt(DebugInfo)) {
|
||||||
String s;
|
String s;
|
||||||
|
@ -3243,7 +3243,7 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
|
||||||
else
|
else
|
||||||
s << "missing";
|
s << "missing";
|
||||||
s << " SIF/SSF=" << (unsigned int)sif() << "/" << (unsigned int)ssf();
|
s << " SIF/SSF=" << (unsigned int)sif() << "/" << (unsigned int)ssf();
|
||||||
s << " lockcircuits=" << params.getValue("lockcircuits");
|
s << " lockcircuits=" << params.getValue(YSTRING("lockcircuits"));
|
||||||
s << " userpartavail=" << String::boolText(m_userPartAvail);
|
s << " userpartavail=" << String::boolText(m_userPartAvail);
|
||||||
s << " lockgroup=" << String::boolText(m_lockGroup);
|
s << " lockgroup=" << String::boolText(m_lockGroup);
|
||||||
s << " mediareq=" << lookup(m_mediaRequired,s_mediaRequired);
|
s << " mediareq=" << lookup(m_mediaRequired,s_mediaRequired);
|
||||||
|
@ -3276,21 +3276,21 @@ bool SS7ISUP::initialize(const NamedList* config)
|
||||||
Debug(this,DebugInfo,"SS7ISUP::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"SS7ISUP::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
if (config) {
|
if (config) {
|
||||||
debugLevel(config->getIntValue("debuglevel_isup",
|
debugLevel(config->getIntValue(YSTRING("debuglevel_isup"),
|
||||||
config->getIntValue("debuglevel",-1)));
|
config->getIntValue(YSTRING("debuglevel"),-1)));
|
||||||
setDebug(config->getBoolValue("print-messages",false),
|
setDebug(config->getBoolValue(YSTRING("print-messages"),false),
|
||||||
config->getBoolValue("extended-debug",false));
|
config->getBoolValue(YSTRING("extended-debug"),false));
|
||||||
m_lockGroup = config->getBoolValue("lockgroup",m_lockGroup);
|
m_lockGroup = config->getBoolValue(YSTRING("lockgroup"),m_lockGroup);
|
||||||
m_earlyAcm = config->getBoolValue("earlyacm",m_earlyAcm);
|
m_earlyAcm = config->getBoolValue(YSTRING("earlyacm"),m_earlyAcm);
|
||||||
m_continuity = config->getValue("continuity",m_continuity);
|
m_continuity = config->getValue(YSTRING("continuity"),m_continuity);
|
||||||
m_confirmCCR = config->getBoolValue("confirm_ccr",true);
|
m_confirmCCR = config->getBoolValue(YSTRING("confirm_ccr"),true);
|
||||||
m_dropOnUnknown = config->getBoolValue("drop_unknown",true);
|
m_dropOnUnknown = config->getBoolValue(YSTRING("drop_unknown"),true);
|
||||||
m_ignoreGRSSingle = config->getBoolValue("ignore-grs-single");
|
m_ignoreGRSSingle = config->getBoolValue(YSTRING("ignore-grs-single"));
|
||||||
m_ignoreCGBSingle = config->getBoolValue("ignore-cgb-single");
|
m_ignoreCGBSingle = config->getBoolValue(YSTRING("ignore-cgb-single"));
|
||||||
m_ignoreCGUSingle = config->getBoolValue("ignore-cgu-single");
|
m_ignoreCGUSingle = config->getBoolValue(YSTRING("ignore-cgu-single"));
|
||||||
m_duplicateCGB = config->getBoolValue("duplicate-cgb",
|
m_duplicateCGB = config->getBoolValue(YSTRING("duplicate-cgb"),
|
||||||
(SS7PointCode::ANSI == m_type || SS7PointCode::ANSI8 == m_type));
|
(SS7PointCode::ANSI == m_type || SS7PointCode::ANSI8 == m_type));
|
||||||
int testMsg = config->getIntValue("parttestmsg",s_names,SS7MsgISUP::UPT);
|
int testMsg = config->getIntValue(YSTRING("parttestmsg"),s_names,SS7MsgISUP::UPT);
|
||||||
switch (testMsg) {
|
switch (testMsg) {
|
||||||
case SS7MsgISUP::CVT:
|
case SS7MsgISUP::CVT:
|
||||||
if (SS7PointCode::ANSI != m_type && SS7PointCode::ANSI8 != m_type)
|
if (SS7PointCode::ANSI != m_type && SS7PointCode::ANSI8 != m_type)
|
||||||
|
@ -3301,9 +3301,9 @@ bool SS7ISUP::initialize(const NamedList* config)
|
||||||
case SS7MsgISUP::UPT:
|
case SS7MsgISUP::UPT:
|
||||||
m_uptMessage = (SS7MsgISUP::Type)testMsg;
|
m_uptMessage = (SS7MsgISUP::Type)testMsg;
|
||||||
}
|
}
|
||||||
m_ignoreUnkDigits = config->getBoolValue("ignore-unknown-digits",true);
|
m_ignoreUnkDigits = config->getBoolValue(YSTRING("ignore-unknown-digits"),true);
|
||||||
m_defaultSls = config->getIntValue("sls",s_dict_callSls,m_defaultSls);
|
m_defaultSls = config->getIntValue(YSTRING("sls"),s_dict_callSls,m_defaultSls);
|
||||||
m_mediaRequired = (MediaRequired)config->getIntValue("needmedia",
|
m_mediaRequired = (MediaRequired)config->getIntValue(YSTRING("needmedia"),
|
||||||
s_mediaRequired,m_mediaRequired);
|
s_mediaRequired,m_mediaRequired);
|
||||||
// Timers
|
// Timers
|
||||||
m_t9Interval = SignallingTimer::getInterval(*config,"t9",ISUP_T9_MINVAL,0,ISUP_T9_MAXVAL,true);
|
m_t9Interval = SignallingTimer::getInterval(*config,"t9",ISUP_T9_MINVAL,0,ISUP_T9_MAXVAL,true);
|
||||||
|
@ -3373,9 +3373,9 @@ unsigned int SS7ISUP::setPointCode(const NamedList& params)
|
||||||
if (!ns)
|
if (!ns)
|
||||||
continue;
|
continue;
|
||||||
bool defPc = false;
|
bool defPc = false;
|
||||||
if (ns->name() == "defaultpointcode")
|
if (ns->name() == YSTRING("defaultpointcode"))
|
||||||
defPc = true;
|
defPc = true;
|
||||||
else if (ns->name() != "pointcode")
|
else if (ns->name() != YSTRING("pointcode"))
|
||||||
continue;
|
continue;
|
||||||
SS7PointCode* pc = new SS7PointCode(0,0,0);
|
SS7PointCode* pc = new SS7PointCode(0,0,0);
|
||||||
if (pc->assign(*ns,m_type) && setPointCode(pc,defPc && !hadDef)) {
|
if (pc->assign(*ns,m_type) && setPointCode(pc,defPc && !hadDef)) {
|
||||||
|
@ -3436,7 +3436,7 @@ SignallingCall* SS7ISUP::call(SignallingMessage* msg, String& reason)
|
||||||
}
|
}
|
||||||
SS7PointCode dest;
|
SS7PointCode dest;
|
||||||
SignallingCircuit* cic = 0;
|
SignallingCircuit* cic = 0;
|
||||||
const char* range = msg->params().getValue("circuits");
|
const char* range = msg->params().getValue(YSTRING("circuits"));
|
||||||
reason.clear();
|
reason.clear();
|
||||||
Lock mylock(this);
|
Lock mylock(this);
|
||||||
// Check
|
// Check
|
||||||
|
@ -3446,7 +3446,7 @@ SignallingCall* SS7ISUP::call(SignallingMessage* msg, String& reason)
|
||||||
reason = "noconn";
|
reason = "noconn";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
String pc = msg->params().getValue("calledpointcode");
|
String pc = msg->params().getValue(YSTRING("calledpointcode"));
|
||||||
if (!(dest.assign(pc,m_type) && dest.pack(m_type))) {
|
if (!(dest.assign(pc,m_type) && dest.pack(m_type))) {
|
||||||
if (!m_remotePoint) {
|
if (!m_remotePoint) {
|
||||||
Debug(this,DebugNote,
|
Debug(this,DebugNote,
|
||||||
|
@ -3474,13 +3474,13 @@ SignallingCall* SS7ISUP::call(SignallingMessage* msg, String& reason)
|
||||||
}
|
}
|
||||||
SS7ISUPCall* call = 0;
|
SS7ISUPCall* call = 0;
|
||||||
if (reason.null()) {
|
if (reason.null()) {
|
||||||
String* cicParams = msg->params().getParam("circuit_parameters");
|
String* cicParams = msg->params().getParam(YSTRING("circuit_parameters"));
|
||||||
if (cicParams) {
|
if (cicParams) {
|
||||||
NamedList* p = YOBJECT(NamedList,cicParams);
|
NamedList* p = YOBJECT(NamedList,cicParams);
|
||||||
if (p)
|
if (p)
|
||||||
cic->setParams(*p);
|
cic->setParams(*p);
|
||||||
}
|
}
|
||||||
int sls = msg->params().getIntValue("sls",s_dict_callSls,m_defaultSls);
|
int sls = msg->params().getIntValue(YSTRING("sls"),s_dict_callSls,m_defaultSls);
|
||||||
switch (sls) {
|
switch (sls) {
|
||||||
case SlsCircuit:
|
case SlsCircuit:
|
||||||
if (cic) {
|
if (cic) {
|
||||||
|
@ -3674,8 +3674,8 @@ void SS7ISUP::timerTick(const Time& when)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool alert = msg->params().getBoolValue("isup_alert_maint");
|
bool alert = msg->params().getBoolValue(YSTRING("isup_alert_maint"));
|
||||||
const char* reason = msg->params().getValue("isup_pending_reason","");
|
const char* reason = msg->params().getValue(YSTRING("isup_pending_reason"),"");
|
||||||
Debug(this,!alert ? DebugAll : DebugMild,
|
Debug(this,!alert ? DebugAll : DebugMild,
|
||||||
"Pending operation '%s' cic=%u reason='%s' timed out",
|
"Pending operation '%s' cic=%u reason='%s' timed out",
|
||||||
msg->name(),msg->cic(),reason);
|
msg->name(),msg->cic(),reason);
|
||||||
|
@ -3742,15 +3742,15 @@ void SS7ISUP::timerTick(const Time& when)
|
||||||
// Process a component control request
|
// Process a component control request
|
||||||
bool SS7ISUP::control(NamedList& params)
|
bool SS7ISUP::control(NamedList& params)
|
||||||
{
|
{
|
||||||
String* ret = params.getParam("completion");
|
String* ret = params.getParam(YSTRING("completion"));
|
||||||
const String* oper = params.getParam("operation");
|
const String* oper = params.getParam(YSTRING("operation"));
|
||||||
const char* cmp = params.getValue("component");
|
const char* cmp = params.getValue(YSTRING("component"));
|
||||||
int cmd = oper ? oper->toInteger(s_dict_control,-1) : -1;
|
int cmd = oper ? oper->toInteger(s_dict_control,-1) : -1;
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (oper && (cmd < 0))
|
if (oper && (cmd < 0))
|
||||||
return false;
|
return false;
|
||||||
String part = params.getValue("partword");
|
String part = params.getValue(YSTRING("partword"));
|
||||||
if (cmp) {
|
if (cmp) {
|
||||||
if (toString() != cmp)
|
if (toString() != cmp)
|
||||||
return false;
|
return false;
|
||||||
|
@ -3773,7 +3773,7 @@ bool SS7ISUP::control(NamedList& params)
|
||||||
case SS7MsgISUP::UPT:
|
case SS7MsgISUP::UPT:
|
||||||
case SS7MsgISUP::CVT:
|
case SS7MsgISUP::CVT:
|
||||||
{
|
{
|
||||||
unsigned int code = params.getIntValue("circuit",code1);
|
unsigned int code = params.getIntValue(YSTRING("circuit"),code1);
|
||||||
SS7MsgISUP* msg = new SS7MsgISUP((SS7MsgISUP::Type)cmd,code);
|
SS7MsgISUP* msg = new SS7MsgISUP((SS7MsgISUP::Type)cmd,code);
|
||||||
SS7Label label(m_type,*m_remotePoint,*m_defPoint,m_sls);
|
SS7Label label(m_type,*m_remotePoint,*m_defPoint,m_sls);
|
||||||
mylock.drop();
|
mylock.drop();
|
||||||
|
@ -3782,8 +3782,8 @@ bool SS7ISUP::control(NamedList& params)
|
||||||
return true;
|
return true;
|
||||||
case SS7MsgISUP::CQM:
|
case SS7MsgISUP::CQM:
|
||||||
{
|
{
|
||||||
unsigned int code = params.getIntValue("circuit",code1);
|
unsigned int code = params.getIntValue(YSTRING("circuit"),code1);
|
||||||
unsigned int range = params.getIntValue("range",1);
|
unsigned int range = params.getIntValue(YSTRING("range"),1);
|
||||||
SS7MsgISUP* msg = new SS7MsgISUP(SS7MsgISUP::CQM,code);
|
SS7MsgISUP* msg = new SS7MsgISUP(SS7MsgISUP::CQM,code);
|
||||||
msg->params().addParam("RangeAndStatus",String(range));
|
msg->params().addParam("RangeAndStatus",String(range));
|
||||||
SS7Label label(m_type,*m_remotePoint,*m_defPoint,m_sls);
|
SS7Label label(m_type,*m_remotePoint,*m_defPoint,m_sls);
|
||||||
|
@ -3793,7 +3793,7 @@ bool SS7ISUP::control(NamedList& params)
|
||||||
return true;
|
return true;
|
||||||
case SS7MsgISUP::CCR:
|
case SS7MsgISUP::CCR:
|
||||||
{
|
{
|
||||||
unsigned int code = params.getIntValue("circuit",code1);
|
unsigned int code = params.getIntValue(YSTRING("circuit"),code1);
|
||||||
// TODO: create a test call, not just send CCR
|
// TODO: create a test call, not just send CCR
|
||||||
SS7MsgISUP* msg = new SS7MsgISUP(SS7MsgISUP::CCR,code);
|
SS7MsgISUP* msg = new SS7MsgISUP(SS7MsgISUP::CCR,code);
|
||||||
SS7Label label(m_type,*m_remotePoint,*m_defPoint,m_sls);
|
SS7Label label(m_type,*m_remotePoint,*m_defPoint,m_sls);
|
||||||
|
@ -3816,7 +3816,7 @@ bool SS7ISUP::control(NamedList& params)
|
||||||
return handleCicBlockCommand(params,cmd == SS7MsgISUP::BLK);
|
return handleCicBlockCommand(params,cmd == SS7MsgISUP::BLK);
|
||||||
case SS7MsgISUP::RLC:
|
case SS7MsgISUP::RLC:
|
||||||
{
|
{
|
||||||
int code = params.getIntValue("circuit");
|
int code = params.getIntValue(YSTRING("circuit"));
|
||||||
SignallingMessageTimer* pending = 0;
|
SignallingMessageTimer* pending = 0;
|
||||||
if (code > 0)
|
if (code > 0)
|
||||||
pending = findPendingMessage(SS7MsgISUP::RSC,code,true);
|
pending = findPendingMessage(SS7MsgISUP::RSC,code,true);
|
||||||
|
@ -3942,7 +3942,7 @@ SS7MSU* SS7ISUP::buildMSU(SS7MsgISUP::Type type, unsigned char sio,
|
||||||
#endif
|
#endif
|
||||||
ObjList exclude;
|
ObjList exclude;
|
||||||
plist = msgParams->params;
|
plist = msgParams->params;
|
||||||
String prefix = params->getValue("message-prefix");
|
String prefix = params->getValue(YSTRING("message-prefix"));
|
||||||
// first populate with mandatory fixed parameters
|
// first populate with mandatory fixed parameters
|
||||||
while ((ptype = *plist++) != SS7MsgISUP::EndOfParameters) {
|
while ((ptype = *plist++) != SS7MsgISUP::EndOfParameters) {
|
||||||
const IsupParam* param = getParamDesc(ptype);
|
const IsupParam* param = getParamDesc(ptype);
|
||||||
|
@ -4066,7 +4066,7 @@ bool SS7ISUP::decodeMessage(NamedList& msg,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get parameter prefix
|
// Get parameter prefix
|
||||||
String prefix = msg.getValue("message-prefix");
|
String prefix = msg.getValue(YSTRING("message-prefix"));
|
||||||
|
|
||||||
// Add protocol and message type
|
// Add protocol and message type
|
||||||
switch (pcType) {
|
switch (pcType) {
|
||||||
|
@ -4213,13 +4213,13 @@ bool SS7ISUP::decodeMessage(NamedList& msg,
|
||||||
ObjList* l = ns->split(',',false);
|
ObjList* l = ns->split(',',false);
|
||||||
for (ObjList* ol = l->skipNull(); ol; ol = ol->skipNext()) {
|
for (ObjList* ol = l->skipNull(); ol; ol = ol->skipNext()) {
|
||||||
String* s = static_cast<String*>(ol->get());
|
String* s = static_cast<String*>(ol->get());
|
||||||
if (*s == "release") {
|
if (*s == YSTRING("release")) {
|
||||||
release.append(ns->name().substr(pCompat.length()),",");
|
release.append(ns->name().substr(pCompat.length()),",");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*s == "cnf")
|
if (*s == YSTRING("cnf"))
|
||||||
cnf.append(ns->name().substr(pCompat.length()),",");
|
cnf.append(ns->name().substr(pCompat.length()),",");
|
||||||
if (*s == "nopass-release")
|
if (*s == YSTRING("nopass-release"))
|
||||||
npRelease.append(ns->name().substr(pCompat.length()),",");
|
npRelease.append(ns->name().substr(pCompat.length()),",");
|
||||||
}
|
}
|
||||||
TelEngine::destruct(l);
|
TelEngine::destruct(l);
|
||||||
|
@ -4259,7 +4259,7 @@ bool SS7ISUP::processParamCompat(const NamedList& list, unsigned int cic, bool*
|
||||||
{
|
{
|
||||||
if (!cic)
|
if (!cic)
|
||||||
return true;
|
return true;
|
||||||
const String& prefix = list["message-prefix"];
|
const String& prefix = list[YSTRING("message-prefix")];
|
||||||
// Release call params
|
// Release call params
|
||||||
String relCall = list[prefix + "parameters-unhandled-release"];
|
String relCall = list[prefix + "parameters-unhandled-release"];
|
||||||
relCall.append(list[prefix + "parameters-nopass-release"],",");
|
relCall.append(list[prefix + "parameters-nopass-release"],",");
|
||||||
|
@ -4466,10 +4466,10 @@ SignallingEvent* SS7ISUP::processCircuitEvent(SignallingCircuitEvent*& event,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SignallingCircuitEvent::Dtmf:
|
case SignallingCircuitEvent::Dtmf:
|
||||||
if (event->getValue("tone")) {
|
if (event->getValue(YSTRING("tone"))) {
|
||||||
SignallingMessage* msg = new SignallingMessage(event->c_str());
|
SignallingMessage* msg = new SignallingMessage(event->c_str());
|
||||||
msg->params().addParam("tone",event->getValue("tone"));
|
msg->params().addParam("tone",event->getValue(YSTRING("tone")));
|
||||||
msg->params().addParam("inband",event->getValue("inband",String::boolText(true)));
|
msg->params().addParam("inband",event->getValue(YSTRING("inband"),String::boolText(true)));
|
||||||
ev = new SignallingEvent(SignallingEvent::Info,msg,call);
|
ev = new SignallingEvent(SignallingEvent::Info,msg,call);
|
||||||
TelEngine::destruct(msg);
|
TelEngine::destruct(msg);
|
||||||
}
|
}
|
||||||
|
@ -4598,7 +4598,7 @@ void SS7ISUP::processCallMsg(SS7MsgISUP* msg, const SS7Label& label, int sls)
|
||||||
// Q.764 2.8.2 - accept test calls even if the remote side is blocked
|
// Q.764 2.8.2 - accept test calls even if the remote side is blocked
|
||||||
// Q.764 2.8.2.3 (xiv) - unblock remote side of the circuit for non-test calls
|
// Q.764 2.8.2.3 (xiv) - unblock remote side of the circuit for non-test calls
|
||||||
if ((msg->type() == SS7MsgISUP::CCR) ||
|
if ((msg->type() == SS7MsgISUP::CCR) ||
|
||||||
(String(msg->params().getValue("CallingPartyCategory")) == "test")) {
|
(msg->params()[YSTRING("CallingPartyCategory")] == YSTRING("test"))) {
|
||||||
Debug(this,DebugInfo,"Received test call on circuit %u",msg->cic());
|
Debug(this,DebugInfo,"Received test call on circuit %u",msg->cic());
|
||||||
flags = 0;
|
flags = 0;
|
||||||
}
|
}
|
||||||
|
@ -4641,12 +4641,12 @@ void SS7ISUP::processCallMsg(SS7MsgISUP* msg, const SS7Label& label, int sls)
|
||||||
unsigned int getRangeAndStatus(NamedList& nl, unsigned int minRange, unsigned int maxRange,
|
unsigned int getRangeAndStatus(NamedList& nl, unsigned int minRange, unsigned int maxRange,
|
||||||
unsigned int maxMap = 0, String** map = 0, unsigned int nCicsMax = 0)
|
unsigned int maxMap = 0, String** map = 0, unsigned int nCicsMax = 0)
|
||||||
{
|
{
|
||||||
unsigned int range = nl.getIntValue("RangeAndStatus");
|
unsigned int range = nl.getIntValue(YSTRING("RangeAndStatus"));
|
||||||
if (range < minRange || range > maxRange)
|
if (range < minRange || range > maxRange)
|
||||||
return 0;
|
return 0;
|
||||||
if (!maxMap)
|
if (!maxMap)
|
||||||
return range;
|
return range;
|
||||||
NamedString* ns = nl.getParam("RangeAndStatus.map");
|
NamedString* ns = nl.getParam(YSTRING("RangeAndStatus.map"));
|
||||||
if (!ns || ns->length() > maxMap || ns->length() < range)
|
if (!ns || ns->length() > maxMap || ns->length() < range)
|
||||||
return 0;
|
return 0;
|
||||||
if (map) {
|
if (map) {
|
||||||
|
@ -4671,9 +4671,9 @@ static bool getGrpTypeInd(SS7ISUP* isup, SS7MsgISUP* msg, bool& hwFail)
|
||||||
{
|
{
|
||||||
if (!msg)
|
if (!msg)
|
||||||
return false;
|
return false;
|
||||||
const String& s = msg->params()["GroupSupervisionTypeIndicator"];
|
const String& s = msg->params()[YSTRING("GroupSupervisionTypeIndicator")];
|
||||||
hwFail = (s == "hw-failure");
|
hwFail = (s == YSTRING("hw-failure"));
|
||||||
if (hwFail || (s == "maintenance"))
|
if (hwFail || (s == YSTRING("maintenance")))
|
||||||
return true;
|
return true;
|
||||||
Debug(isup,DebugNote,"%s with unknown GroupSupervisionTypeIndicator=%s [%p]",
|
Debug(isup,DebugNote,"%s with unknown GroupSupervisionTypeIndicator=%s [%p]",
|
||||||
msg->name(),s.c_str(),isup);
|
msg->name(),s.c_str(),isup);
|
||||||
|
@ -4703,8 +4703,8 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s
|
||||||
// TODO: check if this message was received in response to RSC, UBL, UBK, CGB, CGU
|
// TODO: check if this message was received in response to RSC, UBL, UBK, CGB, CGU
|
||||||
Debug(this,DebugNote,"%s with cic=%u cause='%s' diagnostic='%s'",
|
Debug(this,DebugNote,"%s with cic=%u cause='%s' diagnostic='%s'",
|
||||||
msg->name(),msg->cic(),
|
msg->name(),msg->cic(),
|
||||||
msg->params().getValue("CauseIndicators"),
|
msg->params().getValue(YSTRING("CauseIndicators")),
|
||||||
msg->params().getValue("CauseIndicators.diagnostic"));
|
msg->params().getValue(YSTRING("CauseIndicators.diagnostic")));
|
||||||
stopSGM = true;
|
stopSGM = true;
|
||||||
break;
|
break;
|
||||||
case SS7MsgISUP::RLC: // Release Complete
|
case SS7MsgISUP::RLC: // Release Complete
|
||||||
|
@ -4736,7 +4736,7 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s
|
||||||
unsigned int n = getRangeAndStatus(msg->params(),1,31);
|
unsigned int n = getRangeAndStatus(msg->params(),1,31);
|
||||||
if (!n) {
|
if (!n) {
|
||||||
Debug(this,DebugNote,"%s with invalid range %s",msg->name(),
|
Debug(this,DebugNote,"%s with invalid range %s",msg->name(),
|
||||||
msg->params().getValue("RangeAndStatus"));
|
msg->params().getValue(YSTRING("RangeAndStatus")));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (n == 1 && m_ignoreGRSSingle) {
|
else if (n == 1 && m_ignoreGRSSingle) {
|
||||||
|
@ -4777,7 +4777,7 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s
|
||||||
SignallingMessageTimer* t = findPendingMessage(type,msg->cic(),true);
|
SignallingMessageTimer* t = findPendingMessage(type,msg->cic(),true);
|
||||||
if (t) {
|
if (t) {
|
||||||
SS7MsgISUP* m = static_cast<SS7MsgISUP*>(t->message());
|
SS7MsgISUP* m = static_cast<SS7MsgISUP*>(t->message());
|
||||||
bool hw = m && m->params().getBoolValue("isup_pending_block_hwfail");
|
bool hw = m && m->params().getBoolValue(YSTRING("isup_pending_block_hwfail"));
|
||||||
DDebug(this,m ? DebugAll : DebugNote,"%s confirmed for pending cic=%u",
|
DDebug(this,m ? DebugAll : DebugNote,"%s confirmed for pending cic=%u",
|
||||||
block ? "BLK" : "UBL",msg->cic());
|
block ? "BLK" : "UBL",msg->cic());
|
||||||
TelEngine::destruct(t);
|
TelEngine::destruct(t);
|
||||||
|
@ -4800,8 +4800,8 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s
|
||||||
unsigned int nCics = getRangeAndStatus(msg->params(),1,256,256,&srcMap,32);
|
unsigned int nCics = getRangeAndStatus(msg->params(),1,256,256,&srcMap,32);
|
||||||
if (!nCics) {
|
if (!nCics) {
|
||||||
Debug(this,DebugNote,"%s with invalid range %s or map=%s",msg->name(),
|
Debug(this,DebugNote,"%s with invalid range %s or map=%s",msg->name(),
|
||||||
msg->params().getValue("RangeAndStatus"),
|
msg->params().getValue(YSTRING("RangeAndStatus")),
|
||||||
msg->params().getValue("RangeAndStatus.map"));
|
msg->params().getValue(YSTRING("RangeAndStatus.map")));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
bool block = (msg->type() == SS7MsgISUP::CGA);
|
bool block = (msg->type() == SS7MsgISUP::CGA);
|
||||||
|
@ -4813,11 +4813,11 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s
|
||||||
String map;
|
String map;
|
||||||
while (m) {
|
while (m) {
|
||||||
// Check type indicator
|
// Check type indicator
|
||||||
bool hw = (m->params()["GroupSupervisionTypeIndicator"] == "hw-failure");
|
bool hw = (m->params()[YSTRING("GroupSupervisionTypeIndicator")] == YSTRING("hw-failure"));
|
||||||
if (hw != hwFail)
|
if (hw != hwFail)
|
||||||
break;
|
break;
|
||||||
// Check map
|
// Check map
|
||||||
map = m->params()["RangeAndStatus.map"];
|
map = m->params()[YSTRING("RangeAndStatus.map")];
|
||||||
if (!map)
|
if (!map)
|
||||||
break;
|
break;
|
||||||
if (map.length() != nCics) {
|
if (map.length() != nCics) {
|
||||||
|
@ -4838,8 +4838,8 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s
|
||||||
unlock();
|
unlock();
|
||||||
if (!map) {
|
if (!map) {
|
||||||
Debug(this,DebugNote,"%s with unnacceptable range %s or map=%s",msg->name(),
|
Debug(this,DebugNote,"%s with unnacceptable range %s or map=%s",msg->name(),
|
||||||
msg->params().getValue("RangeAndStatus"),
|
msg->params().getValue(YSTRING("RangeAndStatus")),
|
||||||
msg->params().getValue("RangeAndStatus.map"));
|
msg->params().getValue(YSTRING("RangeAndStatus.map")));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (unsigned int i = 0; i < map.length(); i++)
|
for (unsigned int i = 0; i < map.length(); i++)
|
||||||
|
@ -4861,8 +4861,8 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s
|
||||||
unsigned int nCics = getRangeAndStatus(msg->params(),1,256,256,&srcMap,32);
|
unsigned int nCics = getRangeAndStatus(msg->params(),1,256,256,&srcMap,32);
|
||||||
if (!nCics) {
|
if (!nCics) {
|
||||||
Debug(this,DebugNote,"%s with invalid range %s or map=%s",msg->name(),
|
Debug(this,DebugNote,"%s with invalid range %s or map=%s",msg->name(),
|
||||||
msg->params().getValue("RangeAndStatus"),
|
msg->params().getValue(YSTRING("RangeAndStatus")),
|
||||||
msg->params().getValue("RangeAndStatus.map"));
|
msg->params().getValue(YSTRING("RangeAndStatus.map")));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (nCics == 1 && ((block && m_ignoreCGBSingle) || (!block && m_ignoreCGUSingle))) {
|
else if (nCics == 1 && ((block && m_ignoreCGBSingle) || (!block && m_ignoreCGUSingle))) {
|
||||||
|
@ -5336,8 +5336,8 @@ bool SS7ISUP::handleCicBlockCommand(const NamedList& p, bool block)
|
||||||
return false;
|
return false;
|
||||||
SS7MsgISUP* msg = 0;
|
SS7MsgISUP* msg = 0;
|
||||||
SS7MsgISUP::Type remove = SS7MsgISUP::Unknown;
|
SS7MsgISUP::Type remove = SS7MsgISUP::Unknown;
|
||||||
bool force = p.getBoolValue("force");
|
bool force = p.getBoolValue(YSTRING("force"));
|
||||||
String* param = p.getParam("circuit");
|
String* param = p.getParam(YSTRING("circuit"));
|
||||||
Lock mylock(this);
|
Lock mylock(this);
|
||||||
if (param) {
|
if (param) {
|
||||||
SignallingCircuit* cic = circuits()->find(param->toInteger());
|
SignallingCircuit* cic = circuits()->find(param->toInteger());
|
||||||
|
@ -5349,10 +5349,10 @@ bool SS7ISUP::handleCicBlockCommand(const NamedList& p, bool block)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// NOTE: we assume the circuits belongs to the same span
|
// NOTE: we assume the circuits belongs to the same span
|
||||||
param = p.getParam("circuits");
|
param = p.getParam(YSTRING("circuits"));
|
||||||
if (TelEngine::null(param)) {
|
if (TelEngine::null(param)) {
|
||||||
Debug(this,DebugNote,"Circuit '%s' missing circuit(s)",
|
Debug(this,DebugNote,"Circuit '%s' missing circuit(s)",
|
||||||
p.getValue("operation"));
|
p.getValue(YSTRING("operation")));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Parse the range
|
// Parse the range
|
||||||
|
@ -5362,7 +5362,7 @@ bool SS7ISUP::handleCicBlockCommand(const NamedList& p, bool block)
|
||||||
SignallingCircuitRange* range = circuits()->findRange(*param);
|
SignallingCircuitRange* range = circuits()->findRange(*param);
|
||||||
if (!(range && (count = range->count()))) {
|
if (!(range && (count = range->count()))) {
|
||||||
Debug(this,DebugNote,"Circuit group '%s': invalid circuits=%s",
|
Debug(this,DebugNote,"Circuit group '%s': invalid circuits=%s",
|
||||||
p.getValue("operation"),param->c_str());
|
p.getValue(YSTRING("operation")),param->c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cics = new unsigned int[count];
|
cics = new unsigned int[count];
|
||||||
|
@ -5371,19 +5371,19 @@ bool SS7ISUP::handleCicBlockCommand(const NamedList& p, bool block)
|
||||||
}
|
}
|
||||||
if (count > 32) {
|
if (count > 32) {
|
||||||
Debug(this,DebugNote,"Circuit group '%s': too many circuits %u (max=32)",
|
Debug(this,DebugNote,"Circuit group '%s': too many circuits %u (max=32)",
|
||||||
p.getValue("operation"),count);
|
p.getValue(YSTRING("operation")),count);
|
||||||
delete[] cics;
|
delete[] cics;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Check if all circuits can be (un)blocked
|
// Check if all circuits can be (un)blocked
|
||||||
ObjList list;
|
ObjList list;
|
||||||
bool maint = !p.getBoolValue("hwfail");
|
bool maint = !p.getBoolValue(YSTRING("hwfail"));
|
||||||
for (unsigned int i = 0; i < count; i++) {
|
for (unsigned int i = 0; i < count; i++) {
|
||||||
SignallingCircuit* c = circuits()->find(cics[i]);
|
SignallingCircuit* c = circuits()->find(cics[i]);
|
||||||
const char* reason = checkBlockCic(c,block,maint,force);
|
const char* reason = checkBlockCic(c,block,maint,force);
|
||||||
if (reason) {
|
if (reason) {
|
||||||
Debug(this,DebugNote,"Circuit group '%s' range=%s failed for cic=%u: %s",
|
Debug(this,DebugNote,"Circuit group '%s' range=%s failed for cic=%u: %s",
|
||||||
p.getValue("operation"),param->c_str(),cics[i],reason);
|
p.getValue(YSTRING("operation")),param->c_str(),cics[i],reason);
|
||||||
delete[] cics;
|
delete[] cics;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -5413,7 +5413,7 @@ bool SS7ISUP::handleCicBlockCommand(const NamedList& p, bool block)
|
||||||
delete[] cics;
|
delete[] cics;
|
||||||
if (nCics != count) {
|
if (nCics != count) {
|
||||||
Debug(this,DebugNote,"Circuit group '%s': invalid circuit map=%s",
|
Debug(this,DebugNote,"Circuit group '%s': invalid circuit map=%s",
|
||||||
p.getValue("operation"),param->c_str());
|
p.getValue(YSTRING("operation")),param->c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Ok: block circuits and send the request
|
// Ok: block circuits and send the request
|
||||||
|
|
|
@ -205,14 +205,14 @@ bool SS7Layer2::control(Operation oper, NamedList* params)
|
||||||
|
|
||||||
bool SS7Layer2::control(NamedList& params)
|
bool SS7Layer2::control(NamedList& params)
|
||||||
{
|
{
|
||||||
String* ret = params.getParam("completion");
|
String* ret = params.getParam(YSTRING("completion"));
|
||||||
const String* oper = params.getParam("operation");
|
const String* oper = params.getParam(YSTRING("operation"));
|
||||||
const char* cmp = params.getValue("component");
|
const char* cmp = params.getValue(YSTRING("component"));
|
||||||
int cmd = oper ? oper->toInteger(s_dict_control,-1) : -1;
|
int cmd = oper ? oper->toInteger(s_dict_control,-1) : -1;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (oper && (cmd < 0))
|
if (oper && (cmd < 0))
|
||||||
return false;
|
return false;
|
||||||
String part = params.getValue("partword");
|
String part = params.getValue(YSTRING("partword"));
|
||||||
if (cmp) {
|
if (cmp) {
|
||||||
if (toString() != cmp)
|
if (toString() != cmp)
|
||||||
return false;
|
return false;
|
||||||
|
@ -235,7 +235,7 @@ bool SS7Layer2::getEmergency(NamedList* params, bool emg) const
|
||||||
emg = true;
|
emg = true;
|
||||||
}
|
}
|
||||||
if (params)
|
if (params)
|
||||||
emg = params->getBoolValue("emergency",emg);
|
emg = params->getBoolValue(YSTRING("emergency"),emg);
|
||||||
return emg;
|
return emg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,13 +277,13 @@ SS7MTP2::SS7MTP2(const NamedList& params, unsigned int status)
|
||||||
¶ms,statusName(true),this,tmp.c_str());
|
¶ms,statusName(true),this,tmp.c_str());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
m_fillLink = params.getBoolValue("filllink",m_fillLink);
|
m_fillLink = params.getBoolValue(YSTRING("filllink"),m_fillLink);
|
||||||
m_maxErrors = params.getIntValue("maxerrors",64);
|
m_maxErrors = params.getIntValue(YSTRING("maxerrors"),64);
|
||||||
if (m_maxErrors < 8)
|
if (m_maxErrors < 8)
|
||||||
m_maxErrors = 8;
|
m_maxErrors = 8;
|
||||||
else if (m_maxErrors > 256)
|
else if (m_maxErrors > 256)
|
||||||
m_maxErrors = 256;
|
m_maxErrors = 256;
|
||||||
setDumper(params.getValue("layer2dump"));
|
setDumper(params.getValue(YSTRING("layer2dump")));
|
||||||
}
|
}
|
||||||
|
|
||||||
SS7MTP2::~SS7MTP2()
|
SS7MTP2::~SS7MTP2()
|
||||||
|
@ -335,10 +335,10 @@ bool SS7MTP2::initialize(const NamedList* config)
|
||||||
Debug(this,DebugInfo,"SS7MTP2::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"SS7MTP2::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
if (config) {
|
if (config) {
|
||||||
debugLevel(config->getIntValue("debuglevel_mtp2",
|
debugLevel(config->getIntValue(YSTRING("debuglevel_mtp2"),
|
||||||
config->getIntValue("debuglevel",-1)));
|
config->getIntValue(YSTRING("debuglevel"),-1)));
|
||||||
m_autoEmergency = config->getBoolValue("autoemergency",true);
|
m_autoEmergency = config->getBoolValue(YSTRING("autoemergency"),true);
|
||||||
unsigned int maxErrors = config->getIntValue("maxerrors",m_maxErrors);
|
unsigned int maxErrors = config->getIntValue(YSTRING("maxerrors"),m_maxErrors);
|
||||||
if (maxErrors < 8)
|
if (maxErrors < 8)
|
||||||
m_maxErrors = 8;
|
m_maxErrors = 8;
|
||||||
else if (maxErrors > 256)
|
else if (maxErrors > 256)
|
||||||
|
@ -346,12 +346,12 @@ bool SS7MTP2::initialize(const NamedList* config)
|
||||||
else
|
else
|
||||||
m_maxErrors = maxErrors;
|
m_maxErrors = maxErrors;
|
||||||
}
|
}
|
||||||
m_autostart = !config || config->getBoolValue("autostart",true);
|
m_autostart = !config || config->getBoolValue(YSTRING("autostart"),true);
|
||||||
m_flushMsus = !config || config->getBoolValue("flushmsus",true);
|
m_flushMsus = !config || config->getBoolValue(YSTRING("flushmsus"),true);
|
||||||
if (config && !iface()) {
|
if (config && !iface()) {
|
||||||
NamedString* name = config->getParam("sig");
|
NamedString* name = config->getParam(YSTRING("sig"));
|
||||||
if (!name)
|
if (!name)
|
||||||
name = config->getParam("basename");
|
name = config->getParam(YSTRING("basename"));
|
||||||
if (name) {
|
if (name) {
|
||||||
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
||||||
NamedList* ifConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
NamedList* ifConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
||||||
|
@ -360,7 +360,7 @@ bool SS7MTP2::initialize(const NamedList* config)
|
||||||
params.addParam("protocol","ss7");
|
params.addParam("protocol","ss7");
|
||||||
if (ifConfig) {
|
if (ifConfig) {
|
||||||
params.copyParams(*ifConfig);
|
params.copyParams(*ifConfig);
|
||||||
int rx = params.getIntValue("rxunderrun");
|
int rx = params.getIntValue(YSTRING("rxunderrun"));
|
||||||
if ((rx > 0) && (rx < 25))
|
if ((rx > 0) && (rx < 25))
|
||||||
params.setParam("rxunderrun","25");
|
params.setParam("rxunderrun","25");
|
||||||
}
|
}
|
||||||
|
@ -383,11 +383,11 @@ bool SS7MTP2::control(Operation oper, NamedList* params)
|
||||||
{
|
{
|
||||||
if (params) {
|
if (params) {
|
||||||
lock();
|
lock();
|
||||||
m_fillLink = params->getBoolValue("filllink",m_fillLink);
|
m_fillLink = params->getBoolValue(YSTRING("filllink"),m_fillLink);
|
||||||
m_autoEmergency = params->getBoolValue("autoemergency",m_autoEmergency);
|
m_autoEmergency = params->getBoolValue(YSTRING("autoemergency"),m_autoEmergency);
|
||||||
m_autostart = params->getBoolValue("autostart",m_autostart);
|
m_autostart = params->getBoolValue(YSTRING("autostart"),m_autostart);
|
||||||
m_flushMsus = params->getBoolValue("flushmsus",m_flushMsus);
|
m_flushMsus = params->getBoolValue(YSTRING("flushmsus"),m_flushMsus);
|
||||||
unsigned int maxErrors = params->getIntValue("maxerrors",m_maxErrors);
|
unsigned int maxErrors = params->getIntValue(YSTRING("maxerrors"),m_maxErrors);
|
||||||
if (maxErrors < 8)
|
if (maxErrors < 8)
|
||||||
m_maxErrors = 8;
|
m_maxErrors = 8;
|
||||||
else if (maxErrors > 256)
|
else if (maxErrors > 256)
|
||||||
|
@ -395,20 +395,20 @@ bool SS7MTP2::control(Operation oper, NamedList* params)
|
||||||
else
|
else
|
||||||
m_maxErrors = maxErrors;
|
m_maxErrors = maxErrors;
|
||||||
// The following are for test purposes
|
// The following are for test purposes
|
||||||
if (params->getBoolValue("toggle-bib"))
|
if (params->getBoolValue(YSTRING("toggle-bib")))
|
||||||
m_bib = !m_bib;
|
m_bib = !m_bib;
|
||||||
if (params->getBoolValue("toggle-fib"))
|
if (params->getBoolValue(YSTRING("toggle-fib")))
|
||||||
m_fib = !m_fib;
|
m_fib = !m_fib;
|
||||||
int tmp = params->getIntValue("change-fsn");
|
int tmp = params->getIntValue(YSTRING("change-fsn"));
|
||||||
if (tmp)
|
if (tmp)
|
||||||
m_fsn = (m_fsn + tmp) & 0x7f;
|
m_fsn = (m_fsn + tmp) & 0x7f;
|
||||||
unlock();
|
unlock();
|
||||||
tmp = params->getIntValue("send-lssu",-1);
|
tmp = params->getIntValue(YSTRING("send-lssu"),-1);
|
||||||
if (tmp >= 0)
|
if (tmp >= 0)
|
||||||
transmitLSSU(tmp);
|
transmitLSSU(tmp);
|
||||||
if (params->getBoolValue("send-fisu"))
|
if (params->getBoolValue(YSTRING("send-fisu")))
|
||||||
transmitFISU();
|
transmitFISU();
|
||||||
if (params->getBoolValue("simulate-error"))
|
if (params->getBoolValue(YSTRING("simulate-error")))
|
||||||
notify(SignallingInterface::HardwareError);
|
notify(SignallingInterface::HardwareError);
|
||||||
}
|
}
|
||||||
switch (oper) {
|
switch (oper) {
|
||||||
|
|
|
@ -71,11 +71,11 @@ SS7Layer3::SS7Layer3(SS7PointCode::Type type)
|
||||||
bool SS7Layer3::initialize(const NamedList* config)
|
bool SS7Layer3::initialize(const NamedList* config)
|
||||||
{
|
{
|
||||||
if (config)
|
if (config)
|
||||||
setNI(SS7MSU::getNetIndicator(config->getValue("netindicator"),SS7MSU::National));
|
setNI(SS7MSU::getNetIndicator(config->getValue(YSTRING("netindicator")),SS7MSU::National));
|
||||||
if (engine() && !user()) {
|
if (engine() && !user()) {
|
||||||
NamedList params("ss7router");
|
NamedList params("ss7router");
|
||||||
if (config)
|
if (config)
|
||||||
static_cast<String&>(params) = config->getValue("router",params);
|
static_cast<String&>(params) = config->getValue(YSTRING("router"),params);
|
||||||
if (params.toBoolean(true))
|
if (params.toBoolean(true))
|
||||||
SS7Layer3::attach(YOBJECT(SS7Router,engine()->build("SS7Router",params,true)));
|
SS7Layer3::attach(YOBJECT(SS7Router,engine()->build("SS7Router",params,true)));
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ void SS7Layer3::attach(SS7L3User* l3user)
|
||||||
const char* name = 0;
|
const char* name = 0;
|
||||||
if (engine() && engine()->find(tmp)) {
|
if (engine() && engine()->find(tmp)) {
|
||||||
name = tmp->toString().safe();
|
name = tmp->toString().safe();
|
||||||
if (tmp->getObject("SS7Router"))
|
if (tmp->getObject(YSTRING("SS7Router")))
|
||||||
(static_cast<SS7Router*>(tmp))->detach(this);
|
(static_cast<SS7Router*>(tmp))->detach(this);
|
||||||
else
|
else
|
||||||
tmp->attach(0);
|
tmp->attach(0);
|
||||||
|
@ -106,7 +106,7 @@ void SS7Layer3::attach(SS7L3User* l3user)
|
||||||
return;
|
return;
|
||||||
Debug(this,DebugAll,"Attached L3 user (%p,'%s') [%p]",l3user,l3user->toString().safe(),this);
|
Debug(this,DebugAll,"Attached L3 user (%p,'%s') [%p]",l3user,l3user->toString().safe(),this);
|
||||||
insert(l3user);
|
insert(l3user);
|
||||||
if (l3user->getObject("SS7Router"))
|
if (l3user->getObject(YSTRING("SS7Router")))
|
||||||
(static_cast<SS7Router*>(l3user))->attach(this);
|
(static_cast<SS7Router*>(l3user))->attach(this);
|
||||||
else
|
else
|
||||||
l3user->attach(this);
|
l3user->attach(this);
|
||||||
|
@ -182,11 +182,11 @@ bool SS7Layer3::buildRoutes(const NamedList& params)
|
||||||
unsigned int prio = 0;
|
unsigned int prio = 0;
|
||||||
unsigned int shift = 0;
|
unsigned int shift = 0;
|
||||||
bool local = false;
|
bool local = false;
|
||||||
if (ns->name() == "local")
|
if (ns->name() == YSTRING("local"))
|
||||||
local = true;
|
local = true;
|
||||||
else if (ns->name() == "route")
|
else if (ns->name() == YSTRING("route"))
|
||||||
prio = 100;
|
prio = 100;
|
||||||
else if (ns->name() != "adjacent")
|
else if (ns->name() != YSTRING("adjacent"))
|
||||||
continue;
|
continue;
|
||||||
// Get & check the route
|
// Get & check the route
|
||||||
ObjList* route = ns->split(',',true);
|
ObjList* route = ns->split(',',true);
|
||||||
|
@ -431,7 +431,7 @@ SS7Route* SS7Layer3::findRoute(SS7PointCode::Type type, unsigned int packed)
|
||||||
void SS7Layer3::printRoutes()
|
void SS7Layer3::printRoutes()
|
||||||
{
|
{
|
||||||
String s;
|
String s;
|
||||||
bool router = getObject("SS7Router") != 0;
|
bool router = getObject(YSTRING("SS7Router")) != 0;
|
||||||
for (unsigned int i = 0; i < YSS7_PCTYPE_COUNT; i++) {
|
for (unsigned int i = 0; i < YSS7_PCTYPE_COUNT; i++) {
|
||||||
ObjList* o = m_route[i].skipNull();
|
ObjList* o = m_route[i].skipNull();
|
||||||
if (!o)
|
if (!o)
|
||||||
|
@ -495,7 +495,7 @@ SS7MTP3::SS7MTP3(const NamedList& params)
|
||||||
// Set point code type for each network indicator
|
// Set point code type for each network indicator
|
||||||
static const unsigned char ni[4] = { SS7MSU::International,
|
static const unsigned char ni[4] = { SS7MSU::International,
|
||||||
SS7MSU::SpareInternational, SS7MSU::National, SS7MSU::ReservedNational };
|
SS7MSU::SpareInternational, SS7MSU::National, SS7MSU::ReservedNational };
|
||||||
String stype = params.getValue("netind2pctype");
|
String stype = params.getValue(YSTRING("netind2pctype"));
|
||||||
int level = DebugAll;
|
int level = DebugAll;
|
||||||
if (stype.find(',') >= 0) {
|
if (stype.find(',') >= 0) {
|
||||||
ObjList* obj = stype.split(',',false);
|
ObjList* obj = stype.split(',',false);
|
||||||
|
@ -522,10 +522,10 @@ SS7MTP3::SS7MTP3(const NamedList& params)
|
||||||
}
|
}
|
||||||
Debug(this,level,"Point code types are '%s' [%p]",stype.safe(),this);
|
Debug(this,level,"Point code types are '%s' [%p]",stype.safe(),this);
|
||||||
|
|
||||||
m_inhibit = !params.getBoolValue("autostart",true);
|
m_inhibit = !params.getBoolValue(YSTRING("autostart"),true);
|
||||||
m_checklinks = params.getBoolValue("checklinks",m_checklinks);
|
m_checklinks = params.getBoolValue(YSTRING("checklinks"),m_checklinks);
|
||||||
m_forcealign = params.getBoolValue("forcealign",m_forcealign);
|
m_forcealign = params.getBoolValue(YSTRING("forcealign"),m_forcealign);
|
||||||
int check = params.getIntValue("checkfails",5000);
|
int check = params.getIntValue(YSTRING("checkfails"),5000);
|
||||||
if (check > 0) {
|
if (check > 0) {
|
||||||
if (check < 4000)
|
if (check < 4000)
|
||||||
check = 4000;
|
check = 4000;
|
||||||
|
@ -533,7 +533,7 @@ SS7MTP3::SS7MTP3(const NamedList& params)
|
||||||
check = 12000;
|
check = 12000;
|
||||||
m_checkT1 = 1000 * check;
|
m_checkT1 = 1000 * check;
|
||||||
}
|
}
|
||||||
check = params.getIntValue("maintenance",60000);
|
check = params.getIntValue(YSTRING("maintenance"),60000);
|
||||||
if (check > 0) {
|
if (check > 0) {
|
||||||
if (check < 30000)
|
if (check < 30000)
|
||||||
check = 30000;
|
check = 30000;
|
||||||
|
@ -563,7 +563,7 @@ SS7MTP3::SS7MTP3(const NamedList& params)
|
||||||
}
|
}
|
||||||
TelEngine::destruct(l);
|
TelEngine::destruct(l);
|
||||||
}
|
}
|
||||||
setDumper(params.getValue("layer3dump"));
|
setDumper(params.getValue(YSTRING("layer3dump")));
|
||||||
}
|
}
|
||||||
|
|
||||||
SS7MTP3::~SS7MTP3()
|
SS7MTP3::~SS7MTP3()
|
||||||
|
@ -791,8 +791,8 @@ bool SS7MTP3::control(Operation oper, NamedList* params)
|
||||||
{
|
{
|
||||||
bool ok = operational();
|
bool ok = operational();
|
||||||
if (params) {
|
if (params) {
|
||||||
m_checklinks = params->getBoolValue("checklinks",m_checklinks);
|
m_checklinks = params->getBoolValue(YSTRING("checklinks"),m_checklinks);
|
||||||
m_forcealign = params->getBoolValue("forcealign",m_forcealign);
|
m_forcealign = params->getBoolValue(YSTRING("forcealign"),m_forcealign);
|
||||||
}
|
}
|
||||||
switch (oper) {
|
switch (oper) {
|
||||||
case Pause:
|
case Pause:
|
||||||
|
@ -816,7 +816,7 @@ bool SS7MTP3::control(Operation oper, NamedList* params)
|
||||||
SS7Layer3::notify(-1);
|
SS7Layer3::notify(-1);
|
||||||
}
|
}
|
||||||
m_warnDown = true;
|
m_warnDown = true;
|
||||||
if (params && params->getBoolValue("emergency")) {
|
if (params && params->getBoolValue(YSTRING("emergency"))) {
|
||||||
unsigned int cnt = 0;
|
unsigned int cnt = 0;
|
||||||
const ObjList* l = &m_links;
|
const ObjList* l = &m_links;
|
||||||
for (; l; l = l->next()) {
|
for (; l; l = l->next()) {
|
||||||
|
@ -838,14 +838,14 @@ bool SS7MTP3::control(Operation oper, NamedList* params)
|
||||||
|
|
||||||
bool SS7MTP3::control(NamedList& params)
|
bool SS7MTP3::control(NamedList& params)
|
||||||
{
|
{
|
||||||
String* ret = params.getParam("completion");
|
String* ret = params.getParam(YSTRING("completion"));
|
||||||
const String* oper = params.getParam("operation");
|
const String* oper = params.getParam(YSTRING("operation"));
|
||||||
const char* cmp = params.getValue("component");
|
const char* cmp = params.getValue(YSTRING("component"));
|
||||||
int cmd = oper ? oper->toInteger(s_dict_control,-1) : -1;
|
int cmd = oper ? oper->toInteger(s_dict_control,-1) : -1;
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (oper && (cmd < 0))
|
if (oper && (cmd < 0))
|
||||||
return false;
|
return false;
|
||||||
String part = params.getValue("partword");
|
String part = params.getValue(YSTRING("partword"));
|
||||||
if (cmp) {
|
if (cmp) {
|
||||||
if (toString() != cmp)
|
if (toString() != cmp)
|
||||||
return false;
|
return false;
|
||||||
|
@ -872,17 +872,17 @@ bool SS7MTP3::initialize(const NamedList* config)
|
||||||
Debug(this,DebugInfo,"SS7MTP3::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"SS7MTP3::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
if (config)
|
if (config)
|
||||||
debugLevel(config->getIntValue("debuglevel_mtp3",
|
debugLevel(config->getIntValue(YSTRING("debuglevel_mtp3"),
|
||||||
config->getIntValue("debuglevel",-1)));
|
config->getIntValue(YSTRING("debuglevel"),-1)));
|
||||||
countLinks();
|
countLinks();
|
||||||
m_warnDown = true;
|
m_warnDown = true;
|
||||||
if (config && (0 == m_total)) {
|
if (config && (0 == m_total)) {
|
||||||
m_checklinks = config->getBoolValue("checklinks",m_checklinks);
|
m_checklinks = config->getBoolValue(YSTRING("checklinks"),m_checklinks);
|
||||||
m_forcealign = config->getBoolValue("forcealign",m_forcealign);
|
m_forcealign = config->getBoolValue(YSTRING("forcealign"),m_forcealign);
|
||||||
unsigned int n = config->length();
|
unsigned int n = config->length();
|
||||||
for (unsigned int i = 0; i < n; i++) {
|
for (unsigned int i = 0; i < n; i++) {
|
||||||
NamedString* param = config->getParam(i);
|
NamedString* param = config->getParam(i);
|
||||||
if (!(param && param->name() == "link"))
|
if (!(param && param->name() == YSTRING("link")))
|
||||||
continue;
|
continue;
|
||||||
NamedPointer* ptr = YOBJECT(NamedPointer,param);
|
NamedPointer* ptr = YOBJECT(NamedPointer,param);
|
||||||
NamedList* linkConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
NamedList* linkConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
||||||
|
@ -913,7 +913,7 @@ bool SS7MTP3::initialize(const NamedList* config)
|
||||||
detach(link);
|
detach(link);
|
||||||
TelEngine::destruct(link);
|
TelEngine::destruct(link);
|
||||||
}
|
}
|
||||||
m_inhibit = !config->getBoolValue("autostart",true);
|
m_inhibit = !config->getBoolValue(YSTRING("autostart"),true);
|
||||||
}
|
}
|
||||||
SS7Layer3::initialize(config);
|
SS7Layer3::initialize(config);
|
||||||
return 0 != m_total;
|
return 0 != m_total;
|
||||||
|
|
|
@ -43,11 +43,11 @@ unsigned char SS7Layer4::getSIO(const NamedList& params, unsigned char sif, unsi
|
||||||
prio <<= 4;
|
prio <<= 4;
|
||||||
if ((ni & 0xc0) == 0)
|
if ((ni & 0xc0) == 0)
|
||||||
ni <<= 6;
|
ni <<= 6;
|
||||||
sif = params.getIntValue("service",sif & 0x0f);
|
sif = params.getIntValue(YSTRING("service"),sif & 0x0f);
|
||||||
prio = SS7MSU::getPriority(params.getValue("priority"),prio & 0x30);
|
prio = SS7MSU::getPriority(params.getValue(YSTRING("priority")),prio & 0x30);
|
||||||
if ((prio & 0x30) == 0)
|
if ((prio & 0x30) == 0)
|
||||||
prio <<= 4;
|
prio <<= 4;
|
||||||
ni = SS7MSU::getNetIndicator(params.getValue("netindicator"),ni & 0xc0);
|
ni = SS7MSU::getNetIndicator(params.getValue(YSTRING("netindicator")),ni & 0xc0);
|
||||||
if ((ni & 0xc0) == 0)
|
if ((ni & 0xc0) == 0)
|
||||||
ni <<= 6;
|
ni <<= 6;
|
||||||
return (sif & 0x0f) | (prio & 0x30) | (ni & 0xc0);
|
return (sif & 0x0f) | (prio & 0x30) | (ni & 0xc0);
|
||||||
|
@ -58,14 +58,14 @@ bool SS7Layer4::initialize(const NamedList* config)
|
||||||
if (engine() && !network()) {
|
if (engine() && !network()) {
|
||||||
NamedList params("ss7router");
|
NamedList params("ss7router");
|
||||||
if (config) {
|
if (config) {
|
||||||
String name = config->getValue("router",params);
|
String name = config->getValue(YSTRING("router"),params);
|
||||||
if (name && !name.toBoolean(false))
|
if (name && !name.toBoolean(false))
|
||||||
static_cast<String&>(params) = name;
|
static_cast<String&>(params) = name;
|
||||||
}
|
}
|
||||||
if (params.toBoolean(true))
|
if (params.toBoolean(true))
|
||||||
attach(YOBJECT(SS7Router,engine()->build("SS7Router",params,true)));
|
attach(YOBJECT(SS7Router,engine()->build("SS7Router",params,true)));
|
||||||
else if (config) {
|
else if (config) {
|
||||||
String name = config->getValue("network");
|
String name = config->getValue(YSTRING("network"));
|
||||||
if (name && name.toBoolean(true)) {
|
if (name && name.toBoolean(true)) {
|
||||||
static_cast<String&>(params) = name;
|
static_cast<String&>(params) = name;
|
||||||
attach(YOBJECT(SS7Layer3,engine()->build("SS7Layer3",params,true)));
|
attach(YOBJECT(SS7Layer3,engine()->build("SS7Layer3",params,true)));
|
||||||
|
@ -87,7 +87,7 @@ void SS7Layer4::attach(SS7Layer3* network)
|
||||||
const char* name = 0;
|
const char* name = 0;
|
||||||
if (!engine() || engine()->find(tmp)) {
|
if (!engine() || engine()->find(tmp)) {
|
||||||
name = tmp->toString().safe();
|
name = tmp->toString().safe();
|
||||||
if (tmp->getObject("SS7Router"))
|
if (tmp->getObject(YSTRING("SS7Router")))
|
||||||
(static_cast<SS7Router*>(tmp))->detach(this);
|
(static_cast<SS7Router*>(tmp))->detach(this);
|
||||||
else
|
else
|
||||||
tmp->attach(0);
|
tmp->attach(0);
|
||||||
|
|
|
@ -312,9 +312,9 @@ SS7Management::SS7Management(const NamedList& params, unsigned char sio)
|
||||||
SS7Layer4(sio,¶ms),
|
SS7Layer4(sio,¶ms),
|
||||||
m_changeMsgs(true), m_changeSets(false), m_neighbours(true)
|
m_changeMsgs(true), m_changeSets(false), m_neighbours(true)
|
||||||
{
|
{
|
||||||
m_changeMsgs = params.getBoolValue("changemsgs",m_changeMsgs);
|
m_changeMsgs = params.getBoolValue(YSTRING("changemsgs"),m_changeMsgs);
|
||||||
m_changeSets = params.getBoolValue("changesets",m_changeSets);
|
m_changeSets = params.getBoolValue(YSTRING("changesets"),m_changeSets);
|
||||||
m_neighbours = params.getBoolValue("neighbours",m_neighbours);
|
m_neighbours = params.getBoolValue(YSTRING("neighbours"),m_neighbours);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
case SS7MsgSNM::MIM:
|
case SS7MsgSNM::MIM:
|
||||||
{
|
{
|
||||||
// for ANSI the SLC is not stored in SLS but in a separate field
|
// for ANSI the SLC is not stored in SLS but in a separate field
|
||||||
int slc = msg->params().getIntValue("slc",-1);
|
int slc = msg->params().getIntValue(YSTRING("slc"),-1);
|
||||||
if (slc >= 0 && slc <= 255)
|
if (slc >= 0 && slc <= 255)
|
||||||
lbl.setSls((unsigned char)slc);
|
lbl.setSls((unsigned char)slc);
|
||||||
}
|
}
|
||||||
|
@ -405,7 +405,7 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
msg->type() == SS7MsgSNM::TFC ||
|
msg->type() == SS7MsgSNM::TFC ||
|
||||||
msg->type() == SS7MsgSNM::RST ||
|
msg->type() == SS7MsgSNM::RST ||
|
||||||
msg->type() == SS7MsgSNM::RSR) {
|
msg->type() == SS7MsgSNM::RSR) {
|
||||||
String dest = msg->params().getValue("destination");
|
String dest = msg->params().getValue(YSTRING("destination"));
|
||||||
if (!dest.null()) {
|
if (!dest.null()) {
|
||||||
const char* oper = lookup(msg->type(),s_dict_control);
|
const char* oper = lookup(msg->type(),s_dict_control);
|
||||||
Debug(this,DebugInfo,"%s (label=%s): Traffic %s to dest=%s [%p]",
|
Debug(this,DebugInfo,"%s (label=%s): Traffic %s to dest=%s [%p]",
|
||||||
|
@ -451,9 +451,9 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
return true;
|
return true;
|
||||||
if (inhibit(lbl,SS7Layer2::Inactive)) {
|
if (inhibit(lbl,SS7Layer2::Inactive)) {
|
||||||
String link;
|
String link;
|
||||||
link << msg->params().getValue("pointcodetype") << "," << lbl;
|
link << msg->params().getValue(YSTRING("pointcodetype")) << "," << lbl;
|
||||||
Debug(this,DebugNote,"Changeover order on %s",link.c_str());
|
Debug(this,DebugNote,"Changeover order on %s",link.c_str());
|
||||||
int seq = msg->params().getIntValue("sequence",-1);
|
int seq = msg->params().getIntValue(YSTRING("sequence"),-1);
|
||||||
if (seq >= 0)
|
if (seq >= 0)
|
||||||
recover(lbl,seq);
|
recover(lbl,seq);
|
||||||
seq = router ? router->getSequence(lbl) : -1;
|
seq = router ? router->getSequence(lbl) : -1;
|
||||||
|
@ -477,7 +477,7 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SS7PointCode::ANSI:
|
case SS7PointCode::ANSI:
|
||||||
data[1] = (unsigned char)((msg->params().getIntValue("slc",sls) & 0x0f) | (seq << 4));
|
data[1] = (unsigned char)((msg->params().getIntValue(YSTRING("slc"),sls) & 0x0f) | (seq << 4));
|
||||||
data[2] = (unsigned char)(seq >> 4);
|
data[2] = (unsigned char)(seq >> 4);
|
||||||
len++;
|
len++;
|
||||||
if (len >= 5) {
|
if (len >= 5) {
|
||||||
|
@ -529,10 +529,10 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
unlock();
|
unlock();
|
||||||
if (pend) {
|
if (pend) {
|
||||||
String link;
|
String link;
|
||||||
link << msg->params().getValue("pointcodetype") << "," << *pend;
|
link << msg->params().getValue(YSTRING("pointcodetype")) << "," << *pend;
|
||||||
Debug(this,DebugNote,"Changeover acknowledged on %s",link.c_str());
|
Debug(this,DebugNote,"Changeover acknowledged on %s",link.c_str());
|
||||||
inhibit(*pend,SS7Layer2::Inactive);
|
inhibit(*pend,SS7Layer2::Inactive);
|
||||||
int seq = msg->params().getIntValue("sequence",-1);
|
int seq = msg->params().getIntValue(YSTRING("sequence"),-1);
|
||||||
if (seq >= 0)
|
if (seq >= 0)
|
||||||
recover(*pend,seq);
|
recover(*pend,seq);
|
||||||
}
|
}
|
||||||
|
@ -551,7 +551,7 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
return true;
|
return true;
|
||||||
if (inhibit(lbl,0,SS7Layer2::Inactive)) {
|
if (inhibit(lbl,0,SS7Layer2::Inactive)) {
|
||||||
String link;
|
String link;
|
||||||
link << msg->params().getValue("pointcodetype") << "," << lbl;
|
link << msg->params().getValue(YSTRING("pointcodetype")) << "," << lbl;
|
||||||
Debug(this,DebugNote,"Changeback declaration on %s",link.c_str());
|
Debug(this,DebugNote,"Changeback declaration on %s",link.c_str());
|
||||||
SS7MSU answer(msu.getSIO(),lbl,0,len+1);
|
SS7MSU answer(msu.getSIO(),lbl,0,len+1);
|
||||||
unsigned char* d = answer.getData(lbl.length()+1,len+1);
|
unsigned char* d = answer.getData(lbl.length()+1,len+1);
|
||||||
|
@ -588,7 +588,7 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
unlock();
|
unlock();
|
||||||
if (pend) {
|
if (pend) {
|
||||||
String link;
|
String link;
|
||||||
link << msg->params().getValue("pointcodetype") << "," << *pend;
|
link << msg->params().getValue(YSTRING("pointcodetype")) << "," << *pend;
|
||||||
Debug(this,DebugNote,"Changeback acknowledged on %s",link.c_str());
|
Debug(this,DebugNote,"Changeback acknowledged on %s",link.c_str());
|
||||||
inhibit(*pend,0,SS7Layer2::Inactive);
|
inhibit(*pend,0,SS7Layer2::Inactive);
|
||||||
}
|
}
|
||||||
|
@ -714,15 +714,15 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
}
|
}
|
||||||
else if (msg->type() == SS7MsgSNM::UPU) {
|
else if (msg->type() == SS7MsgSNM::UPU) {
|
||||||
Debug(this,DebugNote,"Unavailable part %s at %s, cause %s",
|
Debug(this,DebugNote,"Unavailable part %s at %s, cause %s",
|
||||||
msg->params().getValue("part","?"),
|
msg->params().getValue(YSTRING("part"),"?"),
|
||||||
msg->params().getValue("destination","?"),
|
msg->params().getValue(YSTRING("destination"),"?"),
|
||||||
msg->params().getValue("cause","?"));
|
msg->params().getValue(YSTRING("cause"),"?"));
|
||||||
if (router) {
|
if (router) {
|
||||||
unsigned char part = msg->params().getIntValue("part",-1);
|
unsigned char part = msg->params().getIntValue(YSTRING("part"),-1);
|
||||||
unsigned char cause = msg->params().getIntValue("cause",-1);
|
unsigned char cause = msg->params().getIntValue(YSTRING("cause"),-1);
|
||||||
SS7PointCode pc;
|
SS7PointCode pc;
|
||||||
if (part > SS7MSU::MTNS && part <= 0x0f && cause <= 0x0f &&
|
if (part > SS7MSU::MTNS && part <= 0x0f && cause <= 0x0f &&
|
||||||
pc.assign(msg->params().getValue("destination"),label.type()))
|
pc.assign(msg->params().getValue(YSTRING("destination")),label.type()))
|
||||||
router->receivedUPU(label.type(),pc,(SS7MSU::Services)part,
|
router->receivedUPU(label.type(),pc,(SS7MSU::Services)part,
|
||||||
cause,label,sls);
|
cause,label,sls);
|
||||||
}
|
}
|
||||||
|
@ -750,9 +750,9 @@ HandledMSU SS7Management::receivedMSU(const SS7MSU& msu, const SS7Label& label,
|
||||||
|
|
||||||
bool SS7Management::control(NamedList& params)
|
bool SS7Management::control(NamedList& params)
|
||||||
{
|
{
|
||||||
String* ret = params.getParam("completion");
|
String* ret = params.getParam(YSTRING("completion"));
|
||||||
const String* oper = params.getParam("operation");
|
const String* oper = params.getParam(YSTRING("operation"));
|
||||||
const char* cmp = params.getValue("component");
|
const char* cmp = params.getValue(YSTRING("component"));
|
||||||
int cmd = -1;
|
int cmd = -1;
|
||||||
if (!TelEngine::null(oper)) {
|
if (!TelEngine::null(oper)) {
|
||||||
cmd = oper->toInteger(s_dict_control,cmd);
|
cmd = oper->toInteger(s_dict_control,cmd);
|
||||||
|
@ -763,7 +763,7 @@ bool SS7Management::control(NamedList& params)
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (oper && (cmd < 0))
|
if (oper && (cmd < 0))
|
||||||
return false;
|
return false;
|
||||||
String part = params.getValue("partword");
|
String part = params.getValue(YSTRING("partword"));
|
||||||
if (cmp) {
|
if (cmp) {
|
||||||
if (toString() != cmp)
|
if (toString() != cmp)
|
||||||
return false;
|
return false;
|
||||||
|
@ -777,10 +777,10 @@ bool SS7Management::control(NamedList& params)
|
||||||
if (!(cmp && toString() == cmp))
|
if (!(cmp && toString() == cmp))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_changeMsgs = params.getBoolValue("changemsgs",m_changeMsgs);
|
m_changeMsgs = params.getBoolValue(YSTRING("changemsgs"),m_changeMsgs);
|
||||||
m_changeSets = params.getBoolValue("changesets",m_changeSets);
|
m_changeSets = params.getBoolValue(YSTRING("changesets"),m_changeSets);
|
||||||
m_neighbours = params.getBoolValue("neighbours",m_neighbours);
|
m_neighbours = params.getBoolValue(YSTRING("neighbours"),m_neighbours);
|
||||||
const String* addr = params.getParam("address");
|
const String* addr = params.getParam(YSTRING("address"));
|
||||||
if (cmd < 0 || TelEngine::null(addr))
|
if (cmd < 0 || TelEngine::null(addr))
|
||||||
return SignallingComponent::control(params);
|
return SignallingComponent::control(params);
|
||||||
// TYPE,opc,dpc,sls,spare
|
// TYPE,opc,dpc,sls,spare
|
||||||
|
@ -818,7 +818,7 @@ bool SS7Management::control(NamedList& params)
|
||||||
case SS7MsgSNM::LFU:
|
case SS7MsgSNM::LFU:
|
||||||
txSls = (txSls + 1) & 0xff;
|
txSls = (txSls + 1) & 0xff;
|
||||||
}
|
}
|
||||||
txSls = params.getIntValue("linksel",txSls) & 0xff;
|
txSls = params.getIntValue(YSTRING("linksel"),txSls) & 0xff;
|
||||||
String tmp;
|
String tmp;
|
||||||
tmp << SS7PointCode::lookup(lbl.type()) << "," << lbl;
|
tmp << SS7PointCode::lookup(lbl.type()) << "," << lbl;
|
||||||
Debug(this,DebugAll,"Sending %s to %s on %d [%p]",
|
Debug(this,DebugAll,"Sending %s to %s on %d [%p]",
|
||||||
|
@ -832,7 +832,7 @@ bool SS7Management::control(NamedList& params)
|
||||||
case SS7MsgSNM::RST:
|
case SS7MsgSNM::RST:
|
||||||
case SS7MsgSNM::RSR:
|
case SS7MsgSNM::RSR:
|
||||||
{
|
{
|
||||||
addr = params.getParam("destination");
|
addr = params.getParam(YSTRING("destination"));
|
||||||
SS7PointCode dest(opc);
|
SS7PointCode dest(opc);
|
||||||
if (TelEngine::null(addr) || dest.assign(*addr,t)) {
|
if (TelEngine::null(addr) || dest.assign(*addr,t)) {
|
||||||
unsigned char data[5];
|
unsigned char data[5];
|
||||||
|
@ -878,12 +878,12 @@ bool SS7Management::control(NamedList& params)
|
||||||
case SS7MsgSNM::COA:
|
case SS7MsgSNM::COA:
|
||||||
case SS7MsgSNM::XCO:
|
case SS7MsgSNM::XCO:
|
||||||
case SS7MsgSNM::XCA:
|
case SS7MsgSNM::XCA:
|
||||||
if (params.getBoolValue("emergency",false)) {
|
if (params.getBoolValue(YSTRING("emergency"),false)) {
|
||||||
unsigned char data = (SS7MsgSNM::COO == cmd) ? SS7MsgSNM::ECO : SS7MsgSNM::ECA;
|
unsigned char data = (SS7MsgSNM::COO == cmd) ? SS7MsgSNM::ECO : SS7MsgSNM::ECA;
|
||||||
return transmitMSU(SS7MSU(txSio,lbl,&data,1),lbl,txSls) >= 0;
|
return transmitMSU(SS7MSU(txSio,lbl,&data,1),lbl,txSls) >= 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int seq = params.getIntValue("sequence",0) & 0x00ffffff;
|
int seq = params.getIntValue(YSTRING("sequence"),0) & 0x00ffffff;
|
||||||
if (SS7MsgSNM::COO == cmd || SS7MsgSNM::COA == cmd)
|
if (SS7MsgSNM::COO == cmd || SS7MsgSNM::COA == cmd)
|
||||||
seq &= 0x7f;
|
seq &= 0x7f;
|
||||||
int len = 2;
|
int len = 2;
|
||||||
|
@ -899,7 +899,7 @@ bool SS7Management::control(NamedList& params)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SS7PointCode::ANSI:
|
case SS7PointCode::ANSI:
|
||||||
data[1] = (unsigned char)((params.getIntValue("slc",sls) & 0x0f) | (seq << 4));
|
data[1] = (unsigned char)((params.getIntValue(YSTRING("slc"),sls) & 0x0f) | (seq << 4));
|
||||||
data[2] = (unsigned char)(seq >> 4);
|
data[2] = (unsigned char)(seq >> 4);
|
||||||
len = 3;
|
len = 3;
|
||||||
if (SS7MsgSNM::XCO == cmd || SS7MsgSNM::XCA == cmd) {
|
if (SS7MsgSNM::XCO == cmd || SS7MsgSNM::XCA == cmd) {
|
||||||
|
@ -920,7 +920,7 @@ bool SS7Management::control(NamedList& params)
|
||||||
case SS7MsgSNM::CBD:
|
case SS7MsgSNM::CBD:
|
||||||
case SS7MsgSNM::CBA:
|
case SS7MsgSNM::CBA:
|
||||||
{
|
{
|
||||||
int code = params.getIntValue("code",0);
|
int code = params.getIntValue(YSTRING("code"),0);
|
||||||
int len = 2;
|
int len = 2;
|
||||||
unsigned char data[3];
|
unsigned char data[3];
|
||||||
data[0] = cmd;
|
data[0] = cmd;
|
||||||
|
@ -929,7 +929,7 @@ bool SS7Management::control(NamedList& params)
|
||||||
data[1] = (unsigned char)code;
|
data[1] = (unsigned char)code;
|
||||||
break;
|
break;
|
||||||
case SS7PointCode::ANSI:
|
case SS7PointCode::ANSI:
|
||||||
data[1] = (unsigned char)((params.getIntValue("slc",sls) & 0x0f) | (code << 4));
|
data[1] = (unsigned char)((params.getIntValue(YSTRING("slc"),sls) & 0x0f) | (code << 4));
|
||||||
data[2] = (unsigned char)(code >> 4);
|
data[2] = (unsigned char)(code >> 4);
|
||||||
len = 3;
|
len = 3;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -54,7 +54,7 @@ static inline const char* linkSide(bool net)
|
||||||
static inline void fixParams(NamedList& params, const NamedList& config)
|
static inline void fixParams(NamedList& params, const NamedList& config)
|
||||||
{
|
{
|
||||||
params.copyParams(config);
|
params.copyParams(config);
|
||||||
int rx = params.getIntValue("rxunderrun");
|
int rx = params.getIntValue(YSTRING("rxunderrun"));
|
||||||
if ((rx > 0) && (rx < 2500))
|
if ((rx > 0) && (rx < 2500))
|
||||||
params.setParam("rxunderrun","2500");
|
params.setParam("rxunderrun","2500");
|
||||||
}
|
}
|
||||||
|
@ -143,11 +143,11 @@ ISDNQ921::ISDNQ921(const NamedList& params, const char* name, ISDNQ921Management
|
||||||
m_idleTimer.interval(params,"t203",2000,10000,false);
|
m_idleTimer.interval(params,"t203",2000,10000,false);
|
||||||
// Adjust idle timeout to data link side
|
// Adjust idle timeout to data link side
|
||||||
m_idleTimer.interval(m_idleTimer.interval() + (network() ? -500 : 500));
|
m_idleTimer.interval(m_idleTimer.interval() + (network() ? -500 : 500));
|
||||||
m_window.maxVal(params.getIntValue("maxpendingframes",7));
|
m_window.maxVal(params.getIntValue(YSTRING("maxpendingframes"),7));
|
||||||
if (!m_window.maxVal())
|
if (!m_window.maxVal())
|
||||||
m_window.maxVal(7);
|
m_window.maxVal(7);
|
||||||
setDebug(params.getBoolValue("print-frames",false),
|
setDebug(params.getBoolValue(YSTRING("print-frames"),false),
|
||||||
params.getBoolValue("extended-debug",false));
|
params.getBoolValue(YSTRING("extended-debug"),false));
|
||||||
if (debugAt(DebugInfo)) {
|
if (debugAt(DebugInfo)) {
|
||||||
String tmp;
|
String tmp;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -168,7 +168,7 @@ ISDNQ921::ISDNQ921(const NamedList& params, const char* name, ISDNQ921Management
|
||||||
linkSide(network()),tmp.safe(),this);
|
linkSide(network()),tmp.safe(),this);
|
||||||
}
|
}
|
||||||
if (!mgmt)
|
if (!mgmt)
|
||||||
setDumper(params.getValue("layer2dump"));
|
setDumper(params.getValue(YSTRING("layer2dump")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -195,15 +195,15 @@ bool ISDNQ921::initialize(const NamedList* config)
|
||||||
Debug(this,DebugInfo,"ISDNQ921::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"ISDNQ921::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
if (config) {
|
if (config) {
|
||||||
debugLevel(config->getIntValue("debuglevel_q921",
|
debugLevel(config->getIntValue(YSTRING("debuglevel_q921"),
|
||||||
config->getIntValue("debuglevel",-1)));
|
config->getIntValue(YSTRING("debuglevel"),-1)));
|
||||||
setDebug(config->getBoolValue("print-frames",false),
|
setDebug(config->getBoolValue(YSTRING("print-frames"),false),
|
||||||
config->getBoolValue("extended-debug",false));
|
config->getBoolValue(YSTRING("extended-debug"),false));
|
||||||
}
|
}
|
||||||
if (config && !m_management && !iface()) {
|
if (config && !m_management && !iface()) {
|
||||||
NamedString* name = config->getParam("sig");
|
NamedString* name = config->getParam(YSTRING("sig"));
|
||||||
if (!name)
|
if (!name)
|
||||||
name = config->getParam("basename");
|
name = config->getParam(YSTRING("basename"));
|
||||||
if (name) {
|
if (name) {
|
||||||
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
||||||
NamedList* ifConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
NamedList* ifConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
||||||
|
@ -1043,7 +1043,7 @@ ISDNQ921Management::ISDNQ921Management(const NamedList& params, const char* name
|
||||||
m_network = net;
|
m_network = net;
|
||||||
m_teiManTimer.interval(params,"t202",2500,2600,false);
|
m_teiManTimer.interval(params,"t202",2500,2600,false);
|
||||||
m_teiTimer.interval(params,"t201",1000,5000,false);
|
m_teiTimer.interval(params,"t201",1000,5000,false);
|
||||||
setDumper(params.getValue("layer2dump"));
|
setDumper(params.getValue(YSTRING("layer2dump")));
|
||||||
bool set0 = true;
|
bool set0 = true;
|
||||||
if (baseName.endsWith("Management")) {
|
if (baseName.endsWith("Management")) {
|
||||||
baseName = baseName.substr(0,baseName.length()-10);
|
baseName = baseName.substr(0,baseName.length()-10);
|
||||||
|
@ -1087,12 +1087,12 @@ bool ISDNQ921Management::initialize(const NamedList* config)
|
||||||
Debug(this,DebugInfo,"ISDNQ921Management::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"ISDNQ921Management::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
if (config)
|
if (config)
|
||||||
debugLevel(config->getIntValue("debuglevel_q921mgmt",
|
debugLevel(config->getIntValue(YSTRING("debuglevel_q921mgmt"),
|
||||||
config->getIntValue("debuglevel",-1)));
|
config->getIntValue(YSTRING("debuglevel"),-1)));
|
||||||
if (config && !iface()) {
|
if (config && !iface()) {
|
||||||
NamedString* name = config->getParam("sig");
|
NamedString* name = config->getParam(YSTRING("sig"));
|
||||||
if (!name)
|
if (!name)
|
||||||
name = config->getParam("basename");
|
name = config->getParam(YSTRING("basename"));
|
||||||
if (name) {
|
if (name) {
|
||||||
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
||||||
NamedList* ifConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
NamedList* ifConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
||||||
|
@ -1512,8 +1512,8 @@ ISDNQ921Passive::ISDNQ921Passive(const NamedList& params, const char* name)
|
||||||
#endif
|
#endif
|
||||||
m_idleTimer.interval(params,"idletimeout",4000,30000,false);
|
m_idleTimer.interval(params,"idletimeout",4000,30000,false);
|
||||||
m_checkLinkSide = detectType();
|
m_checkLinkSide = detectType();
|
||||||
setDebug(params.getBoolValue("print-frames",false),
|
setDebug(params.getBoolValue(YSTRING("print-frames"),false),
|
||||||
params.getBoolValue("extended-debug",false));
|
params.getBoolValue(YSTRING("extended-debug"),false));
|
||||||
DDebug(this,DebugInfo,
|
DDebug(this,DebugInfo,
|
||||||
"ISDN Passive Data Link type=%s autodetect=%s idle-timeout=%u [%p]",
|
"ISDN Passive Data Link type=%s autodetect=%s idle-timeout=%u [%p]",
|
||||||
linkSide(network()),String::boolText(detectType()),
|
linkSide(network()),String::boolText(detectType()),
|
||||||
|
@ -1521,7 +1521,7 @@ ISDNQ921Passive::ISDNQ921Passive(const NamedList& params, const char* name)
|
||||||
m_idleTimer.start();
|
m_idleTimer.start();
|
||||||
// Try to dump from specific parameter, fall back to generic
|
// Try to dump from specific parameter, fall back to generic
|
||||||
const char* dump = network() ? "layer2dump-net" : "layer2dump-cpe";
|
const char* dump = network() ? "layer2dump-net" : "layer2dump-cpe";
|
||||||
setDumper(params.getValue(dump,params.getValue("layer2dump")));
|
setDumper(params.getValue(dump,params.getValue(YSTRING("layer2dump"))));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -1546,15 +1546,15 @@ bool ISDNQ921Passive::initialize(const NamedList* config)
|
||||||
Debug(this,DebugInfo,"ISDNQ921Passive::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"ISDNQ921Passive::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
if (config) {
|
if (config) {
|
||||||
debugLevel(config->getIntValue("debuglevel_q921",
|
debugLevel(config->getIntValue(YSTRING("debuglevel_q921"),
|
||||||
config->getIntValue("debuglevel",-1)));
|
config->getIntValue(YSTRING("debuglevel"),-1)));
|
||||||
setDebug(config->getBoolValue("print-frames",false),
|
setDebug(config->getBoolValue(YSTRING("print-frames"),false),
|
||||||
config->getBoolValue("extended-debug",false));
|
config->getBoolValue(YSTRING("extended-debug"),false));
|
||||||
}
|
}
|
||||||
if (config && !iface()) {
|
if (config && !iface()) {
|
||||||
NamedString* name = config->getParam("sig");
|
NamedString* name = config->getParam(YSTRING("sig"));
|
||||||
if (!name)
|
if (!name)
|
||||||
name = config->getParam("basename");
|
name = config->getParam(YSTRING("basename"));
|
||||||
if (name) {
|
if (name) {
|
||||||
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
||||||
NamedList* ifConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
NamedList* ifConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
||||||
|
@ -1759,15 +1759,15 @@ ISDNLayer2::ISDNLayer2(const NamedList& params, const char* name, u_int8_t tei)
|
||||||
m_maxUserData(260)
|
m_maxUserData(260)
|
||||||
{
|
{
|
||||||
XDebug(this,DebugAll,"ISDNLayer2 '%s' comp=%p [%p]",name,static_cast<const SignallingComponent*>(this),this);
|
XDebug(this,DebugAll,"ISDNLayer2 '%s' comp=%p [%p]",name,static_cast<const SignallingComponent*>(this),this);
|
||||||
m_network = params.getBoolValue("network",false);
|
m_network = params.getBoolValue(YSTRING("network"),false);
|
||||||
m_detectType = params.getBoolValue("detect",false);
|
m_detectType = params.getBoolValue(YSTRING("detect"),false);
|
||||||
int tmp = params.getIntValue("sapi",0);
|
int tmp = params.getIntValue(YSTRING("sapi"),0);
|
||||||
m_sapi = (tmp >= 0 && tmp <= Q921_SAPI_MANAGEMENT) ? tmp : 0;
|
m_sapi = (tmp >= 0 && tmp <= Q921_SAPI_MANAGEMENT) ? tmp : 0;
|
||||||
tmp = params.getIntValue("tei",tei);
|
tmp = params.getIntValue(YSTRING("tei"),tei);
|
||||||
m_tei = (tmp >= 0 && tmp < Q921_TEI_BROADCAST) ? tmp : 0;
|
m_tei = (tmp >= 0 && tmp < Q921_TEI_BROADCAST) ? tmp : 0;
|
||||||
teiAssigned(true);
|
teiAssigned(true);
|
||||||
m_autoRestart = params.getBoolValue("auto-restart",true);
|
m_autoRestart = params.getBoolValue(YSTRING("auto-restart"),true);
|
||||||
m_maxUserData = params.getIntValue("maxuserdata",260);
|
m_maxUserData = params.getIntValue(YSTRING("maxuserdata"),260);
|
||||||
if (!m_maxUserData)
|
if (!m_maxUserData)
|
||||||
m_maxUserData = 260;
|
m_maxUserData = 260;
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,10 +341,10 @@ bool ISDNQ931IEData::processBearerCaps(ISDNQ931Message* msg, bool add,
|
||||||
m_transferRate = "";
|
m_transferRate = "";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_transferCapability = ie->getValue("transfer-cap");
|
m_transferCapability = ie->getValue(YSTRING("transfer-cap"));
|
||||||
m_transferMode = ie->getValue("transfer-mode");
|
m_transferMode = ie->getValue(YSTRING("transfer-mode"));
|
||||||
m_transferRate = ie->getValue("transfer-rate");
|
m_transferRate = ie->getValue(YSTRING("transfer-rate"));
|
||||||
m_format = ie->getValue("layer1-protocol");
|
m_format = ie->getValue(YSTRING("layer1-protocol"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,11 +370,11 @@ bool ISDNQ931IEData::processChannelID(ISDNQ931Message* msg, bool add,
|
||||||
m_channelMandatory = m_channelByNumber = false;
|
m_channelMandatory = m_channelByNumber = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_bri = ie->getBoolValue("interface-bri",m_bri);
|
m_bri = ie->getBoolValue(YSTRING("interface-bri"),m_bri);
|
||||||
m_channelMandatory = ie->getBoolValue("channel-exclusive");
|
m_channelMandatory = ie->getBoolValue(YSTRING("channel-exclusive"));
|
||||||
m_channelByNumber = ie->getBoolValue("channel-by-number");
|
m_channelByNumber = ie->getBoolValue(YSTRING("channel-by-number"));
|
||||||
m_channelType = ie->getValue("type");
|
m_channelType = ie->getValue(YSTRING("type"));
|
||||||
m_channelSelect = ie->getValue("channel-select");
|
m_channelSelect = ie->getValue(YSTRING("channel-select"));
|
||||||
if (m_bri && m_channelSelect) {
|
if (m_bri && m_channelSelect) {
|
||||||
m_channelByNumber = true;
|
m_channelByNumber = true;
|
||||||
if (m_channelSelect == "b1")
|
if (m_channelSelect == "b1")
|
||||||
|
@ -389,12 +389,12 @@ bool ISDNQ931IEData::processChannelID(ISDNQ931Message* msg, bool add,
|
||||||
unsigned int n = ie->length();
|
unsigned int n = ie->length();
|
||||||
for (unsigned int i = 0; i < n; i++) {
|
for (unsigned int i = 0; i < n; i++) {
|
||||||
NamedString* ns = ie->getParam(i);
|
NamedString* ns = ie->getParam(i);
|
||||||
if (ns && (ns->name() == "channels"))
|
if (ns && (ns->name() == YSTRING("channels")))
|
||||||
m_channels.append(*ns,",");
|
m_channels.append(*ns,",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_channels = ie->getValue("slot-map");
|
m_channels = ie->getValue(YSTRING("slot-map"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ bool ISDNQ931IEData::processProgress(ISDNQ931Message* msg, bool add,
|
||||||
// Progress may repeat
|
// Progress may repeat
|
||||||
ISDNQ931IE* ie = msg->getIE(ISDNQ931IE::Progress);
|
ISDNQ931IE* ie = msg->getIE(ISDNQ931IE::Progress);
|
||||||
for (; ie; ie = msg->getIE(ISDNQ931IE::Progress,ie))
|
for (; ie; ie = msg->getIE(ISDNQ931IE::Progress,ie))
|
||||||
m_progress.append(ie->getValue("description"),",");
|
m_progress.append(ie->getValue(YSTRING("description")),",");
|
||||||
}
|
}
|
||||||
return !m_progress.null();
|
return !m_progress.null();
|
||||||
}
|
}
|
||||||
|
@ -474,9 +474,9 @@ bool ISDNQ931IEData::processCalledNo(ISDNQ931Message* msg, bool add,
|
||||||
m_calledNo = "";
|
m_calledNo = "";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_calledNo = ie->getValue("number");
|
m_calledNo = ie->getValue(YSTRING("number"));
|
||||||
m_calledType = ie->getValue("type");
|
m_calledType = ie->getValue(YSTRING("type"));
|
||||||
m_calledPlan = ie->getValue("plan");
|
m_calledPlan = ie->getValue(YSTRING("plan"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,11 +510,11 @@ bool ISDNQ931IEData::processCallingNo(ISDNQ931Message* msg, bool add,
|
||||||
m_callerNo = "";
|
m_callerNo = "";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_callerNo = ie->getValue("number");
|
m_callerNo = ie->getValue(YSTRING("number"));
|
||||||
m_callerType = ie->getValue("type");
|
m_callerType = ie->getValue(YSTRING("type"));
|
||||||
m_callerPlan = ie->getValue("plan");
|
m_callerPlan = ie->getValue(YSTRING("plan"));
|
||||||
m_callerPres = ie->getValue("presentation");
|
m_callerPres = ie->getValue(YSTRING("presentation"));
|
||||||
m_callerScreening = ie->getValue("screening");
|
m_callerScreening = ie->getValue(YSTRING("screening"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -839,7 +839,7 @@ bool ISDNQ931Call::sendEvent(SignallingEvent* event)
|
||||||
default:
|
default:
|
||||||
m_terminate = m_destroy = true;
|
m_terminate = m_destroy = true;
|
||||||
retVal = sendReleaseComplete(event->message() ?
|
retVal = sendReleaseComplete(event->message() ?
|
||||||
event->message()->params().getValue("reason") : 0);
|
event->message()->params().getValue(YSTRING("reason")) : 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -948,9 +948,9 @@ SignallingEvent* ISDNQ931Call::getEvent(const Time& when)
|
||||||
// Get reserved circuit or this object
|
// Get reserved circuit or this object
|
||||||
void* ISDNQ931Call::getObject(const String& name) const
|
void* ISDNQ931Call::getObject(const String& name) const
|
||||||
{
|
{
|
||||||
if (name == "SignallingCircuit")
|
if (name == YSTRING("SignallingCircuit"))
|
||||||
return m_circuit;
|
return m_circuit;
|
||||||
if (name == "ISDNQ931Call")
|
if (name == YSTRING("ISDNQ931Call"))
|
||||||
return (void*)this;
|
return (void*)this;
|
||||||
return SignallingCall::getObject(name);
|
return SignallingCall::getObject(name);
|
||||||
}
|
}
|
||||||
|
@ -1448,9 +1448,9 @@ bool ISDNQ931Call::sendAlerting(SignallingMessage* sigMsg)
|
||||||
MSG_CHECK_SEND(ISDNQ931Message::Alerting)
|
MSG_CHECK_SEND(ISDNQ931Message::Alerting)
|
||||||
const char* format = 0;
|
const char* format = 0;
|
||||||
if (sigMsg) {
|
if (sigMsg) {
|
||||||
format = sigMsg->params().getValue("format");
|
format = sigMsg->params().getValue(YSTRING("format"));
|
||||||
m_inbandAvailable = m_inbandAvailable ||
|
m_inbandAvailable = m_inbandAvailable ||
|
||||||
sigMsg->params().getBoolValue("earlymedia",false);
|
sigMsg->params().getBoolValue(YSTRING("earlymedia"),false);
|
||||||
if (m_inbandAvailable)
|
if (m_inbandAvailable)
|
||||||
SignallingUtils::appendFlag(m_data.m_progress,"in-band-info");
|
SignallingUtils::appendFlag(m_data.m_progress,"in-band-info");
|
||||||
}
|
}
|
||||||
|
@ -1526,7 +1526,7 @@ bool ISDNQ931Call::sendConnect(SignallingMessage* sigMsg)
|
||||||
}
|
}
|
||||||
// Progress indicator
|
// Progress indicator
|
||||||
if (sigMsg) {
|
if (sigMsg) {
|
||||||
m_data.m_progress = sigMsg->params().getValue("call-progress");
|
m_data.m_progress = sigMsg->params().getValue(YSTRING("call-progress"));
|
||||||
m_data.processProgress(msg,true,&q931()->parserData());
|
m_data.processProgress(msg,true,&q931()->parserData());
|
||||||
}
|
}
|
||||||
m_conTimer.start();
|
m_conTimer.start();
|
||||||
|
@ -1543,7 +1543,7 @@ bool ISDNQ931Call::sendConnectAck(SignallingMessage* sigMsg)
|
||||||
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::ConnectAck,this);
|
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::ConnectAck,this);
|
||||||
// Progress indicator
|
// Progress indicator
|
||||||
if (sigMsg) {
|
if (sigMsg) {
|
||||||
m_data.m_progress = sigMsg->params().getValue("call-progress");
|
m_data.m_progress = sigMsg->params().getValue(YSTRING("call-progress"));
|
||||||
m_data.processProgress(msg,true,&q931()->parserData());
|
m_data.processProgress(msg,true,&q931()->parserData());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1558,7 +1558,7 @@ bool ISDNQ931Call::sendDisconnect(SignallingMessage* sigMsg)
|
||||||
MSG_CHECK_SEND(ISDNQ931Message::Disconnect)
|
MSG_CHECK_SEND(ISDNQ931Message::Disconnect)
|
||||||
m_data.m_reason = "";
|
m_data.m_reason = "";
|
||||||
if (sigMsg)
|
if (sigMsg)
|
||||||
m_data.m_reason = sigMsg->params().getValue("reason");
|
m_data.m_reason = sigMsg->params().getValue(YSTRING("reason"));
|
||||||
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::Disconnect,this);
|
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::Disconnect,this);
|
||||||
m_data.processCause(msg,true);
|
m_data.processCause(msg,true);
|
||||||
changeState(DisconnectReq);
|
changeState(DisconnectReq);
|
||||||
|
@ -1575,12 +1575,12 @@ bool ISDNQ931Call::sendInfo(SignallingMessage* sigMsg)
|
||||||
MSG_CHECK_SEND(ISDNQ931Message::Info)
|
MSG_CHECK_SEND(ISDNQ931Message::Info)
|
||||||
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::Info,this);
|
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::Info,this);
|
||||||
// Check send complete complete
|
// Check send complete complete
|
||||||
if (sigMsg->params().getBoolValue("complete"))
|
if (sigMsg->params().getBoolValue(YSTRING("complete")))
|
||||||
msg->appendSafe(new ISDNQ931IE(ISDNQ931IE::SendComplete));
|
msg->appendSafe(new ISDNQ931IE(ISDNQ931IE::SendComplete));
|
||||||
m_data.m_display = sigMsg->params().getValue("display");
|
m_data.m_display = sigMsg->params().getValue(YSTRING("display"));
|
||||||
m_data.processDisplay(msg,true,&q931()->parserData());
|
m_data.processDisplay(msg,true,&q931()->parserData());
|
||||||
// Check tones or ringing
|
// Check tones or ringing
|
||||||
const char* tone = sigMsg->params().getValue("tone");
|
const char* tone = sigMsg->params().getValue(YSTRING("tone"));
|
||||||
if (tone)
|
if (tone)
|
||||||
msg->appendIEValue(ISDNQ931IE::Keypad,"keypad",tone);
|
msg->appendIEValue(ISDNQ931IE::Keypad,"keypad",tone);
|
||||||
return q931()->sendMessage(msg,callTei());
|
return q931()->sendMessage(msg,callTei());
|
||||||
|
@ -1592,9 +1592,9 @@ bool ISDNQ931Call::sendProgress(SignallingMessage* sigMsg)
|
||||||
{
|
{
|
||||||
MSG_CHECK_SEND(ISDNQ931Message::Progress)
|
MSG_CHECK_SEND(ISDNQ931Message::Progress)
|
||||||
if (sigMsg) {
|
if (sigMsg) {
|
||||||
m_data.m_progress = sigMsg->params().getValue("progress");
|
m_data.m_progress = sigMsg->params().getValue(YSTRING("progress"));
|
||||||
m_inbandAvailable = m_inbandAvailable ||
|
m_inbandAvailable = m_inbandAvailable ||
|
||||||
sigMsg->params().getBoolValue("earlymedia",false);
|
sigMsg->params().getBoolValue(YSTRING("earlymedia"),false);
|
||||||
if (m_inbandAvailable)
|
if (m_inbandAvailable)
|
||||||
SignallingUtils::appendFlag(m_data.m_progress,"in-band-info");
|
SignallingUtils::appendFlag(m_data.m_progress,"in-band-info");
|
||||||
}
|
}
|
||||||
|
@ -1611,7 +1611,7 @@ bool ISDNQ931Call::sendRelease(const char* reason, SignallingMessage* sigMsg)
|
||||||
return false;
|
return false;
|
||||||
// Get reason
|
// Get reason
|
||||||
if (!reason && sigMsg)
|
if (!reason && sigMsg)
|
||||||
reason = sigMsg->params().getValue("reason",0);
|
reason = sigMsg->params().getValue(YSTRING("reason"),0);
|
||||||
if (reason)
|
if (reason)
|
||||||
m_data.m_reason = reason;
|
m_data.m_reason = reason;
|
||||||
m_terminate = true;
|
m_terminate = true;
|
||||||
|
@ -1661,7 +1661,7 @@ bool ISDNQ931Call::sendSetup(SignallingMessage* sigMsg)
|
||||||
m_data.m_transferCapability = "speech";
|
m_data.m_transferCapability = "speech";
|
||||||
m_data.m_transferMode = "circuit";
|
m_data.m_transferMode = "circuit";
|
||||||
m_data.m_transferRate = "64kbit";
|
m_data.m_transferRate = "64kbit";
|
||||||
m_data.m_format = sigMsg->params().getValue("format",q931()->format());
|
m_data.m_format = sigMsg->params().getValue(YSTRING("format"),q931()->format());
|
||||||
if (0xffff == lookup(m_data.m_format,Q931Parser::s_dict_bearerProto1,0xffff))
|
if (0xffff == lookup(m_data.m_format,Q931Parser::s_dict_bearerProto1,0xffff))
|
||||||
m_data.m_format = "alaw";
|
m_data.m_format = "alaw";
|
||||||
m_data.processBearerCaps(msg,true);
|
m_data.processBearerCaps(msg,true);
|
||||||
|
@ -1693,22 +1693,22 @@ bool ISDNQ931Call::sendSetup(SignallingMessage* sigMsg)
|
||||||
m_data.processChannelID(msg,true);
|
m_data.processChannelID(msg,true);
|
||||||
}
|
}
|
||||||
// Progress indicator
|
// Progress indicator
|
||||||
m_data.m_progress = sigMsg->params().getValue("call-progress");
|
m_data.m_progress = sigMsg->params().getValue(YSTRING("call-progress"));
|
||||||
m_data.processProgress(msg,true,&q931()->parserData());
|
m_data.processProgress(msg,true,&q931()->parserData());
|
||||||
// Display
|
// Display
|
||||||
m_data.m_display = sigMsg->params().getValue("callername");
|
m_data.m_display = sigMsg->params().getValue(YSTRING("callername"));
|
||||||
m_data.processDisplay(msg,true,&q931()->parserData());
|
m_data.processDisplay(msg,true,&q931()->parserData());
|
||||||
// CallingNo
|
// CallingNo
|
||||||
m_data.m_callerType = sigMsg->params().getValue("callernumtype",q931()->numType());
|
m_data.m_callerType = sigMsg->params().getValue(YSTRING("callernumtype"),q931()->numType());
|
||||||
m_data.m_callerPlan = sigMsg->params().getValue("callernumplan",q931()->numPlan());
|
m_data.m_callerPlan = sigMsg->params().getValue(YSTRING("callernumplan"),q931()->numPlan());
|
||||||
m_data.m_callerPres = sigMsg->params().getValue("callerpres",q931()->numPresentation());
|
m_data.m_callerPres = sigMsg->params().getValue(YSTRING("callerpres"),q931()->numPresentation());
|
||||||
m_data.m_callerScreening = sigMsg->params().getValue("callerscreening",q931()->numScreening());
|
m_data.m_callerScreening = sigMsg->params().getValue(YSTRING("callerscreening"),q931()->numScreening());
|
||||||
m_data.m_callerNo = sigMsg->params().getValue("caller");
|
m_data.m_callerNo = sigMsg->params().getValue(YSTRING("caller"));
|
||||||
m_data.processCallingNo(msg,true);
|
m_data.processCallingNo(msg,true);
|
||||||
// CalledNo
|
// CalledNo
|
||||||
m_data.m_calledType = sigMsg->params().getValue("callednumtype");
|
m_data.m_calledType = sigMsg->params().getValue(YSTRING("callednumtype"));
|
||||||
m_data.m_calledPlan = sigMsg->params().getValue("callednumplan");
|
m_data.m_calledPlan = sigMsg->params().getValue(YSTRING("callednumplan"));
|
||||||
m_data.m_calledNo = sigMsg->params().getValue("called");
|
m_data.m_calledNo = sigMsg->params().getValue(YSTRING("called"));
|
||||||
m_data.processCalledNo(msg,true);
|
m_data.processCalledNo(msg,true);
|
||||||
// Send
|
// Send
|
||||||
changeState(CallInitiated);
|
changeState(CallInitiated);
|
||||||
|
@ -1731,7 +1731,7 @@ bool ISDNQ931Call::sendSetup(SignallingMessage* sigMsg)
|
||||||
bool ISDNQ931Call::sendSuspendRej(const char* reason, SignallingMessage* sigMsg)
|
bool ISDNQ931Call::sendSuspendRej(const char* reason, SignallingMessage* sigMsg)
|
||||||
{
|
{
|
||||||
if (!reason && sigMsg)
|
if (!reason && sigMsg)
|
||||||
reason = sigMsg->params().getValue("reason");
|
reason = sigMsg->params().getValue(YSTRING("reason"));
|
||||||
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::SuspendRej,this);
|
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::SuspendRej,this);
|
||||||
msg->appendIEValue(ISDNQ931IE::Cause,0,reason);
|
msg->appendIEValue(ISDNQ931IE::Cause,0,reason);
|
||||||
return q931()->sendMessage(msg,callTei());
|
return q931()->sendMessage(msg,callTei());
|
||||||
|
@ -1790,7 +1790,7 @@ SignallingEvent* ISDNQ931Call::getCircuitEvent(const Time& when)
|
||||||
SignallingEvent* event = 0;
|
SignallingEvent* event = 0;
|
||||||
switch (ev->type()) {
|
switch (ev->type()) {
|
||||||
case SignallingCircuitEvent::Dtmf: {
|
case SignallingCircuitEvent::Dtmf: {
|
||||||
const char* tone = ev->getValue("tone");
|
const char* tone = ev->getValue(YSTRING("tone"));
|
||||||
if (!(tone && *tone))
|
if (!(tone && *tone))
|
||||||
break;
|
break;
|
||||||
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::Info,this);
|
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::Info,this);
|
||||||
|
@ -2021,11 +2021,11 @@ void ISDNQ931CallMonitor::setTerminate(const char* reason)
|
||||||
// Get caller's and called's circuit or this object
|
// Get caller's and called's circuit or this object
|
||||||
void* ISDNQ931CallMonitor::getObject(const String& name) const
|
void* ISDNQ931CallMonitor::getObject(const String& name) const
|
||||||
{
|
{
|
||||||
if (name == "SignallingCircuitCaller")
|
if (name == YSTRING("SignallingCircuitCaller"))
|
||||||
return m_callerCircuit;
|
return m_callerCircuit;
|
||||||
if (name == "SignallingCircuitCalled")
|
if (name == YSTRING("SignallingCircuitCalled"))
|
||||||
return m_calledCircuit;
|
return m_calledCircuit;
|
||||||
if (name == "ISDNQ931CallMonitor")
|
if (name == YSTRING("ISDNQ931CallMonitor"))
|
||||||
return (void*)this;
|
return (void*)this;
|
||||||
return SignallingCall::getObject(name);
|
return SignallingCall::getObject(name);
|
||||||
}
|
}
|
||||||
|
@ -2200,7 +2200,7 @@ SignallingEvent* ISDNQ931CallMonitor::getCircuitEvent(const Time& when)
|
||||||
SignallingEvent* event = 0;
|
SignallingEvent* event = 0;
|
||||||
switch (ev->type()) {
|
switch (ev->type()) {
|
||||||
case SignallingCircuitEvent::Dtmf: {
|
case SignallingCircuitEvent::Dtmf: {
|
||||||
const char* tone = ev->getValue("tone");
|
const char* tone = ev->getValue(YSTRING("tone"));
|
||||||
if (!(tone && *tone))
|
if (!(tone && *tone))
|
||||||
break;
|
break;
|
||||||
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::Info,
|
ISDNQ931Message* msg = new ISDNQ931Message(ISDNQ931Message::Info,
|
||||||
|
@ -2295,14 +2295,14 @@ ISDNQ931ParserData::ISDNQ931ParserData(const NamedList& params, DebugEnabler* db
|
||||||
m_flags(0),
|
m_flags(0),
|
||||||
m_flagsOrig(0)
|
m_flagsOrig(0)
|
||||||
{
|
{
|
||||||
m_allowSegment = params.getBoolValue("allowsegmentation",false);
|
m_allowSegment = params.getBoolValue(YSTRING("allowsegmentation"),false);
|
||||||
m_maxSegments = params.getIntValue("maxsegments",8);
|
m_maxSegments = params.getIntValue(YSTRING("maxsegments"),8);
|
||||||
m_maxDisplay = params.getIntValue("max-display",34);
|
m_maxDisplay = params.getIntValue(YSTRING("max-display"),34);
|
||||||
if (m_maxDisplay != 34 && m_maxDisplay != 82)
|
if (m_maxDisplay != 34 && m_maxDisplay != 82)
|
||||||
m_maxDisplay = 34;
|
m_maxDisplay = 34;
|
||||||
m_extendedDebug = params.getBoolValue("extended-debug",false);
|
m_extendedDebug = params.getBoolValue(YSTRING("extended-debug"),false);
|
||||||
// Set flags
|
// Set flags
|
||||||
String flags = params.getValue("switchtype");
|
String flags = params.getValue(YSTRING("switchtype"));
|
||||||
SignallingUtils::encodeFlags(0,m_flagsOrig,flags,ISDNQ931::s_swType);
|
SignallingUtils::encodeFlags(0,m_flagsOrig,flags,ISDNQ931::s_swType);
|
||||||
SignallingUtils::encodeFlags(0,m_flagsOrig,flags,ISDNQ931::s_flags);
|
SignallingUtils::encodeFlags(0,m_flagsOrig,flags,ISDNQ931::s_flags);
|
||||||
m_flags = m_flagsOrig;
|
m_flags = m_flagsOrig;
|
||||||
|
@ -2379,9 +2379,9 @@ ISDNQ931::ISDNQ931(const NamedList& params, const char* name)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
m_parserData.m_dbg = this;
|
m_parserData.m_dbg = this;
|
||||||
m_networkHint = params.getBoolValue("network",m_networkHint);
|
m_networkHint = params.getBoolValue(YSTRING("network"),m_networkHint);
|
||||||
m_data.m_bri = !(m_primaryRate = params.getBoolValue("primary",m_primaryRate));
|
m_data.m_bri = !(m_primaryRate = params.getBoolValue(YSTRING("primary"),m_primaryRate));
|
||||||
m_callRefLen = params.getIntValue("callreflen",m_primaryRate ? 2 : 1);
|
m_callRefLen = params.getIntValue(YSTRING("callreflen"),m_primaryRate ? 2 : 1);
|
||||||
if (m_callRefLen < 1 || m_callRefLen > 4)
|
if (m_callRefLen < 1 || m_callRefLen > 4)
|
||||||
m_callRefLen = 2;
|
m_callRefLen = 2;
|
||||||
// Set mask. Bit 7 of the first byte of the message header it's used for initiator flag
|
// Set mask. Bit 7 of the first byte of the message header it's used for initiator flag
|
||||||
|
@ -2394,25 +2394,25 @@ ISDNQ931::ISDNQ931(const NamedList& params, const char* name)
|
||||||
m_callDiscTimer.interval(params,"t305",0,5000,false);
|
m_callDiscTimer.interval(params,"t305",0,5000,false);
|
||||||
m_callRelTimer.interval(params,"t308",0,5000,false);
|
m_callRelTimer.interval(params,"t308",0,5000,false);
|
||||||
m_callConTimer.interval(params,"t313",0,5000,false);
|
m_callConTimer.interval(params,"t313",0,5000,false);
|
||||||
m_cpeNumber = params.getValue("number");
|
m_cpeNumber = params.getValue(YSTRING("number"));
|
||||||
m_numPlan = params.getValue("numplan");
|
m_numPlan = params.getValue(YSTRING("numplan"));
|
||||||
if (0xffff == lookup(m_numPlan,Q931Parser::s_dict_numPlan,0xffff))
|
if (0xffff == lookup(m_numPlan,Q931Parser::s_dict_numPlan,0xffff))
|
||||||
m_numPlan = "unknown";
|
m_numPlan = "unknown";
|
||||||
m_numType = params.getValue("numtype");
|
m_numType = params.getValue(YSTRING("numtype"));
|
||||||
if (0xffff == lookup(m_numType,Q931Parser::s_dict_typeOfNumber,0xffff))
|
if (0xffff == lookup(m_numType,Q931Parser::s_dict_typeOfNumber,0xffff))
|
||||||
m_numType = "unknown";
|
m_numType = "unknown";
|
||||||
m_numPresentation = params.getValue("presentation");
|
m_numPresentation = params.getValue(YSTRING("presentation"));
|
||||||
if (0xffff == lookup(m_numPresentation,Q931Parser::s_dict_presentation,0xffff))
|
if (0xffff == lookup(m_numPresentation,Q931Parser::s_dict_presentation,0xffff))
|
||||||
m_numPresentation = "allowed";
|
m_numPresentation = "allowed";
|
||||||
m_numScreening = params.getValue("screening");
|
m_numScreening = params.getValue(YSTRING("screening"));
|
||||||
if (0xffff == lookup(m_numScreening,Q931Parser::s_dict_screening,0xffff))
|
if (0xffff == lookup(m_numScreening,Q931Parser::s_dict_screening,0xffff))
|
||||||
m_numScreening = "user-provided";
|
m_numScreening = "user-provided";
|
||||||
m_format = params.getValue("format");
|
m_format = params.getValue(YSTRING("format"));
|
||||||
if (0xffff == lookup(m_format,Q931Parser::s_dict_bearerProto1,0xffff))
|
if (0xffff == lookup(m_format,Q931Parser::s_dict_bearerProto1,0xffff))
|
||||||
m_format = "alaw";
|
m_format = "alaw";
|
||||||
// Debug
|
// Debug
|
||||||
setDebug(params.getBoolValue("print-messages",false),
|
setDebug(params.getBoolValue(YSTRING("print-messages"),false),
|
||||||
params.getBoolValue("extended-debug",false));
|
params.getBoolValue(YSTRING("extended-debug"),false));
|
||||||
if (debugAt(DebugInfo)) {
|
if (debugAt(DebugInfo)) {
|
||||||
String s(network() ? "NET" : "CPE");
|
String s(network() ? "NET" : "CPE");
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -2437,14 +2437,14 @@ ISDNQ931::ISDNQ931(const NamedList& params, const char* name)
|
||||||
s << " segmentation=" << String::boolText(m_parserData.m_allowSegment);
|
s << " segmentation=" << String::boolText(m_parserData.m_allowSegment);
|
||||||
s << " max-segments=" << (unsigned int)m_parserData.m_maxSegments;
|
s << " max-segments=" << (unsigned int)m_parserData.m_maxSegments;
|
||||||
#else
|
#else
|
||||||
s << " type=" << params.getValue("switchtype");
|
s << " type=" << params.getValue(YSTRING("switchtype"));
|
||||||
s << " pri=" << String::boolText(m_primaryRate);
|
s << " pri=" << String::boolText(m_primaryRate);
|
||||||
s << " format=" << m_format;
|
s << " format=" << m_format;
|
||||||
s << " channelsync=" << String::boolText(0 != m_syncGroupTimer.interval());
|
s << " channelsync=" << String::boolText(0 != m_syncGroupTimer.interval());
|
||||||
#endif
|
#endif
|
||||||
Debug(this,DebugInfo,"ISDN Call Controller %s [%p]",s.c_str(),this);
|
Debug(this,DebugInfo,"ISDN Call Controller %s [%p]",s.c_str(),this);
|
||||||
}
|
}
|
||||||
setDumper(params.getValue("layer3dump"));
|
setDumper(params.getValue(YSTRING("layer3dump")));
|
||||||
m_syncGroupTimer.start();
|
m_syncGroupTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2469,13 +2469,13 @@ bool ISDNQ931::initialize(const NamedList* config)
|
||||||
Debug(this,DebugInfo,"ISDNQ931::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"ISDNQ931::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
if (config) {
|
if (config) {
|
||||||
debugLevel(config->getIntValue("debuglevel_q931",
|
debugLevel(config->getIntValue(YSTRING("debuglevel_q931"),
|
||||||
config->getIntValue("debuglevel",-1)));
|
config->getIntValue(YSTRING("debuglevel"),-1)));
|
||||||
setDebug(config->getBoolValue("print-messages",false),
|
setDebug(config->getBoolValue(YSTRING("print-messages"),false),
|
||||||
config->getBoolValue("extended-debug",false));
|
config->getBoolValue(YSTRING("extended-debug"),false));
|
||||||
}
|
}
|
||||||
if (config && !layer2()) {
|
if (config && !layer2()) {
|
||||||
const String* name = config->getParam("sig");
|
const String* name = config->getParam(YSTRING("sig"));
|
||||||
if (!name)
|
if (!name)
|
||||||
name = config;
|
name = config;
|
||||||
if (!TelEngine::null(name)) {
|
if (!TelEngine::null(name)) {
|
||||||
|
@ -2728,7 +2728,7 @@ void ISDNQ931::receiveData(const DataBlock& data, u_int8_t tei, ISDNLayer2* laye
|
||||||
// We are a BRI CPE with a number - check the called party field
|
// We are a BRI CPE with a number - check the called party field
|
||||||
ISDNQ931IE* ie = msg->getIE(ISDNQ931IE::CalledNo);
|
ISDNQ931IE* ie = msg->getIE(ISDNQ931IE::CalledNo);
|
||||||
if (ie) {
|
if (ie) {
|
||||||
const String* number = ie->getParam("number");
|
const String* number = ie->getParam(YSTRING("number"));
|
||||||
if (number && !number->startsWith(m_cpeNumber)) {
|
if (number && !number->startsWith(m_cpeNumber)) {
|
||||||
DDebug(this,DebugInfo,"Setup was for '%s', not us.",number->c_str());
|
DDebug(this,DebugInfo,"Setup was for '%s', not us.",number->c_str());
|
||||||
break;
|
break;
|
||||||
|
@ -3043,12 +3043,12 @@ ISDNQ931Message* ISDNQ931::getMsg(const DataBlock& data)
|
||||||
ISDNQ931IE* ie = msg->getIE(ISDNQ931IE::Segmented);
|
ISDNQ931IE* ie = msg->getIE(ISDNQ931IE::Segmented);
|
||||||
if (!ie)
|
if (!ie)
|
||||||
break;
|
break;
|
||||||
NamedString* ns = ie->getParam("first");
|
NamedString* ns = ie->getParam(YSTRING("first"));
|
||||||
if (!ns)
|
if (!ns)
|
||||||
break;
|
break;
|
||||||
first = ns->toBoolean();
|
first = ns->toBoolean();
|
||||||
remaining = (u_int8_t)ie->getIntValue("remaining",0xff);
|
remaining = (u_int8_t)ie->getIntValue(YSTRING("remaining"),0xff);
|
||||||
type = (u_int8_t)ie->getIntValue("message",0xff);
|
type = (u_int8_t)ie->getIntValue(YSTRING("message"),0xff);
|
||||||
valid = true;
|
valid = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3196,7 +3196,7 @@ void ISDNQ931::processMsgRestart(ISDNQ931Message* msg, u_int8_t tei)
|
||||||
msg->name(),m_data.m_restart.c_str(),m_data.m_channels.c_str());
|
msg->name(),m_data.m_restart.c_str(),m_data.m_channels.c_str());
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (m_data.m_restart == "channels") {
|
if (m_data.m_restart == YSTRING("channels")) {
|
||||||
if (list->count() > 0)
|
if (list->count() > 0)
|
||||||
terminateCalls(list,"resource-unavailable");
|
terminateCalls(list,"resource-unavailable");
|
||||||
else {
|
else {
|
||||||
|
@ -3206,8 +3206,8 @@ void ISDNQ931::processMsgRestart(ISDNQ931Message* msg, u_int8_t tei)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool single = (m_data.m_restart == "interface");
|
bool single = (m_data.m_restart == YSTRING("interface"));
|
||||||
bool all = !single && (m_data.m_restart == "all-interfaces");
|
bool all = !single && (m_data.m_restart == YSTRING("all-interfaces"));
|
||||||
// If all interfaces is specified, ChannelID must not be present
|
// If all interfaces is specified, ChannelID must not be present
|
||||||
// If ChannelID is present and allowed, it must contain a single channel code
|
// If ChannelID is present and allowed, it must contain a single channel code
|
||||||
if (!(single || all) || (all && list->count() > 0) ||
|
if (!(single || all) || (all && list->count() > 0) ||
|
||||||
|
@ -3460,8 +3460,8 @@ ISDNQ931Monitor::ISDNQ931Monitor(const NamedList& params, const char* name)
|
||||||
m_parserData.m_maxMsgLen = 0xffffffff;
|
m_parserData.m_maxMsgLen = 0xffffffff;
|
||||||
m_parserData.m_dbg = this;
|
m_parserData.m_dbg = this;
|
||||||
// Debug
|
// Debug
|
||||||
setDebug(params.getBoolValue("print-messages",true),
|
setDebug(params.getBoolValue(YSTRING("print-messages"),true),
|
||||||
params.getBoolValue("extended-debug",false));
|
params.getBoolValue(YSTRING("extended-debug"),false));
|
||||||
}
|
}
|
||||||
|
|
||||||
ISDNQ931Monitor::~ISDNQ931Monitor()
|
ISDNQ931Monitor::~ISDNQ931Monitor()
|
||||||
|
@ -3485,10 +3485,10 @@ bool ISDNQ931Monitor::initialize(const NamedList* config)
|
||||||
Debug(this,DebugInfo,"ISDNQ931Monitor::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"ISDNQ931Monitor::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
if (config) {
|
if (config) {
|
||||||
debugLevel(config->getIntValue("debuglevel_q931",
|
debugLevel(config->getIntValue(YSTRING("debuglevel_q931"),
|
||||||
config->getIntValue("debuglevel",-1)));
|
config->getIntValue(YSTRING("debuglevel"),-1)));
|
||||||
setDebug(config->getBoolValue("print-messages",false),
|
setDebug(config->getBoolValue(YSTRING("print-messages"),false),
|
||||||
config->getBoolValue("extended-debug",false));
|
config->getBoolValue(YSTRING("extended-debug"),false));
|
||||||
for (int i = 0; i <= 1; i++) {
|
for (int i = 0; i <= 1; i++) {
|
||||||
bool net = (0 == i);
|
bool net = (0 == i);
|
||||||
if (net && m_q921Net)
|
if (net && m_q921Net)
|
||||||
|
@ -4044,7 +4044,7 @@ void ISDNQ931Message::toString(String& dest, bool extendedDebug, const char* ind
|
||||||
|
|
||||||
void* ISDNQ931Message::getObject(const String& name) const
|
void* ISDNQ931Message::getObject(const String& name) const
|
||||||
{
|
{
|
||||||
if (name == "ISDNQ931Message")
|
if (name == YSTRING("ISDNQ931Message"))
|
||||||
return (void*)this;
|
return (void*)this;
|
||||||
return SignallingMessage::getObject(name);
|
return SignallingMessage::getObject(name);
|
||||||
}
|
}
|
||||||
|
@ -4594,7 +4594,7 @@ ISDNQ931Message* Q931Parser::decode(const DataBlock& buffer, DataBlock* segData)
|
||||||
if (m_settings->flag(ISDNQ931::IgnoreNonLockedIE)) {
|
if (m_settings->flag(ISDNQ931::IgnoreNonLockedIE)) {
|
||||||
bool ignore = false;
|
bool ignore = false;
|
||||||
if (ie->type() == ISDNQ931IE::Shift)
|
if (ie->type() == ISDNQ931IE::Shift)
|
||||||
ignore = m_skip = !ie->getBoolValue("lock",false);
|
ignore = m_skip = !ie->getBoolValue(YSTRING("lock"),false);
|
||||||
else if (m_skip) {
|
else if (m_skip) {
|
||||||
ignore = true;
|
ignore = true;
|
||||||
m_skip = false;
|
m_skip = false;
|
||||||
|
@ -5074,8 +5074,8 @@ ISDNQ931IE* Q931Parser::getIE(const u_int8_t* data, u_int32_t len, u_int32_t& co
|
||||||
// Check Shift IE. Change current codeset
|
// Check Shift IE. Change current codeset
|
||||||
void Q931Parser::shiftCodeset(const ISDNQ931IE* ie)
|
void Q931Parser::shiftCodeset(const ISDNQ931IE* ie)
|
||||||
{
|
{
|
||||||
bool locking = ie->getBoolValue("lock",false);
|
bool locking = ie->getBoolValue(YSTRING("lock"),false);
|
||||||
int value = ie->getIntValue("codeset",0);
|
int value = ie->getIntValue(YSTRING("codeset"),0);
|
||||||
XDebug(m_settings->m_dbg,DebugAll,
|
XDebug(m_settings->m_dbg,DebugAll,
|
||||||
"Process %s shift with codeset %u [%p]",
|
"Process %s shift with codeset %u [%p]",
|
||||||
locking?"locking":"non locking",value,m_msg);
|
locking?"locking":"non locking",value,m_msg);
|
||||||
|
|
|
@ -337,20 +337,20 @@ SS7Router::SS7Router(const NamedList& params)
|
||||||
¶ms,this,tmp.c_str());
|
¶ms,this,tmp.c_str());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
const String* tr = params.getParam("transfer");
|
const String* tr = params.getParam(YSTRING("transfer"));
|
||||||
if (!TelEngine::null(tr)) {
|
if (!TelEngine::null(tr)) {
|
||||||
m_transferSilent = (*tr == "silent");
|
m_transferSilent = (*tr == YSTRING("silent"));
|
||||||
m_transfer = !m_transferSilent && tr->toBoolean();
|
m_transfer = !m_transferSilent && tr->toBoolean();
|
||||||
}
|
}
|
||||||
m_autoAllowed = params.getBoolValue("autoallow",m_autoAllowed);
|
m_autoAllowed = params.getBoolValue(YSTRING("autoallow"),m_autoAllowed);
|
||||||
m_sendUnavail = params.getBoolValue("sendupu",m_sendUnavail);
|
m_sendUnavail = params.getBoolValue(YSTRING("sendupu"),m_sendUnavail);
|
||||||
m_sendProhibited = params.getBoolValue("sendtfp",m_sendProhibited);
|
m_sendProhibited = params.getBoolValue(YSTRING("sendtfp"),m_sendProhibited);
|
||||||
m_restart.interval(params,"starttime",5000,(m_transfer ? 60000 : 10000),false);
|
m_restart.interval(params,"starttime",5000,(m_transfer ? 60000 : 10000),false);
|
||||||
m_isolate.interval(params,"isolation",500,1000,true);
|
m_isolate.interval(params,"isolation",500,1000,true);
|
||||||
m_routeTest.interval(params,"testroutes",10000,50000,true),
|
m_routeTest.interval(params,"testroutes",10000,50000,true),
|
||||||
m_trafficOk.interval(m_restart.interval() + 4000);
|
m_trafficOk.interval(m_restart.interval() + 4000);
|
||||||
m_trafficSent.interval(m_restart.interval() + 8000);
|
m_trafficSent.interval(m_restart.interval() + 8000);
|
||||||
m_testRestricted = params.getBoolValue("testrestricted",m_testRestricted);
|
m_testRestricted = params.getBoolValue(YSTRING("testrestricted"),m_testRestricted);
|
||||||
loadLocalPC(params);
|
loadLocalPC(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,18 +369,18 @@ bool SS7Router::initialize(const NamedList* config)
|
||||||
Debug(this,DebugInfo,"SS7Router::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"SS7Router::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
if (config) {
|
if (config) {
|
||||||
debugLevel(config->getIntValue("debuglevel_router",
|
debugLevel(config->getIntValue(YSTRING("debuglevel_router"),
|
||||||
config->getIntValue("debuglevel",-1)));
|
config->getIntValue(YSTRING("debuglevel"),-1)));
|
||||||
const String* tr = config->getParam("transfer");
|
const String* tr = config->getParam(YSTRING("transfer"));
|
||||||
if (!TelEngine::null(tr)) {
|
if (!TelEngine::null(tr)) {
|
||||||
m_transferSilent = (*tr == "silent");
|
m_transferSilent = (*tr == YSTRING("silent"));
|
||||||
m_transfer = !m_transferSilent && tr->toBoolean(m_transfer);
|
m_transfer = !m_transferSilent && tr->toBoolean(m_transfer);
|
||||||
}
|
}
|
||||||
setNI(SS7MSU::getNetIndicator(config->getValue("netindicator"),SS7MSU::National));
|
setNI(SS7MSU::getNetIndicator(config->getValue(YSTRING("netindicator")),SS7MSU::National));
|
||||||
m_autoAllowed = config->getBoolValue("autoallow",m_autoAllowed);
|
m_autoAllowed = config->getBoolValue(YSTRING("autoallow"),m_autoAllowed);
|
||||||
m_sendUnavail = config->getBoolValue("sendupu",m_sendUnavail);
|
m_sendUnavail = config->getBoolValue(YSTRING("sendupu"),m_sendUnavail);
|
||||||
m_sendProhibited = config->getBoolValue("sendtfp",m_sendProhibited);
|
m_sendProhibited = config->getBoolValue(YSTRING("sendtfp"),m_sendProhibited);
|
||||||
const String* param = config->getParam("management");
|
const String* param = config->getParam(YSTRING("management"));
|
||||||
const char* name = "ss7snm";
|
const char* name = "ss7snm";
|
||||||
if (param) {
|
if (param) {
|
||||||
if (*param && !param->toBoolean(false))
|
if (*param && !param->toBoolean(false))
|
||||||
|
@ -402,7 +402,7 @@ bool SS7Router::initialize(const NamedList* config)
|
||||||
attach(m_mngmt = YSIGCREATE(SS7Management,¶ms));
|
attach(m_mngmt = YSIGCREATE(SS7Management,¶ms));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return m_started || (config && !config->getBoolValue("autostart")) || restart();
|
return m_started || (config && !config->getBoolValue(YSTRING("autostart"))) || restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SS7Router::loadLocalPC(const NamedList& params)
|
void SS7Router::loadLocalPC(const NamedList& params)
|
||||||
|
@ -1765,9 +1765,9 @@ void SS7Router::notify(SS7Layer3* network, int sls)
|
||||||
|
|
||||||
bool SS7Router::control(NamedList& params)
|
bool SS7Router::control(NamedList& params)
|
||||||
{
|
{
|
||||||
String* ret = params.getParam("completion");
|
String* ret = params.getParam(YSTRING("completion"));
|
||||||
const String* oper = params.getParam("operation");
|
const String* oper = params.getParam(YSTRING("operation"));
|
||||||
const char* cmp = params.getValue("component");
|
const char* cmp = params.getValue(YSTRING("component"));
|
||||||
int cmd = -1;
|
int cmd = -1;
|
||||||
if (!TelEngine::null(oper))
|
if (!TelEngine::null(oper))
|
||||||
cmd = oper->toInteger(s_dict_control,cmd);
|
cmd = oper->toInteger(s_dict_control,cmd);
|
||||||
|
@ -1775,7 +1775,7 @@ bool SS7Router::control(NamedList& params)
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (oper && (cmd < 0))
|
if (oper && (cmd < 0))
|
||||||
return false;
|
return false;
|
||||||
String part = params.getValue("partword");
|
String part = params.getValue(YSTRING("partword"));
|
||||||
if (cmp) {
|
if (cmp) {
|
||||||
if (toString() != cmp)
|
if (toString() != cmp)
|
||||||
return false;
|
return false;
|
||||||
|
@ -1789,9 +1789,9 @@ bool SS7Router::control(NamedList& params)
|
||||||
if (!(cmp && toString() == cmp))
|
if (!(cmp && toString() == cmp))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_autoAllowed = params.getBoolValue("autoallow",m_autoAllowed);
|
m_autoAllowed = params.getBoolValue(YSTRING("autoallow"),m_autoAllowed);
|
||||||
m_sendUnavail = params.getBoolValue("sendupu",m_sendUnavail);
|
m_sendUnavail = params.getBoolValue(YSTRING("sendupu"),m_sendUnavail);
|
||||||
m_sendProhibited = params.getBoolValue("sendtfp",m_sendProhibited);
|
m_sendProhibited = params.getBoolValue(YSTRING("sendtfp"),m_sendProhibited);
|
||||||
String err;
|
String err;
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case SS7Router::Pause:
|
case SS7Router::Pause:
|
||||||
|
@ -1826,12 +1826,12 @@ bool SS7Router::control(NamedList& params)
|
||||||
case SS7MsgSNM::TFR:
|
case SS7MsgSNM::TFR:
|
||||||
case SS7MsgSNM::TFA:
|
case SS7MsgSNM::TFA:
|
||||||
{
|
{
|
||||||
SS7PointCode::Type type = SS7PointCode::lookup(params.getValue("pointcodetype"));
|
SS7PointCode::Type type = SS7PointCode::lookup(params.getValue(YSTRING("pointcodetype")));
|
||||||
if (SS7PointCode::length(type) == 0) {
|
if (SS7PointCode::length(type) == 0) {
|
||||||
err << "missing 'pointcodetype'";
|
err << "missing 'pointcodetype'";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const String* dest = params.getParam("destination");
|
const String* dest = params.getParam(YSTRING("destination"));
|
||||||
if (TelEngine::null(dest)) {
|
if (TelEngine::null(dest)) {
|
||||||
err << "missing 'destination'";
|
err << "missing 'destination'";
|
||||||
break;
|
break;
|
||||||
|
@ -1842,9 +1842,9 @@ bool SS7Router::control(NamedList& params)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (SS7MsgSNM::RST == cmd || SS7MsgSNM::RSR == cmd) {
|
if (SS7MsgSNM::RST == cmd || SS7MsgSNM::RSR == cmd) {
|
||||||
const String* addr = params.getParam("back-address");
|
const String* addr = params.getParam(YSTRING("back-address"));
|
||||||
if (TelEngine::null(addr))
|
if (TelEngine::null(addr))
|
||||||
addr = params.getParam("address");
|
addr = params.getParam(YSTRING("address"));
|
||||||
if (TelEngine::null(addr)) {
|
if (TelEngine::null(addr)) {
|
||||||
err = "missing 'address'";
|
err = "missing 'address'";
|
||||||
break;
|
break;
|
||||||
|
@ -1876,9 +1876,9 @@ bool SS7Router::control(NamedList& params)
|
||||||
m_mngmt->controlExecute(ctl);
|
m_mngmt->controlExecute(ctl);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String src = params.getParam("source");
|
String src = params.getParam(YSTRING("source"));
|
||||||
if (src.null()) {
|
if (src.null()) {
|
||||||
const String* addr = params.getParam("address");
|
const String* addr = params.getParam(YSTRING("address"));
|
||||||
if (addr) {
|
if (addr) {
|
||||||
ObjList* l = addr->split(',');
|
ObjList* l = addr->split(',');
|
||||||
if (l && l->at(1))
|
if (l && l->at(1))
|
||||||
|
@ -1889,18 +1889,18 @@ bool SS7Router::control(NamedList& params)
|
||||||
if (src) {
|
if (src) {
|
||||||
SS7PointCode opc;
|
SS7PointCode opc;
|
||||||
if (!opc.assign(src,type)) {
|
if (!opc.assign(src,type)) {
|
||||||
if (!params.getBoolValue("automatic"))
|
if (!params.getBoolValue(YSTRING("automatic")))
|
||||||
err << "invalid source: " << src ;
|
err << "invalid source: " << src ;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!setRouteSpecificState(type,pc,opc,routeState(static_cast<SS7MsgSNM::Type>(cmd)))) {
|
if (!setRouteSpecificState(type,pc,opc,routeState(static_cast<SS7MsgSNM::Type>(cmd)))) {
|
||||||
if (!params.getBoolValue("automatic"))
|
if (!params.getBoolValue(YSTRING("automatic")))
|
||||||
err << "no such route: " << *dest << " from: " << src;
|
err << "no such route: " << *dest << " from: " << src;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!setRouteState(type,pc,routeState(static_cast<SS7MsgSNM::Type>(cmd)))) {
|
else if (!setRouteState(type,pc,routeState(static_cast<SS7MsgSNM::Type>(cmd)))) {
|
||||||
if (!params.getBoolValue("automatic"))
|
if (!params.getBoolValue(YSTRING("automatic")))
|
||||||
err << "no such route: " << *dest;
|
err << "no such route: " << *dest;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,13 +75,13 @@ SignallingCallControl::SignallingCallControl(const NamedList& params,
|
||||||
m_exiting(false)
|
m_exiting(false)
|
||||||
{
|
{
|
||||||
// Controller location
|
// Controller location
|
||||||
m_location = params.getValue("location");
|
m_location = params.getValue(YSTRING("location"));
|
||||||
// Strategy
|
// Strategy
|
||||||
const char* strategy = params.getValue("strategy","increment");
|
const char* strategy = params.getValue(YSTRING("strategy"),"increment");
|
||||||
m_strategy = SignallingCircuitGroup::str2strategy(strategy);
|
m_strategy = SignallingCircuitGroup::str2strategy(strategy);
|
||||||
String restrict;
|
String restrict;
|
||||||
if (m_strategy != SignallingCircuitGroup::Random)
|
if (m_strategy != SignallingCircuitGroup::Random)
|
||||||
restrict = params.getValue("strategy-restrict");
|
restrict = params.getValue(YSTRING("strategy-restrict"));
|
||||||
if (!restrict.null()) {
|
if (!restrict.null()) {
|
||||||
if (restrict == "odd")
|
if (restrict == "odd")
|
||||||
m_strategy |= SignallingCircuitGroup::OnlyOdd;
|
m_strategy |= SignallingCircuitGroup::OnlyOdd;
|
||||||
|
@ -94,14 +94,14 @@ SignallingCallControl::SignallingCallControl(const NamedList& params,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Message prefix
|
// Message prefix
|
||||||
m_msgPrefix = params.getValue("message-prefix",msgPrefix);
|
m_msgPrefix = params.getValue(YSTRING("message-prefix"),msgPrefix);
|
||||||
|
|
||||||
// Verify event timer
|
// Verify event timer
|
||||||
m_verifyTimer.interval(params,"verifyeventinterval",10,120,true,true);
|
m_verifyTimer.interval(params,"verifyeventinterval",10,120,true,true);
|
||||||
m_verifyTimer.start();
|
m_verifyTimer.start();
|
||||||
|
|
||||||
// Media Required
|
// Media Required
|
||||||
m_mediaRequired = (MediaRequired)params.getIntValue("needmedia",
|
m_mediaRequired = (MediaRequired)params.getIntValue(YSTRING("needmedia"),
|
||||||
s_mediaRequired,m_mediaRequired);
|
s_mediaRequired,m_mediaRequired);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -789,7 +789,7 @@ SignallingCircuitSpan* SignallingCircuitGroup::buildSpan(const String& name, uns
|
||||||
: NamedList(name), m_group(group)
|
: NamedList(name), m_group(group)
|
||||||
{ }
|
{ }
|
||||||
virtual void* getObject(const String& name) const
|
virtual void* getObject(const String& name) const
|
||||||
{ return (name == "SignallingCircuitGroup") ? m_group : NamedList::getObject(name); }
|
{ return (name == YSTRING("SignallingCircuitGroup")) ? m_group : NamedList::getObject(name); }
|
||||||
SignallingCircuitGroup* m_group;
|
SignallingCircuitGroup* m_group;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1174,15 +1174,15 @@ AnalogLine::AnalogLine(AnalogLineGroup* grp, unsigned int cic, const NamedList&
|
||||||
if (m_type == Recorder)
|
if (m_type == Recorder)
|
||||||
m_type = FXO;
|
m_type = FXO;
|
||||||
m_address << m_group->toString() << "/" << m_circuit->code();
|
m_address << m_group->toString() << "/" << m_circuit->code();
|
||||||
m_inband = params.getBoolValue("dtmfinband",false);
|
m_inband = params.getBoolValue(YSTRING("dtmfinband"),false);
|
||||||
String tmp = params.getValue("echocancel");
|
String tmp = params.getValue(YSTRING("echocancel"));
|
||||||
if (tmp.isBoolean())
|
if (tmp.isBoolean())
|
||||||
m_echocancel = tmp.toBoolean() ? 1 : -1;
|
m_echocancel = tmp.toBoolean() ? 1 : -1;
|
||||||
m_answerOnPolarity = params.getBoolValue("answer-on-polarity",false);
|
m_answerOnPolarity = params.getBoolValue(YSTRING("answer-on-polarity"),false);
|
||||||
m_hangupOnPolarity = params.getBoolValue("hangup-on-polarity",false);
|
m_hangupOnPolarity = params.getBoolValue(YSTRING("hangup-on-polarity"),false);
|
||||||
m_polarityControl = params.getBoolValue("polaritycontrol",false);
|
m_polarityControl = params.getBoolValue(YSTRING("polaritycontrol"),false);
|
||||||
|
|
||||||
m_callSetup = (CallSetupInfo)lookup(params.getValue("callsetup"),csNames(),After);
|
m_callSetup = (CallSetupInfo)lookup(params.getValue(YSTRING("callsetup")),csNames(),After);
|
||||||
|
|
||||||
m_callSetupTimeout = getValidInt(params,"callsetup-timeout",2000);
|
m_callSetupTimeout = getValidInt(params,"callsetup-timeout",2000);
|
||||||
m_noRingTimeout = getValidInt(params,"ring-timeout",10000);
|
m_noRingTimeout = getValidInt(params,"ring-timeout",10000);
|
||||||
|
@ -1192,9 +1192,9 @@ AnalogLine::AnalogLine(AnalogLineGroup* grp, unsigned int cic, const NamedList&
|
||||||
DDebug(m_group,DebugAll,"AnalogLine() addr=%s type=%s [%p]",
|
DDebug(m_group,DebugAll,"AnalogLine() addr=%s type=%s [%p]",
|
||||||
address(),lookup(m_type,typeNames()),this);
|
address(),lookup(m_type,typeNames()),this);
|
||||||
|
|
||||||
if (!params.getBoolValue("out-of-service",false)) {
|
if (!params.getBoolValue(YSTRING("out-of-service"),false)) {
|
||||||
resetCircuit();
|
resetCircuit();
|
||||||
if (params.getBoolValue("connect",true))
|
if (params.getBoolValue(YSTRING("connect"),true))
|
||||||
connect(false);
|
connect(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -282,9 +282,9 @@ bool SIGAdaptation::initialize(const NamedList* config)
|
||||||
{
|
{
|
||||||
if (transport())
|
if (transport())
|
||||||
return true;
|
return true;
|
||||||
NamedString* name = config->getParam("sig");
|
NamedString* name = config->getParam(YSTRING("sig"));
|
||||||
if (!name)
|
if (!name)
|
||||||
name = config->getParam("basename");
|
name = config->getParam(YSTRING("basename"));
|
||||||
if (name) {
|
if (name) {
|
||||||
DDebug(this,DebugInfo,"Creating transport for SIGTRAN UA [%p]",this);
|
DDebug(this,DebugInfo,"Creating transport for SIGTRAN UA [%p]",this);
|
||||||
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
||||||
|
@ -513,8 +513,8 @@ SIGAdaptClient::SIGAdaptClient(const char* name, const NamedList* params,
|
||||||
Debug(this,DebugInfo,"SIGAdaptClient(%u,%u) created [%p]%s",
|
Debug(this,DebugInfo,"SIGAdaptClient(%u,%u) created [%p]%s",
|
||||||
payload,port,this,tmp.c_str());
|
payload,port,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
m_aspId = params->getIntValue("aspid",m_aspId);
|
m_aspId = params->getIntValue(YSTRING("aspid"),m_aspId);
|
||||||
m_traffic = (TrafficMode)params->getIntValue("traffic",s_trafficModes,m_traffic);
|
m_traffic = (TrafficMode)params->getIntValue(YSTRING("traffic"),s_trafficModes,m_traffic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -861,7 +861,7 @@ SS7M2PA::SS7M2PA(const NamedList& params)
|
||||||
// Confirmation timer 1/2 t4
|
// Confirmation timer 1/2 t4
|
||||||
m_confTimer.interval(params,"conf_timer",50,400,false);
|
m_confTimer.interval(params,"conf_timer",50,400,false);
|
||||||
// Maximum unacknowledged messages, max_unack+1 will force an ACK
|
// Maximum unacknowledged messages, max_unack+1 will force an ACK
|
||||||
m_maxUnack = params.getIntValue("max_unack",4);
|
m_maxUnack = params.getIntValue(YSTRING("max_unack"),4);
|
||||||
if (m_maxUnack > 10)
|
if (m_maxUnack > 10)
|
||||||
m_maxUnack = 10;
|
m_maxUnack = 10;
|
||||||
DDebug(this,DebugAll,"Creating SS7M2PA [%p]",this);
|
DDebug(this,DebugAll,"Creating SS7M2PA [%p]",this);
|
||||||
|
@ -882,13 +882,13 @@ bool SS7M2PA::initialize(const NamedList* config)
|
||||||
config->dump(tmp,"\r\n ",'\'',true);
|
config->dump(tmp,"\r\n ",'\'',true);
|
||||||
Debug(this,DebugInfo,"SS7M2PA::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"SS7M2PA::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
m_dumpMsg = config && config->getBoolValue("dumpMsg",false);
|
m_dumpMsg = config && config->getBoolValue(YSTRING("dumpMsg"),false);
|
||||||
m_autostart = !config || config->getBoolValue("autostart",true);
|
m_autostart = !config || config->getBoolValue(YSTRING("autostart"),true);
|
||||||
m_autoEmergency = !config || config->getBoolValue("autoemergency",true);
|
m_autoEmergency = !config || config->getBoolValue(YSTRING("autoemergency"),true);
|
||||||
if (config && !transport()) {
|
if (config && !transport()) {
|
||||||
NamedString* name = config->getParam("sig");
|
NamedString* name = config->getParam(YSTRING("sig"));
|
||||||
if (!name)
|
if (!name)
|
||||||
name = config->getParam("basename");
|
name = config->getParam(YSTRING("basename"));
|
||||||
if (name) {
|
if (name) {
|
||||||
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
NamedPointer* ptr = YOBJECT(NamedPointer,name);
|
||||||
NamedList* trConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
NamedList* trConfig = ptr ? YOBJECT(NamedList,ptr->userData()) : 0;
|
||||||
|
@ -1178,9 +1178,9 @@ unsigned int SS7M2PA::status() const
|
||||||
bool SS7M2PA::control(Operation oper, NamedList* params)
|
bool SS7M2PA::control(Operation oper, NamedList* params)
|
||||||
{
|
{
|
||||||
if (params) {
|
if (params) {
|
||||||
m_autostart = params->getBoolValue("autostart",m_autostart);
|
m_autostart = params->getBoolValue(YSTRING("autostart"),m_autostart);
|
||||||
m_autoEmergency = params->getBoolValue("autoemergency",m_autoEmergency);
|
m_autoEmergency = params->getBoolValue(YSTRING("autoemergency"),m_autoEmergency);
|
||||||
m_maxUnack = params->getIntValue("max_unack",m_maxUnack);
|
m_maxUnack = params->getIntValue(YSTRING("max_unack"),m_maxUnack);
|
||||||
if (m_maxUnack > 10)
|
if (m_maxUnack > 10)
|
||||||
m_maxUnack = 10;
|
m_maxUnack = 10;
|
||||||
}
|
}
|
||||||
|
@ -1498,12 +1498,13 @@ bool SS7M2UAClient::processMSG(unsigned char msgVersion, unsigned char msgClass,
|
||||||
SS7M2UA::SS7M2UA(const NamedList& params)
|
SS7M2UA::SS7M2UA(const NamedList& params)
|
||||||
: SignallingComponent(params.safe("SS7M2UA"),¶ms),
|
: SignallingComponent(params.safe("SS7M2UA"),¶ms),
|
||||||
m_retrieve(50),
|
m_retrieve(50),
|
||||||
m_iid(params.getIntValue("iid",-1)), m_linkState(LinkDown), m_rpo(false),
|
m_iid(params.getIntValue(YSTRING("iid"),-1)),
|
||||||
|
m_linkState(LinkDown), m_rpo(false),
|
||||||
m_longSeq(false)
|
m_longSeq(false)
|
||||||
{
|
{
|
||||||
DDebug(DebugInfo,"Creating SS7M2UA [%p]",this);
|
DDebug(DebugInfo,"Creating SS7M2UA [%p]",this);
|
||||||
m_retrieve.interval(params,"retrieve",5,200,true);
|
m_retrieve.interval(params,"retrieve",5,200,true);
|
||||||
m_longSeq = params.getBoolValue("longsequence");
|
m_longSeq = params.getBoolValue(YSTRING("longsequence"));
|
||||||
m_lastSeqRx = -2;
|
m_lastSeqRx = -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1515,13 +1516,13 @@ bool SS7M2UA::initialize(const NamedList* config)
|
||||||
config->dump(tmp,"\r\n ",'\'',true);
|
config->dump(tmp,"\r\n ",'\'',true);
|
||||||
Debug(this,DebugInfo,"SS7M2UA::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"SS7M2UA::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
m_autostart = !config || config->getBoolValue("autostart",true);
|
m_autostart = !config || config->getBoolValue(YSTRING("autostart"),true);
|
||||||
m_autoEmergency = !config || config->getBoolValue("autoemergency",true);
|
m_autoEmergency = !config || config->getBoolValue(YSTRING("autoemergency"),true);
|
||||||
if (config && !adaptation()) {
|
if (config && !adaptation()) {
|
||||||
m_iid = config->getIntValue("iid",m_iid);
|
m_iid = config->getIntValue(YSTRING("iid"),m_iid);
|
||||||
NamedString* name = config->getParam("client");
|
NamedString* name = config->getParam(YSTRING("client"));
|
||||||
if (!name)
|
if (!name)
|
||||||
name = config->getParam("basename");
|
name = config->getParam(YSTRING("basename"));
|
||||||
if (name) {
|
if (name) {
|
||||||
DDebug(this,DebugInfo,"Creating adaptation '%s' for SS7 M2UA [%p]",
|
DDebug(this,DebugInfo,"Creating adaptation '%s' for SS7 M2UA [%p]",
|
||||||
name->c_str(),this);
|
name->c_str(),this);
|
||||||
|
@ -1550,9 +1551,9 @@ bool SS7M2UA::initialize(const NamedList* config)
|
||||||
bool SS7M2UA::control(Operation oper, NamedList* params)
|
bool SS7M2UA::control(Operation oper, NamedList* params)
|
||||||
{
|
{
|
||||||
if (params) {
|
if (params) {
|
||||||
m_autostart = params->getBoolValue("autostart",m_autostart);
|
m_autostart = params->getBoolValue(YSTRING("autostart"),m_autostart);
|
||||||
m_autoEmergency = params->getBoolValue("autoemergency",m_autoEmergency);
|
m_autoEmergency = params->getBoolValue(YSTRING("autoemergency"),m_autoEmergency);
|
||||||
m_longSeq = params->getBoolValue("longsequence",m_longSeq);
|
m_longSeq = params->getBoolValue(YSTRING("longsequence"),m_longSeq);
|
||||||
}
|
}
|
||||||
switch (oper) {
|
switch (oper) {
|
||||||
case Pause:
|
case Pause:
|
||||||
|
@ -1922,7 +1923,7 @@ bool ISDNIUAClient::processMSG(unsigned char msgVersion, unsigned char msgClass,
|
||||||
ISDNIUA::ISDNIUA(const NamedList& params, const char *name, u_int8_t tei)
|
ISDNIUA::ISDNIUA(const NamedList& params, const char *name, u_int8_t tei)
|
||||||
: SignallingComponent(params.safe(name ? name : "ISDNIUA"),¶ms),
|
: SignallingComponent(params.safe(name ? name : "ISDNIUA"),¶ms),
|
||||||
ISDNLayer2(params,name,tei),
|
ISDNLayer2(params,name,tei),
|
||||||
m_iid(params.getIntValue("iid",-1))
|
m_iid(params.getIntValue(YSTRING("iid"),-1))
|
||||||
{
|
{
|
||||||
DDebug(DebugInfo,"Creating ISDNIUA [%p]",this);
|
DDebug(DebugInfo,"Creating ISDNIUA [%p]",this);
|
||||||
}
|
}
|
||||||
|
@ -2122,12 +2123,12 @@ bool ISDNIUA::initialize(const NamedList* config)
|
||||||
config->dump(tmp,"\r\n ",'\'',true);
|
config->dump(tmp,"\r\n ",'\'',true);
|
||||||
Debug(this,DebugInfo,"ISDNIUA::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
Debug(this,DebugInfo,"ISDNIUA::initialize(%p) [%p]%s",config,this,tmp.c_str());
|
||||||
#endif
|
#endif
|
||||||
m_autostart = !config || config->getBoolValue("autostart",true);
|
m_autostart = !config || config->getBoolValue(YSTRING("autostart"),true);
|
||||||
if (config && !adaptation()) {
|
if (config && !adaptation()) {
|
||||||
m_iid = config->getIntValue("iid",m_iid);
|
m_iid = config->getIntValue(YSTRING("iid"),m_iid);
|
||||||
NamedString* name = config->getParam("client");
|
NamedString* name = config->getParam(YSTRING("client"));
|
||||||
if (!name)
|
if (!name)
|
||||||
name = config->getParam("basename");
|
name = config->getParam(YSTRING("basename"));
|
||||||
if (name) {
|
if (name) {
|
||||||
DDebug(this,DebugInfo,"Creating adaptation '%s' for ISDN UA [%p]",
|
DDebug(this,DebugInfo,"Creating adaptation '%s' for ISDN UA [%p]",
|
||||||
name->c_str(),this);
|
name->c_str(),this);
|
||||||
|
|
|
@ -129,7 +129,7 @@ bool SS7Testing::initialize(const NamedList* config)
|
||||||
Lock mylock(this);
|
Lock mylock(this);
|
||||||
setParams(*config);
|
setParams(*config);
|
||||||
bool ok = SS7Layer4::initialize(config);
|
bool ok = SS7Layer4::initialize(config);
|
||||||
if (ok && config->getBoolValue("autostart",false)) {
|
if (ok && config->getBoolValue(YSTRING("autostart"),false)) {
|
||||||
if (m_timer.interval() && m_lbl.length())
|
if (m_timer.interval() && m_lbl.length())
|
||||||
m_timer.start();
|
m_timer.start();
|
||||||
sendTraffic();
|
sendTraffic();
|
||||||
|
@ -139,15 +139,15 @@ bool SS7Testing::initialize(const NamedList* config)
|
||||||
|
|
||||||
bool SS7Testing::control(NamedList& params)
|
bool SS7Testing::control(NamedList& params)
|
||||||
{
|
{
|
||||||
String* ret = params.getParam("completion");
|
String* ret = params.getParam(YSTRING("completion"));
|
||||||
const String* oper = params.getParam("operation");
|
const String* oper = params.getParam(YSTRING("operation"));
|
||||||
const char* cmp = params.getValue("component");
|
const char* cmp = params.getValue(YSTRING("component"));
|
||||||
int cmd = oper ? oper->toInteger(s_dict_control,-1) : -1;
|
int cmd = oper ? oper->toInteger(s_dict_control,-1) : -1;
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (oper && (cmd < 0))
|
if (oper && (cmd < 0))
|
||||||
return false;
|
return false;
|
||||||
String part = params.getValue("partword");
|
String part = params.getValue(YSTRING("partword"));
|
||||||
if (cmp) {
|
if (cmp) {
|
||||||
if (toString() != cmp)
|
if (toString() != cmp)
|
||||||
return false;
|
return false;
|
||||||
|
@ -188,15 +188,15 @@ bool SS7Testing::control(NamedList& params)
|
||||||
|
|
||||||
void SS7Testing::setParams(const NamedList& params, bool setSeq)
|
void SS7Testing::setParams(const NamedList& params, bool setSeq)
|
||||||
{
|
{
|
||||||
if (!m_timer.interval() || params.getParam("interval"))
|
if (!m_timer.interval() || params.getParam(YSTRING("interval")))
|
||||||
m_timer.interval(params,"interval",20,1000,true);
|
m_timer.interval(params,"interval",20,1000,true);
|
||||||
m_len = params.getIntValue("length",m_len);
|
m_len = params.getIntValue(YSTRING("length"),m_len);
|
||||||
m_sharing = params.getBoolValue("sharing",m_sharing);
|
m_sharing = params.getBoolValue(YSTRING("sharing"),m_sharing);
|
||||||
if (m_len > 1024)
|
if (m_len > 1024)
|
||||||
m_len = 1024;
|
m_len = 1024;
|
||||||
if (setSeq || !m_seq)
|
if (setSeq || !m_seq)
|
||||||
m_seq = params.getIntValue("sequence",m_seq);
|
m_seq = params.getIntValue(YSTRING("sequence"),m_seq);
|
||||||
const String* lbl = params.getParam("address");
|
const String* lbl = params.getParam(YSTRING("address"));
|
||||||
if (!TelEngine::null(lbl)) {
|
if (!TelEngine::null(lbl)) {
|
||||||
// TYPE,opc,dpc,sls,spare
|
// TYPE,opc,dpc,sls,spare
|
||||||
SS7PointCode::Type t = SS7PointCode::Other;
|
SS7PointCode::Type t = SS7PointCode::Other;
|
||||||
|
|
Loading…
Reference in New Issue