Hello,

are you doing maybe two operations on the body in a row? This will create 
issues, refer to the FAQ:
https://www.kamailio.org/wikidocs/tutorials/faq/main/#why-body-or-other-parts-of-the-sip-message-appear-multiple-times

Have a look e.g. to this older issue for a recommendation involving 
branch_route with rtpengine.

https://github.com/kamailio/kamailio/issues/3275

Cheers,

Henning

> -----Original Message-----
> From: msd.mazarei--- via sr-users <[email protected]>
> Sent: Montag, 13. Oktober 2025 18:21
> To: [email protected]
> Cc: [email protected]
> Subject: [SR-Users] Re: set_body and set_reply_body is not working
> 
> for testing purposes I just simplify it and after rtp engine call I added:
> 
> ```
>                 remove_body();
>                 remove_hf_re("^Content-Length");
>                 set_body("just for fun - remove content-length", 
> "application/sdp");
> ```
> 
> here is sip message (request):
> ```
> INVITE XXXXXX SIP/2.0
> Record-Route:  <XXXXX>
> Record-Route:  <XXXXX>
> Record-Route:  <XXXXXX>
> CSeq:  1 INVITE
> From:  "CE5F9E7D489C4ABFB0665B4D4737440C.masoud-mazarei-
> f4ac4bcb-e271-5a92-8e43-1d676a8821fa200"
> <sip:CE5F9E7D489C4ABFB0665B4D4737440C.masoud-mazarei-f4ac4bcb-
> e271-5a92-8e43-
> 1d676a8821fa200@XXXXX>;tag=04083602_c3356d0b_86a06a00-13bb-
> 4b03-9cb8-0319e093e2de
> To:  "sipout" <sip:100@XXXXX>
> Max-Forwards:  66
> P-Asserted-Identity:  <sip:CE5F9E7D489C4ABFB0665B4D4737440C.masoud-
> mazarei-f4ac4bcb-e271-5a92-8e43-1d676a8821fa200@XXXXX>
> Min-SE:  120
> Call-ID: [email protected]
> Via:  SIP/2.0/TLS XXXXX
> Via:  SIP/2.0/TLS XXXXX
> Via:  SIP/2.0/UDP XXXXX
> Allow:  INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY
> User-Agent:  MY GATEWAT
> Content-Type:  application/sdp
> 3637636
> just for fun - remove content-length
> ```
> as upi see Content Length is comibantion of old and new and is not removed
> by remove_hf, old content length was: `Content-Length:  362` and new one is
> `36`
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions -- sr-
> [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the
> sender!
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- 
[email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to