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-
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?
Always the same, when the email is sent and I start thinking of something else, I get the right idea!
Within the branch route, I guess I can check the destination URI and not remove the X- Header when the destination URI points to the other registrar.
Mit freundlichen Grüssen
-Benoît Panizzon-
I think what you want is PATH:
https://www.kamailio.org/docs/modules/devel/modules/path.html
-----Original Message----- From: Benoit Panizzon via sr-users sr-users@lists.kamailio.org Sent: Thursday, January 18, 2024 10:02 AM To: sr-users@lists.kamailio.org Cc: Benoit Panizzon benoit.panizzon@imp.ch Subject: [SR-Users] trigger different branch route on branch added with append_branch
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
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- -- I m p r o W a r e A G - Leiter Commerce Kunden ______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00 CH-4133 Pratteln Fax +41 61 826 93 01 Schweiz Web http://www.imp.ch/ ______________________________________________________ __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: