Hi Uri,
for that you can easily count the forwards by using the maxfwd module
(mf_process_maxfwd_deader <your max>) or you can store all your spiraled
calls into a dialog-variable like
$dlg_var(forward-chain)=<B>;<C>|<C>;<B> and check whether the next
number is already stored or not.
Bye Sven
Am 20.02.2012 13:20, schrieb Uri Shacked:
Hi,
The service i built in kamailio is simple - a caller dials an Access
number, my gateway send it to kamailio.
kamailio finds the shadow number for this Access number and send an
invite to the same gateway with the shadow number as destination
(state full proxy).
In kamailio i change only the RURI and the “To” and “From” stays
untouched.
Now, when a client performs “diversion”, I can see that I can find
myself in an unwanted long loop….
Example :
A calls B
B diverted the call unconditionally to C.
C is an Access Number that its shadow number is D.
D diverted the call to B…….
Well, that is a bad loop to have!
It can be longer or shorter, but the idea I understood (I think).
I thought about diversion check, counters, dialog “To” and “From”
check, etc….
Anyone here dealt with it?
What will be the best way to check and see if the situation accrues?
Thanks,
Uri