[SR-Users] remove_hf() does not remove the complete line

Henning Westerholt hw at gilawa.com
Thu Aug 11 12:56:51 CEST 2022


Hi Bernd,

The Via header is mandatory according to RFC 3261, section 20, in Requests:

   Header field              where       proxy ACK BYE CAN INV OPT REG
   ___________________________________________________________________
[..]
   Via                         R          amr   m   m   m   m   m   m

You are asking Kamailio to do something that is against the standard. So, some people might expect that it's not working in this case, and I personally would not call it a Bug.

Documentation would be never fully complete for a complex software like Kamailio, sure.
You could open a feature request or (even better) a pull request to improve the documentation for the textops module in the Kamailio github.

Cheers,

Henning

-- 
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com

-----Original Message-----
From: Bernd Krueger-Knauber <bkk at ednt.de> 
Sent: Thursday, August 11, 2022 12:20 PM
To: Henning Westerholt <hw at gilawa.com>; Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] remove_hf() does not remove the complete line

Hello Henning,

thanks for your response.

We had a problem were a BYE was not sended by the pbx. So I wanted to test if it makes a difference if only the Record-Route entry is in the header of the INVITE.

But in general, I will call this a bug in kamailio.

There is nothing written about corner cases in the documentation.
If I use remove_hf() I assume that it works.
If I can not trust what it is written in the documentation, I have to check each SIP packet for inconsistencies if I use an additional command in the cfg file.

2 possibilities:
1. Add this behaviour in the documentation (bad, but ok) 2. The command should work as described.

Best regards,

Bernd


Am 09.08.2022 um 21:59 schrieb Henning Westerholt:
> Hello,
>
> the Via header is a bit of a special one, as its obviously also added from the Kamailio server during relay or other operations. This might interfere with the textops remove_hf operation.
>
> What is your goal that you want to achieve? There might be another way to doing it.
>
> Cheers,
>
> Henning
>




More information about the sr-users mailing list