If another Invite will come FROM or TO B or C = there will be no htable entry.
I'm not sure this is even a correct way. Surely missing something.
=============================================================================================
=============================================================================================
2) PROBLEM WITH IDENTIFYING TABLE ENTRIES
Anyway, the main problem is with identifying those htables to set proper $du.
If INVITE is coming TO FSs I need to check if caller ID ($fU) or dest ($rU) is present in htables.
Form I need to write to hash must be like $fU:$rU
Entry must be unique or it will be:
1) rewrited anytime a new invite is going to the same dest.
2) deleted anytime BYE or failure will come
eg:
If $sht(fsdest=>$rU) = $dd
1) 1000 --> 3200 = htable entry 3200 = xxxx
2) 1005 --> 3200 = htable entry rewriten to the same 3200 = xxxx
When 1000 or 1005 leaving conf, it sends BYE and removes entry.
So, next call to 3200 may be sent to the wrong FS.
Ok, we have a unique entry ($fU:$rU). Checking for active destination:
if (sht_match_name("fsdest", "re", ":$rU")) {}
If there's an htable with $rU in key - we got a match.
Now we need to assign a value from htable to $du.
But, I don't know how to get the name of this entry.
There's always different $fU: (or $rU if we check for the same caller ID ($fU)).
eg:
1000 --> 3200 = htbale 1000 --> 3200
New call 1005 --> 3200
Check sht_match name ":3200" - got match
We need to set: $du = $sht(fsdest=>$fU:$rU)
But it will be $sht(fsdest=>1005:3200) and we don't have this entry.
We need (fsdest=>1003:3200) But i don't see any way to get needed $fU.
Is there any way to search or identify these tables?=============================================================================================
=============================================================================================
Can someone help me with this, please? :-)
Or maybe there is a better way to do this?
My kamailio.cfg routing block in pastebin, if needed
https://pastebin.com/1PZ0QSDWThank you!
Regards, Tim