Replace circuits (make an automatic repeat attempt) for outgoing calls in initial state when a blocking message is received from remote party.
git-svn-id: http://voip.null.ro/svn/yate@3568 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
1cb831f307
commit
8ef2f97bdc
|
@ -4488,8 +4488,11 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s
|
|||
reason = "unknown-channel";
|
||||
break;
|
||||
case SS7MsgISUP::BLK: // Blocking
|
||||
if (blockCircuit(msg->cic(),true,true,false,true,true))
|
||||
if (blockCircuit(msg->cic(),true,true,false,true,true)) {
|
||||
transmitMessage(new SS7MsgISUP(SS7MsgISUP::BLA,msg->cic()),label,true);
|
||||
// Replace circuit for outgoing call in initial state
|
||||
replaceCircuit(msg->cic(),String('1'));
|
||||
}
|
||||
else
|
||||
reason = "unknown-channel";
|
||||
break;
|
||||
|
@ -4603,6 +4606,9 @@ void SS7ISUP::processControllerMsg(SS7MsgISUP* msg, const SS7Label& label, int s
|
|||
m->params().addParam("RangeAndStatus",String(nCics));
|
||||
m->params().addParam("RangeAndStatus.map",map);
|
||||
transmitMessage(m,label,true);
|
||||
// Replace circuits for outgoing calls in initial state
|
||||
if (block)
|
||||
replaceCircuit(msg->cic(),map);
|
||||
}
|
||||
break;
|
||||
case SS7MsgISUP::UEC: // Unequipped CIC (national use)
|
||||
|
@ -4780,14 +4786,6 @@ bool SS7ISUP::blockCircuit(unsigned int cic, bool block, bool remote, bool hwFai
|
|||
if (!circuit)
|
||||
return false;
|
||||
|
||||
// Replace circuit for call (Q.764 2.8.2.1)
|
||||
SS7ISUPCall* call = findCall(cic);
|
||||
if (call && call->outgoing() && call->state() == SS7ISUPCall::Setup) {
|
||||
SignallingCircuit* newCircuit = 0;
|
||||
reserveCircuit(newCircuit,call->cicRange(),SignallingCircuit::LockLockedBusy);
|
||||
call->replaceCircuit(newCircuit);
|
||||
}
|
||||
|
||||
bool something = false;
|
||||
if (hwFail)
|
||||
something = circuit->hwLock(block,remote,changed,changedState);
|
||||
|
@ -5148,6 +5146,23 @@ SS7MsgISUP* SS7ISUP::buildCicBlock(SignallingCircuit* cic, bool block, bool forc
|
|||
return m;
|
||||
}
|
||||
|
||||
// Replace circuit for outgoing calls in Setup state
|
||||
void SS7ISUP::replaceCircuit(unsigned int cic, const String& map)
|
||||
{
|
||||
Lock lock(this);
|
||||
for (unsigned int i = 0; i < map.length(); i++) {
|
||||
if (map[i] != '1')
|
||||
continue;
|
||||
// Replace circuit for call (Q.764 2.8.2.1)
|
||||
SS7ISUPCall* call = findCall(cic + i);
|
||||
if (call && call->outgoing() && call->state() == SS7ISUPCall::Setup) {
|
||||
SignallingCircuit* newCircuit = 0;
|
||||
reserveCircuit(newCircuit,call->cicRange(),SignallingCircuit::LockLockedBusy);
|
||||
call->replaceCircuit(newCircuit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* SS7BICC
|
||||
|
|
|
@ -7863,6 +7863,8 @@ private:
|
|||
// @param force True to ignore resetting/(un)blocking flags of the circuit
|
||||
// Return built message to be sent on success
|
||||
SS7MsgISUP* buildCicBlock(SignallingCircuit* cic, bool block, bool force = false);
|
||||
// Replace circuit for outgoing calls in Setup state
|
||||
void replaceCircuit(unsigned int cic, const String& map);
|
||||
|
||||
SS7PointCode::Type m_type; // Point code type of this call controller
|
||||
ObjList m_pointCodes; // Point codes serviced by this call controller
|
||||
|
|
Loading…
Reference in New Issue