Added ISUP setting (default on ANSI) to set CGB messages duplicated.

git-svn-id: http://voip.null.ro/svn/yate@4187 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-03-16 21:10:03 +00:00
parent 25264aa54d
commit f265f745f3
3 changed files with 20 additions and 0 deletions

View File

@ -430,6 +430,10 @@
; Defaults to no
;ignore-cgu-single=no
; duplicate-cgb: boolean: Duplicate all sent circuit group blocking requests
; Defaults to yes if pointcodetype is ANSI or ANSI8, no for other types
;duplicate-cgb=
; print-messages: boolean: Print decoded protocol data units to output
; This option is applied on reload
; Defaults to no

View File

@ -3100,6 +3100,7 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
m_ignoreGRSSingle(false),
m_ignoreCGBSingle(false),
m_ignoreCGUSingle(false),
m_duplicateCGB(false),
m_ignoreUnkDigits(true),
m_l3LinkUp(false),
m_t1Interval(15000), // Q.764 T1 15..60 seconds
@ -3202,6 +3203,8 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio)
m_ignoreGRSSingle = params.getBoolValue("ignore-grs-single");
m_ignoreCGBSingle = params.getBoolValue("ignore-cgb-single");
m_ignoreCGUSingle = params.getBoolValue("ignore-cgu-single");
m_duplicateCGB = params.getBoolValue("duplicate-cgb",
(SS7PointCode::ANSI == m_type || SS7PointCode::ANSI8 == m_type));
m_ignoreUnkDigits = params.getBoolValue("ignore-unknown-digits",true);
m_defaultSls = params.getIntValue("sls",s_dict_callSls,m_defaultSls);
m_maxCalledDigits = params.getIntValue("maxcalleddigits",m_maxCalledDigits);
@ -3269,6 +3272,8 @@ bool SS7ISUP::initialize(const NamedList* config)
m_ignoreGRSSingle = config->getBoolValue("ignore-grs-single");
m_ignoreCGBSingle = config->getBoolValue("ignore-cgb-single");
m_ignoreCGUSingle = config->getBoolValue("ignore-cgu-single");
m_duplicateCGB = config->getBoolValue("duplicate-cgb",
(SS7PointCode::ANSI == m_type || SS7PointCode::ANSI8 == m_type));
m_ignoreUnkDigits = config->getBoolValue("ignore-unknown-digits",true);
m_defaultSls = config->getIntValue("sls",s_dict_callSls,m_defaultSls);
m_mediaRequired = (MediaRequired)config->getIntValue("needmedia",
@ -5257,6 +5262,11 @@ bool SS7ISUP::transmitMessages(ObjList& list)
SS7MsgISUP* msg = static_cast<SS7MsgISUP*>(o->get());
SS7Label label;
setLabel(label,msg->cic());
if (m_duplicateCGB && (msg->type() == SS7MsgISUP::CGB)) {
// ANSI needs the CGB duplicated
msg->ref();
transmitMessage(msg,label,false);
}
transmitMessage(msg,label,false);
}
return true;
@ -5399,6 +5409,11 @@ bool SS7ISUP::handleCicBlockCommand(const NamedList& p, bool block)
SS7Label label;
setLabel(label,msg->cic());
mylock.drop();
if (m_duplicateCGB && (msg->type() == SS7MsgISUP::CGB)) {
// ANSI needs the CGB duplicated
msg->ref();
transmitMessage(msg,label,false);
}
transmitMessage(msg,label,false);
return true;
}

View File

@ -8413,6 +8413,7 @@ private:
bool m_ignoreGRSSingle; // Ignore (drop) GRS with range 0 (1 circuit affected)
bool m_ignoreCGBSingle; // Ignore (drop) CGB with range 0 (1 circuit in map)
bool m_ignoreCGUSingle; // Ignore (drop) CGU with range 0 (1 circuit in map)
bool m_duplicateCGB; // Send duplicate CGB messages (ANSI)
bool m_ignoreUnkDigits; // Check if the message parser should ignore unknown digits encoding
bool m_l3LinkUp; // Flag indicating the availability of a Layer3 data link
u_int64_t m_t1Interval; // Q.764 T1 timer interval