That's interesting. It's in the 5.4 documentation, but missing from the 5.8 doc.
James
On Thu, 23 Jan 2025 at 09:11, Daniel-Constantin Mierla via sr-users
<sr-users(a)lists.kamailio.org> wrote:
Hello,
On 20.01.25 13:40, Benoit Panizzon via sr-users wrote:
Hi List
I have some CPE which require special handling like removing 100rel and
update from the supported methods because they misbehave.
Previously, I was using reg_fetch_contacts and then appending the
branches manually and stacking the UA in an AVP.
With the branch index this allowed me to get the AVP containing the UA
to which the call was branched in the branch route and perform
filtering of methods based on UA, but it was complicated.
Now I use the intended function lookup_to_dset() but now I miss how to
access the register contact UA from within a branch route.
Is there an intended way to access that information?
after lookup location call, the UA from register is made available in
the $location_ua for the contact set in r-uri and
$(branch(location_ua)[INDEX]) that gives it for additional branches.
Maybe you can get it in branch route as well, if branch index is 0, then
is the r-uri, the next branches are built from additional branches after
lookup location.
An alternative is to set a branch flag during the registration when you
know that some specific processing has to be done when sending requests
to that contact. The branch flags are available in the branch route
after lookup location.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@
asipto.com)
twitter.com/miconda --
linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services --
asipto.com
Kamailio World Conference, May 12-13, 2025, Berlin --
kamailioworld.com
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions --
sr-users(a)lists.kamailio.org
To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!