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