[SR-Users] Kamailio ver 5.7.3 - source installation warnings

2023-11-23 Thread Muhammad Danish Moosa via sr-users
Hi,

I am planning to upgrade Kamailio to version 5.7.3 to manage some memory
leaks issues.

I am installing from source and came across these warnings, just wanted to
be sure if they are safe to be ignored.




cr_func.c: In function ‘set_next_domain_on_rule’:
cr_func.c:160:2: warning: missing braces around initializer
[-Wmissing-braces]
  pv_value_t val = {0};
  ^
cr_func.c:160:2: warning: (near initialization for ‘val.rs’)
[-Wmissing-braces]
cr_func.c: In function ‘actually_rewrite’:
cr_func.c:348:2: warning: missing braces around initializer
[-Wmissing-braces]
  pv_value_t val = {0};
  ^
cr_func.c:348:2: warning: (near initialization for ‘val.rs’)
[-Wmissing-braces]
cr_func.c: In function ‘ki_cr_load_user_carrier_helper’:
cr_func.c:782:2: warning: missing braces around initializer
[-Wmissing-braces]
  pv_value_t val = {0};
  ^
--

LD (gcc) [M p_usrloc.so]p_usrloc.so
CC (gcc) [M evrexec.so] evrexec_mod.o
evrexec_mod.c:64:1: warning: missing braces around initializer
[-Wmissing-braces]
 static evrexec_info_t _evrexec_info = {0};
 ^
evrexec_mod.c:64:1: warning: (near initialization for ‘_evrexec_info.data’)
[-Wmissing-braces]
LD (gcc) [M evrexec.so] evrexec.so
CC (gcc) [M avp.so] avp.o
LD (gcc) [M avp.so] avp.so
CC (gcc) [M acc_diameter.so]diam_message.o
CC (gcc) [M acc_diameter.so]acc_diameter_mod.o
CC (gcc) [M acc_diameter.so]diam_avp.o
CC (gcc) [M acc_diameter.so]diam_tcp.o
LD (gcc) [M acc_diameter.so]acc_diameter.so
CC (gcc) [M dmq.so] bind_dmq.o
CC (gcc) [M dmq.so] message.o
CC (gcc) [M dmq.so] dmq_funcs.o
dmq_funcs.c: In function ‘ki_dmq_send_message’:
dmq_funcs.c:304:3: warning: missing braces around initializer
[-Wmissing-braces]
   dmq_peer_t new_peer = {0};
   ^
dmq_funcs.c:304:3: warning: (near initialization for ‘new_peer.peer_id’)
[-Wmissing-braces]
dmq_funcs.c: In function ‘ki_dmq_bcast_message’:
dmq_funcs.c:374:3: warning: missing braces around initializer
[-Wmissing-braces]
   dmq_peer_t new_peer = {0};
   ^
dmq_funcs.c:374:3: warning: (near initialization for ‘new_peer.peer_id’)
[-Wmissing-braces]
CC (gcc) [M dmq.so] notification_peer.o
CC (gcc) [M dmq.so] dmq.o
dmq.c:61:1: warning: missing braces around initializer [-Wmissing-braces]
 sip_uri_t dmq_server_uri = {0};
 ^
dmq.c:61:1: warning: (near initialization for ‘dmq_server_uri.user’)
[-Wmissing-braces]
dmq.c:67:1: warning: missing braces around initializer [-Wmissing-braces]
 static sip_uri_t dmq_notification_uri = {0};
 ^
dmq.c:67:1: warning: (near initialization for ‘dmq_notification_uri.user’)
[-Wmissing-braces]
Muhammad Danish Moosa

" The core of mans' spirit comes from new experiences. "___ Christopher
McCandless
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] RADIUS - Can't use extra attributes

2023-11-23 Thread Duarte Rocha via sr-users
Hello all,

I'm currently implementing a Kamailio with RADIUS. 

I want to send an Access-Request to my RADIUS server and in order to do that 
i'm using misc_radius module and radius_does_uri_exist() function without any 
arguments : 

"if (radius_does_uri_exist()) {"

For my module configuration I have the following configurations : 

"modparam("misc_radius", "radius_config", "/etc/radcli/radiusclient.conf")
modparam("misc_radius", "uri_extra", "Sip-Method=$rm")"

>From what i understand, with this config my access-request should contain the 
>default attributes and Sip-Method Attribute but that is not happening. Only 
>defaults attributes are included. 

I've tried to run Kamailio with "-ddd" flag for better debug and i only get 
this error : "1(176) DEBUG: misc_radius [functions.c:615]: 
radius_does_uri_user_host_exist(): failure".

