Let the call progress only if COT indicates success.

git-svn-id: http://voip.null.ro/svn/yate@3224 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2010-04-20 15:35:13 +00:00
parent 63cc8b2fa3
commit 606dbeebf7
1 changed files with 15 additions and 4 deletions

View File

@ -2105,14 +2105,25 @@ SignallingEvent* SS7ISUPCall::processSegmented(SS7MsgISUP* sgm, bool timeout)
m_iamTimer.stop();
switch (m_sgmMsg->type()) {
case SS7MsgISUP::COT:
if (!m_iamMsg) {
m_lastEvent = new SignallingEvent(SignallingEvent::Info,m_sgmMsg,this);
break;
{
const String* cont = m_sgmMsg->params().getParam("ContinuityIndicators");
bool ok = cont && (*cont == "success");
if (ok) {
Debug(isup(),DebugNote,"Call(%u). Continuity check succeeded [%p]",
id(),this);
m_circuitTesting = false;
}
else
Debug(isup(),DebugWarn,"Call(%u). Continuity check failed [%p]",
id(),this);
if (!(ok && m_iamMsg)) {
m_lastEvent = new SignallingEvent(SignallingEvent::Info,m_sgmMsg,this);
break;
}
}
TelEngine::destruct(m_sgmMsg);
m_sgmMsg = m_iamMsg;
m_iamMsg = 0;
m_circuitTesting = false;
// intentionally fall through
case SS7MsgISUP::IAM:
if (needsTesting(m_sgmMsg)) {