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

Federico Cabiddu federico.cabiddu at gmail.com
Thu Aug 11 13:00:11 CEST 2022


Hi Bernd,
I am using remove_hf{"Via") without any issue to remove Via headers added
from previous hops.
As explained by Henning you cannot remove the Via that kamailio has to
insert as a proxy, also because, by rfc, the Via is used to relay back the
replies. If Kamailio would not insert its own Via in an outgoing message,
the receiving hop would have no way of responding to the request.

Cheers,

Federico


On Thu, Aug 11, 2022 at 12:21 PM Bernd Krueger-Knauber <bkk at ednt.de> wrote:

> 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
> >
>
>
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220811/29383cf0/attachment.htm>


More information about the sr-users mailing list