Is there any other configuration that i must do?

Thanks for the help.

Cheers,

Duarte
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: Dialog + DMQ: dlg_ontimeout() triggered on wrong node!

2023-11-23 Thread Benoit Panizzon via sr-users
Hi

I'm opening an issue on github as I consider this a bug.

This fixes the issue:

route[DMQ_CAPTURE]
{
if(is_method("KDMQ"))
{
if(has_body("application/json") && $fU == 'dialog')
{
if (jansson_get("lifetime", $rb, "$var(lifetime)"))
{
$var(new_lifetime) = $var(lifetime) + 60; # Add 
60 seconds on DMQ peer to make sure it expires AFTER main node.
$var(newrb) = $rb;
jansson_set("integer", "lifetime", 
$var(new_lifetime), "$var(newrb)");
set_body("$var(newrb)","application/json");
msg_apply_changes();
}
}
dmq_handle_message();
exit;
}
}


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 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: set_body() adding or replacing existing body?

2023-11-23 Thread Benoit Panizzon via sr-users
> Is there a way to crank up debug output in the dialog and/or dmq module?

debug=3 is what I was looking for.

And that looks good:

DEBUG: dialog [dlg_dmq.c:142]: dlg_dmq_handle_msg(): body: 
{"action":2,"h_entry":3217,"h_id":4523,"state":4,"start_ts":1700748833,"lifetime":43265,
 ...

That is the updated lifetime...

DEBUG: dialog [dlg_dmq.c:160]: dlg_dmq_handle_msg(): found field: lifetime

so my altered lifetime is received on the DMQ peer. But why don't I see
it inserted?

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 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] set_body() adding or replacing existing body?

2023-11-23 Thread Benoit Panizzon via sr-users
Hi

I'm trying to change the lifetime timer on a KDMQ dialog message before
handing it with dmq_handle_message();

