Hi List
Imagine the following situation:
Two Kamailio registrar proxies handling the same domain. Location Information synced via DMQ.
So if a device registers we don't know on which of the two registrar proxies.
Core proxy is dispatching calls to either one of those registrars.
Core also performs AOR database lookup and adds an X- header telling which AOR the call is destined to.
Registrar performs lookup of that AOR in the location database and routes the call to destination.
Problem: The call could be routed to the the registrar which does not hold the active socket to that client.
Solution: reg_fetch_contacts, cycle the contacts and append_branch if the contact has a local socket.
Next Problem: I use a failure_route to sent the call to voicemail, if not registered, busy etc. This would trigger, if we have no local socket for the registration which is on the other registrar. So I have to find a way to send the call to the other registrar.
I guess I can append_branch a branch pointing to the URI of the other registrar. This would then succeed in reaching the device. Also using the failure_route would work this way if we get a remote error from behind the other registrar or no registration at all.
Next Problem: I use a branch trigger to remove undesired header I do not want to send to the customer. Now imagine that AOR has two contacts, one on registered on each registrar proxy.
So I end up with two destinations added with append_branch to the destination set.
One points to the device of the locally registered customer device, the other one points to the other registrar where to find the other device.
I use a branch route trigger to remove the X- Headers towards the customer. But I need to X- Header containing the destination AOR to still be sent to the other registrar.
Is there a way to trigger a branch route for only some of the destinations added with append_branch? Or to trigger different branch routes for different destinations in one set added with append_branch?
Or am I doing this completely wrong and there is an easier way? ;-)
Mit freundlichen Grüssen
-Benoît Panizzon-