diff --git a/conf.d/ysigchan.conf.sample b/conf.d/ysigchan.conf.sample index d29a4803..b9fbe5d8 100644 --- a/conf.d/ysigchan.conf.sample +++ b/conf.d/ysigchan.conf.sample @@ -402,6 +402,10 @@ ; Defaults to yes ;confirm_ccr=yes +; drop_unknown: boolean: Drop call or attempt to change circuit if an unknown +; or unsupported message is received in an early state +;drop_unknown=yes + ; ignore-grs-single: boolean: Ignore (drop) circuit group reset messages with ; range 0 (1 circuit affected) ; Defaults to no diff --git a/libs/ysig/isup.cpp b/libs/ysig/isup.cpp index 4ea90b5a..fd137c9d 100644 --- a/libs/ysig/isup.cpp +++ b/libs/ysig/isup.cpp @@ -3055,6 +3055,7 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio) m_defaultSls(SlsLatest), m_maxCalledDigits(16), m_confirmCCR(true), + m_dropOnUnknown(true), m_ignoreGRSSingle(false), m_ignoreCGBSingle(false), m_ignoreCGUSingle(false), @@ -3156,6 +3157,7 @@ SS7ISUP::SS7ISUP(const NamedList& params, unsigned char sio) m_continuity = params.getValue("continuity"); m_confirmCCR = params.getBoolValue("confirm_ccr",true); + m_dropOnUnknown = params.getBoolValue("drop_unknown",true); m_ignoreGRSSingle = params.getBoolValue("ignore-grs-single"); m_ignoreCGBSingle = params.getBoolValue("ignore-cgb-single"); m_ignoreCGUSingle = params.getBoolValue("ignore-cgu-single"); @@ -3221,6 +3223,7 @@ bool SS7ISUP::initialize(const NamedList* config) m_earlyAcm = config->getBoolValue("earlyacm",m_earlyAcm); m_continuity = config->getValue("continuity",m_continuity); m_confirmCCR = config->getBoolValue("confirm_ccr",true); + m_dropOnUnknown = config->getBoolValue("drop_unknown",true); m_ignoreGRSSingle = config->getBoolValue("ignore-grs-single"); m_ignoreCGBSingle = config->getBoolValue("ignore-cgb-single"); m_ignoreCGUSingle = config->getBoolValue("ignore-cgu-single"); @@ -4874,7 +4877,7 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s if (call) call->ref(); unlock(); - if (call && call->earlyState()) { + if (m_dropOnUnknown && call && call->earlyState()) { Debug(this,DebugNote, "Received unexpected message for call %u (%p) in initial state", msg->cic(),call); diff --git a/libs/ysig/yatesig.h b/libs/ysig/yatesig.h index a712b2bd..83d1badb 100644 --- a/libs/ysig/yatesig.h +++ b/libs/ysig/yatesig.h @@ -8348,6 +8348,7 @@ private: String m_format; // Default format String m_continuity; // Continuity test type bool m_confirmCCR; // Send LPA in response to CCR + bool m_dropOnUnknown; // Drop call in early state on unknown message 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)