if(has_body("application/json") && $fU == 'dialog')
{
if (jansson_get("lifetime", $rb, "$var(lifetime)"))
{
xlog("L_INFO", "$cfg(route): DIALOG JSON 
action: $var(action) state: $var(state) lifetime: $var(lifetime)\n");
$var(new_lifetime) = $var(lifetime) + 60;
$var(newrb) = $rb;
jansson_set("integer", "lifetime", 
$var(new_lifetime), "$var(newrb)");
xlog("L_INFO", "$cfg(route): DIALOG JSON NEW: 
$var(newrb)\n");
set_body("$var(newrb)","application/json");
msg_apply_changes();
}
}
dmq_handle_message();
exit;

The JSON string looks good after that manipulation, it contains the
updated lifetime.

But dmq_handle_message() does not seem to get the body anymore. So I
wonder what set_body() exactly does. Is it replacing the body or
appending to it?

Is there a way to crank up debug output in the dialog and/or dmq module?

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 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Max-Forwards header missing in OPTIONS keep-alive messages

2023-11-23 Thread Christian Schnell via sr-users

Hello,

in RFC 3261 (sec. 8.1.1.6) it states about the Max-Forwards header field:


A UAC MUST insert a Max-Forwards header field into each request it originates 
with a value that SHOULD be 70.

Source: https://datatracker.ietf.org/doc/html/rfc3261#section-8.1.1.6


When Kamailio sends its OPTIONS keep-alive requests (from the nathelper 
module I believe), Max-Forwards is missing:



OPTIONS sip:al...@example.com:61266 SIP/2.0
Via: SIP/2.0/UDP aa.bb.cc.dd:5060;branch=z9hG4bK5124450
From: sip:pin...@sip.example.com;tag=uloc-6550aa14-7456-2461-6390f173-5fdb4667
To: sip:al...@example.com:61266
Call-ID: aba25282-2ca72be1-9d1f...@aa.bb.cc.dd
CSeq: 1 OPTIONS
Content-Length: 0


The user agent library I'm using (libre from baresip) rejects these 
requests with a "400 Bad Request" response, I looked at the sources and 
it denies these requests because of the missing Max-Forwards header.


Of course this suffices for the keep-alive logic because all that's 
needed is any traffic in both directions to keep both (potential) NATs 
open. However you might agree that it does look a bit confusing at 
first, and the RFC is clear about that.


So it's not a bug, but is this behavior intended?

Thanks, also thanks for all the great work that has been put into Kamailio.

Christian


__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] error sending message to heplify server.

2023-11-23 Thread Masud via sr-users
Hello, I have an error when sending a message to the heplify server:

Nov 23 15:09:59 sip1-life3 kamailio[1045006]: CRITICAL: {2 1395 INVITE 
ad25bc92-16a8-4be6-a29f-a4e4ee3a2c0c} siptrace [../../core/forward.h:231]: 
msg_send_buffer(): udp_send failed
Nov 23 15:09:59 sip1-life3 kamailio[1045006]: ERROR: {2 1395 INVITE 
ad25bc92-16a8-4be6-a29f-a4e4ee3a2c0c} siptrace [siptrace_hep.c:229]: 
trace_send_hep3_duplicate(): cannot send hep duplicate message
Nov 23 15:09:59 sip1-life3 kamailio[1044995]: ERROR:  
[core/udp_server.c:697]: udp_send(): sendto(sock, buf: 0x7f21549fc5f0, len: 
445, 0, dst: (10.241.60.115:9060), tolen: 16) - err: Bad file descriptor (9)
Nov 23 15:09:59 sip1-life3 kamailio[1044995]: CRITICAL: siptrace 
[../../core/forward.h:231]: msg_send_buffer(): udp_send failed
Nov 23 15:09:59 sip1-life3 kamailio[1044995]: ERROR: siptrace 
[siptrace_hep.c:229]: trace_send_hep3_duplicate(): cannot send hep duplicate 
message
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: ERROR:  
[core/udp_server.c:697]: udp_send(): sendto(sock, buf: 0x7f2154948b18, len: 
1511, 0, dst: (10.241.60.115:9060), tolen: 16) - err: Bad file descriptor (9)
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: CRITICAL: siptrace 
[../../core/forward.h:231]: msg_send_buffer(): udp_send failed
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: ERROR: siptrace 
[siptrace_hep.c:229]: trace_send_hep3_duplicate(): cannot send hep duplicate 
message
Nov 23 15:09:59 sip1-life3 kamailio[1044995]: ERROR: {2 28117 BYE 
65297c88-0834-44ce-a4da-cfd7012c2b85}  [core/udp_server.c:697]: 
udp_send(): sendto(sock, buf: 0x7f2154979898, len: 485, 0, dst: 
(10.241.60.115:9060), tolen: 16) - err: Bad file descriptor (9)
Nov 23 15:09:59 sip1-life3 kamailio[1044995]: CRITICAL: {2 28117 BYE 
65297c88-0834-44ce-a4da-cfd7012c2b85} siptrace [../../core/forward.h:231]: 
msg_send_buffer(): udp_send failed
Nov 23 15:09:59 sip1-life3 kamailio[1044995]: ERROR: {2 28117 BYE 
65297c88-0834-44ce-a4da-cfd7012c2b85} siptrace [siptrace_hep.c:229]: 
trace_send_hep3_duplicate(): cannot send hep duplicate message
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: ERROR: {1 1 INVITE 
yjaewdcbicjidajxj0td800z8ba3ta09@10.18.5.64}  [core/udp_server.c:697]: 
udp_send(): sendto(sock, buf: 0x7f21549d9c50, len: 532, 0, dst: 
(10.241.60.115:9060), tolen: 16) - err: Bad file descriptor (9)
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: CRITICAL: {1 1 INVITE 
yjaewdcbicjidajxj0td800z8ba3ta09@10.18.5.64} siptrace 
[../../core/forward.h:231]: msg_send_buffer(): udp_send failed
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: ERROR: {1 1 INVITE 
yjaewdcbicjidajxj0td800z8ba3ta09@10.18.5.64} siptrace [siptrace_hep.c:229]: 
trace_send_hep3_duplicate(): cannot send hep duplicate message
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: ERROR: {1 1 INVITE 
yjaewdcbicjidajxj0td800z8ba3ta09@10.18.5.64}  [core/udp_server.c:697]: 
udp_send(): sendto(sock, buf: 0x7f21549d9c80, len: 560, 0, dst: 
(10.241.60.115:9060), tolen: 16) - err: Bad file descriptor (9)
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: CRITICAL: {1 1 INVITE 
yjaewdcbicjidajxj0td800z8ba3ta09@10.18.5.64} siptrace 
[../../core/forward.h:231]: msg_send_buffer(): udp_send failed
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: ERROR: {1 1 INVITE 
yjaewdcbicjidajxj0td800z8ba3ta09@10.18.5.64} siptrace [siptrace_hep.c:229]: 
trace_send_hep3_duplicate(): cannot send hep duplicate message
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: ERROR: {1 1 INVITE 
yjaewdcbicjidajxj0td800z8ba3ta09@10.18.5.64}  [core/udp_server.c:697]: 
udp_send(): sendto(sock, buf: 0x7f21549d9c40, len: 529, 0, dst: 
(10.241.60.115:9060), tolen: 16) - err: Bad file descriptor (9)
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: CRITICAL: {1 1 INVITE 
yjaewdcbicjidajxj0td800z8ba3ta09@10.18.5.64} siptrace 
[../../core/forward.h:231]: msg_send_buffer(): udp_send failed
Nov 23 15:09:59 sip1-life3 kamailio[1044994]: ERROR: {1 1 INVITE 
yjaewdcbicjidajxj0td800z8ba3ta09@10.18.5.64} siptrace [siptrace_hep.c:229]: 
trace_send_hep3_duplicate(): cannot send hep duplicate message
Nov 23 15:09:59 sip1-life3 kamailio[1044996]: ERROR:  
[core/udp_server.c:697]: udp_send(): sendto(sock, buf: 0x7f215494b6a8, len: 
823, 0, dst: (10.241.60.115:9060), tolen: 16) - err: Bad file descriptor (9)
Nov 23 15:09:59 sip1-life3 kamailio[1044996]: CRITICAL: siptrace 
[../../core/forward.h:231]: msg_send_buffer(): udp_send failed
Nov 23 15:09:59 sip1-life3 kamailio[1044996]: ERROR: siptrace 
[siptrace_hep.c:229]: trace_send_hep3_duplicate(): cannot send hep duplicate 
message
Nov 23 15:09:59 sip1-life3 kamailio[1045015]: ERROR:  
[core/udp_server.c:697]: udp_send(): sendto(sock, buf: 0x7f21549fc5a0, len: 
507, 0, dst: (10.241.60.115:9060), tolen: 16) - err: Bad file descriptor (9)
Nov 23 15:09:59 sip1-life3 kamailio[1045015]: CRITICAL: siptrace 
[../../core/forward.h:231]: msg_send_buffer(): udp_send failed
Nov 23 15:09:59 sip1-life3 kamailio[1045015]: ERROR: siptrace 
[siptrace_hep.c:229]: trace_send_hep3_duplicate(): cannot s

[SR-Users] Kamailio v5.6.5 Released

2023-11-23 Thread Daniel-Constantin Mierla via sr-users
Hello,

Kamailio SIP Server v5.6.5 stable release is out.

This is a maintenance release of the latest stable branch, 5.6, that
includes fixes since the release of v5.6.4. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.6.x. Deployments running previous v5.6.x
versions are strongly recommended to be upgraded to v5.6.5.


Note that 5.6 is the second last stable branch, still officially
maintained by Kamailio development team. The latest stable branch is
5.7, with v5.7.3 being release out of it.


For more details about version 5.6.5 (including links and guidelines to
download the tarball or from GIT repository), visit:

  * https://www.kamailio.org/w/2023/11/kamailio-v5-6-5-released/

RPM, Debian/Ubuntu packages will be available soon as well.

Many thanks to all contributing and using Kamailio!

Cheers,
Daniel

-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training -- asipto.com

__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Hump presence mwi htable

2023-11-23 Thread David VILLAUME via sr-users
Hello,

I'm running presence_mwi without database.
I'm looking for a way to dump the presence htable content, is there any way to 
perform that ?

Regards



[https://storage.letsignit.com/6009878cd5039f000742d6a1/generated/effects_bf9521dda0faeae1c97133a8f58c5d45fb63ece7526f11e602b9a78b.png]



David VILLAUME

Ingénieur Voix

Tel :



+33 156377321

david.villa...@sewan.fr

2 cité Paradis - 75010 PARIS

www.sewan.fr

[https://storage.letsignit.com/6009878cd5039f000742d6a1/generated/effects_787663755b4e5a47d7fd2cba81402943c0c8663be8ab79828422c8bc.png]

[https://storage.letsignit.com/6009878cd5039f000742d6a1/generated/effects_13b94e54a73f0803df4ced874e54ac5550bda1a231e8ac13e1c89e0d.png]

[https://storage.letsignit.com/6009878cd5039f000742d6a1/generated/effects_24686cc19ef5136b39918de6cfb29dcdb6d116db48a8b4daf03d1853.png]



__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: sips to sip

2023-11-23 Thread Ihor Olkhovskyi via sr-users

Just to add for a history.

I've found that Asterisk normally accepts sips schema over UDP and keeps 
sending responses regardless on schema specified also in UDP.


So, in my case only thing that was needed is to change the $du, smth like

request_route{

...

    if (is_method("CANCEL")) {
    if (t_check_trans()) {
    route(SIPS_PROCESS);
    if (!t_relay()) {
    send_reply("500", "Relay failed");
    }
    }
    exit;
    }

}

route[RELAY] {

route(SIPS_PROCESS);

    t_relay();

}

route[SIPS_PROCESS] {
    # If device is using "sips:" dialing scheme, force it with $du 
pointing to "sip:" scheme

    # so Kamailio will not try to send it over TLS to internal services.
    # Applies to requests coming FROM external devices, like Poly OBI ATA's
    if (route(FROMASTERISK)) {
    return;
    }
    if ($du == $null && $rz != 'sips') {
    return;
    }
    if ($du != $null) {
    if ($(du{uri.scheme}) == 'sips') {
    xlog("$var(debug_level)", "[SIPS_PROCESS]: Modifying <$du> 
to sip scheme");


    $du = 'sip:' + $dd + ':' + $dp;
    }
    return;
    }
    if ($rz != 'sips') {
    return;
    }
    $du = 'sip:' + $rd + ':' + $rp;

    xlog("$var(debug_level)", "[SIPS_PROCESS]: Setting <$du> for packet 
to <$ru> to avoid sips routing");

}

Le 22/11/2023 à 01:53, David Villasmil via sr-users a écrit :
thanks all, i figured it out with help from Alfonso who found 
https://github.com/fredposner/scripts/blob/master/kamailio/kamailio-tls_srtp-bridge.cfg

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Tue, Nov 21, 2023 at 2:34 PM Henning Westerholt  wrote:

Hi David,

at least from the logs the dialog is matched:

DEBUG: dialog [dlg_hash.c:885]: internal_get_dlg(): dialog
callid='aa157c08df1109c4655ca64d0ed67' found on entry 1431, dir=2
to-tag='ZDDN09pNH37XB'
DEBUG: dialog [dlg_profile.c:541]: set_current_dialog(): setting
current dialog [1431:511]
DEBUG: dialog [dlg_handlers.c:343]: dlg_iuid_sfree(): freeing dlg
iuid [3314:1253] (0x7f6d9b2afe20)
DEBUG: dialog [dlg_hash.c:1293]: next_state_dlg(): dialog
0x7f6d9b2f8240 changed from state 5 to state 5, due event 7 (ref 2)

The dialog is already deleted at this point, not sure why.

Please note that your rewrite method can cause problems in
dialogs, as for example the From/To header will be not matching to
the expectations of the UAs. Consider using the methods I
mentioned earlier to prevent this.

Cheers,

Henning

*From:*David Villasmil 
*Sent:* Dienstag, 21. November 2023 13:58
*To:* Henning Westerholt 
*Cc:* Kamailio (SER) - Users Mailing List

*Subject:* Re: [SR-Users] sips to sip

thanks Henning,

Already tried that with:


  if (is_method("INVITE")) {
        $var(fline) = $msg(fline);
        $var(hdrs) = $msg(hdrs);
        $var(body) = $msg(body);

        $var(fline) = $(var(fline){s.replace,sips,sip});
#{s.replace,;transport=TLS,}{s.replace,;transport=tls,});
        $var(hdrs) = $(var(hdrs){s.replace,sips,sip});
#{s.replace,;transport=TLS,}{s.replace,;transport=tls,});
        $var(body) = $(var(body){s.replace,sips,sip});
#{s.replace,;transport=TLS,}{s.replace,;transport=tls,});

msg_set_buffer("$var(fline)\r\n$var(hdrs)\r\n\r\n$var(body)");
        msg_apply_changes();
    }

but then the BYE doesn't work, kamailio can't match it to a dialog

2023/11/21 12:48:41.962062 FREESWITCH-IP:5080 -> 10.0.3.141:5060

BYE sip:+FROM-NUMBER@CLIENT-IP;transport=TLS SIP/2.0
Via: SIP/2.0/UDP FREESWITCH-IP:5080;rport;branch=z9hG4bK34FNtg4e31B8K
Route: 
Route: 
Max-Forwards: 70
From: ;tag=133B764ZS9QvD
To: ;tag=df6b235d
Call-ID: 75fc6fcaaa32bcd7655ca72452eac
CSeq: 75731668 BYE
User-Agent: C3S-v1.1
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Reason: Q.850;cause=16;text="NORMAL_CLEARING"
Content-Length: 0



DEBUG:  [core/receive.c:392]: receive_msg(): --- received
sip message - request - call-id: [aa157c08df1109c4655ca64d0ed67] -
cseq: [75731561 BYE]
DEBUG:  [core/receive.c:263]: ksr_evrt_pre_routing(): event
route core:pre-routing not defined
DEBUG:  [core/receive.c:474]: receive_msg(): preparing to
run routing scripts...
ERROR: