Hi
You could try subst_hf() from textops to do it. I didn't find any
simpler way to do it. It may be possible to do this with URI
transformations, too, but I didn't experiment with those.
subst_hf("Record-Route", "/;zoink=[^;>]*//", "a");
It changed these header fields to these.
Record-Route:
<sip:10.25.10.1;r2=on;lr;ftag=gK002f29d3;zoink=freddie;yoink=meatloaf>
Record-Route: <sip:10.17.12.2;r2=on;lr;ftag=gK002f29d3;zoink=freddie>
Record-Route: <sip:10.25.10.1;r2=on;lr;ftag=gK002f29d3;yoink=meatloaf>
Record-Route: <sip:10.17.12.2;r2=on;lr;ftag=gK002f29d3>
By the way, the rr parameter for adding ftag to the RR header fields
can later be used to see which direction (the is_direction() function)
the request is going in, so you may not even need to change the
Record-Route values if you use that.
-
https://kamailio.org/docs/modules/5.8.x/modules/rr.html#rr.p.append_fromtag…
-
https://kamailio.org/docs/modules/5.8.x/modules/rr.html#rr.f.is_direction
James
On Fri, 13 Dec 2024 at 10:42, Benoît Panizzon via sr-users
<sr-users(a)lists.kamailio.org> wrote:
Hi
Is there a way to remove an param from the top most rr header?
I add a rr param towards the B CPE to store some information which is
sent back on the rr header of the reply from B.
So far this is what is intended and I also get this param in subsequent
route headers from messages created by B and as the route header are
remove towards A, this works fine.
Unfortunately, in a case of a reply, the parameter is passed to A
which is then sending back the param in the route header which would
make it somehow complicated to figure out which side sent that
parameter. I'm only interested if sent from B.
So I wonder, is there a way to delete a rr param on replies to make
sure I don't get it back in the ACK to the reply?
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
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(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!