Hello Benoit,
I cannot comment right now on the details of your questions. But be aware that the
app_perl module is quite old, and I personally would not recommend it for a new project.
If one would like to use scripting languages inside the Kamailio configuration, I would
recommend using the KEMI modules like app_python3, app_ruby, app_lua etc..
Cheers,
Henning
-----Original Message-----
From: Benoit Panizzon via sr-users <sr-users(a)lists.kamailio.org>
Sent: Tuesday, November 26, 2024 9:49 AM
To: Benoît Panizzon via sr-users <sr-users(a)lists.kamailio.org>
Cc: Benoit Panizzon <benoit.panizzon(a)imp.ch>
Subject: [SR-Users] record_route() adds empty route header if enable_double_rr is 1
Hi Gang
How is record_route() determining if it needs to add two RR Header?
Kamailio 5.8.4
I'm attempting to perform route header hiding by by rebuilding some of the topos
functionality with perl.
So towards the CPE I'm removing all existing RR header and want to replace them with
one header containing an attribute which the CPE is then sending back and allows me to
restore the Route header.
But I came across an issue which an empty RR header being created with this (simplified)
script:
modparam("rr", "enable_double_rr", 1)
perl_exec("hide_route"); # Stores Route-Set and sets $avp(rrattr) as id
remove_hf("Record-Route"); msg_apply_changes(); loose_route(); # Required for
record_route()?
add_rr_param(";rr=$avp(rrattr)"); # Add Param to identify saved route set
record_route();
I end up with:
Record-Route: <sip:;r2=on;lr;rr=id007>
Record-Route: <sip:157.161.x.x;r2=on;lr;rr=id007>
The first header missing the IP address, the message being dropped by the CPE
There is no transport change.
If I set enable_double_rr to 0 only the 2nd RR header is created and this works as
expected but I am not sure if some situations would need double RR.
What causes the double RR to be created in my case?
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(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!