Fixed call collision condition.

git-svn-id: http://voip.null.ro/svn/yate@3566 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2010-08-29 15:41:35 +00:00
parent 567f4e2ca1
commit 8c5fc3fff2
1 changed files with 4 additions and 2 deletions

View File

@ -4309,8 +4309,10 @@ void SS7ISUP::processCallMsg(SS7MsgISUP* msg, const SS7Label& label, int sls)
// The greater point code should have the even circuit
unsigned int dpc = label.dpc().pack(label.type());
unsigned int opc = label.opc().pack(label.type());
if (dpc > opc && !(msg->cic() % 2))
DROP_MSG("collision - dpc greater then opc for even CIC")
bool controlling = (dpc > opc);
bool even = (0 == (msg->cic() % 2));
if (controlling == even)
DROP_MSG("collision - we control the CIC")
// Accept the incoming request. Change the call's circuit
reserveCircuit(circuit,call->cicRange(),SignallingCircuit::LockLockedBusy);
call->replaceCircuit(circuit);