Hi Experts, I'm working to find a workaround to block SIP spiral loops.
I've this scenario:
caller ---> carrier customer (leg A) ---> MY SBC ---> carrier supplier (leg B) ---> called
Sometimes the supplier sends back the call to the customer through a different SIP Trunk and so a loop starts:
caller ---> carrier customer (leg A) ---> MY SBC ---> carrier supplier (leg B)
^-----------(other supplier SBC or soft switch)--------'
In this case MY SBC is not able to detect the loop because the "other supplier SBC" acts as a B2B UA generating a new call.
The second call has a new Call-ID, a new Via with new branch header, a new CSeq, etc.
The only not modified fields are the user part of the Request-URI and the user part of the FROM header.
The Max-Forwards header is decreased.
I could add a "proprietary" header using sip-profile but the "other SBC" removes all unsupported headers.
So, my idea is:
A) create a db of active calls
B) for each new incoming call, the SBC should performs these check:
1) acquire the From user and the Request-URI user
2) acquire the Max-Forwards
3) acquire the call time stamp
4) verify if the couple From - Request-URI already exists in the active calls db
5) if yes, verify if the current Max-Forwars is less then the stored one
6) if yes, verify if the time stamp of the current call is X seconds greater of the stored one (e.g. 5 seconds)
This is similar to the AVAYA Session Manager loop handling:
Loop Administration
Session Manager rejects requests if the number of incoming requests that have the same
combination of the R-URI, To*, From, and PAI* header values reaches the administered Loop Count
Threshold value within the Loop Detection Interval time. The frequency of the call loops is a
function of the latency and the number of network elements in the loop path. An administrator must
set the Loop Detection parameters based on the customer network configuration.
Can I do this type of checking using a Cisco CUBE?
Can I implement this function via tcl script?
Do you have suggestions for us?
Regards.