Hi Benoît
Here's something that worked for me: using location attributes. I don't know of any simpler way, even though it feels like there should be one, because this way technically saves the agent name twice. I didn't test this in detail, but the principle worked.
modparam("tm|usrloc", "xavp_contact", "ulattrs") # Just before calling save() for a REGISTER. $xavp(ulattrs=>yoink)=$ua; # For an INVITE lookup_to_dset("location"); t_on_branch("ZOINK"); branch_route [ZOINK] { xlog("L_WARN", "BRANCH $T_branch_idx RURI is $ru for UA $xavp(ulattrs[$T_branch_idx]=>yoink)\n"); }
2(1259) WARNING: <script>: BRANCH 1 RURI is sip:frideo@11.15.32.1:10003 for UA zoiper 2(1259) WARNING: <script>: BRANCH 2 RURI is sip:frideo@11.15.32.1:10004 for UA linphone
James
On Mon, 20 Jan 2025 at 12:49, Benoit Panizzon via sr-users sr-users@lists.kamailio.org 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?
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 -- sr-users@lists.kamailio.org 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!