Re: [SR-Users] remove headers with less than 5 characters with textops

2022-06-07 Thread Patrick Karton
in fact it was just example when i said 5.

i just wondered if the remove_hf_re function understands that regular 
expression.

it seems the regular expression that we can use with that function is limited. 
i did not look in details in source code right now.

De : sr-users  de la part de Ben Kaufman 

Envoyé : mardi 7 juin 2022 17:00
À : Kamailio (SER) - Users Mailing List 
Objet : Re: [SR-Users] remove headers with less than 5 characters with textops


I know it’s not really a direct answer to your question, but wouldn’t that 
remove the Cseq: header.  Are you sure that’s desirable?



Ben Kaufman



From: sr-users  On Behalf Of Patrick Karton
Sent: Tuesday, June 7, 2022 9:59 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] remove headers with less than 5 characters with textops



Hello



im trying to textops module  to remove headers with name length less than 5 
characters with regular expression but it seems impossible or the module does 
not handle $ char



remove_hf_re("^.{1,5}$")


__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@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


Re: [SR-Users] remove headers with less than 5 characters with textops

2022-06-07 Thread Ben Kaufman
I know it's not really a direct answer to your question, but wouldn't that 
remove the Cseq: header.  Are you sure that's desirable?

Ben Kaufman

From: sr-users  On Behalf Of Patrick Karton
Sent: Tuesday, June 7, 2022 9:59 AM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] remove headers with less than 5 characters with textops

Hello

im trying to textops module  to remove headers with name length less than 5 
characters with regular expression but it seems impossible or the module does 
not handle $ char


remove_hf_re("^.{1,5}$")

__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@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


Re: [SR-Users] remove headers with less than 5 characters with textops

2022-06-07 Thread M S
Removing headers with up 5 characters in name would make SIP message
invalid since many critical headers such as TO, FROM, and VIA etc. will
also be removed. So, even if the regex works, Kamailio will NOT relay this
SIP message.

Thank you.



On Tue, Jun 7, 2022 at 5:00 PM Patrick Karton 
wrote:

> Hello
>
> im trying to textops module  to remove headers with name length less than
> 5 characters with regular expression but it seems impossible or the module
> does not handle $ char
>
> remove_hf_re("^.{1,5}$")
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@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
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@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


[SR-Users] remove headers with less than 5 characters with textops

2022-06-07 Thread Patrick Karton
Hello

im trying to textops module  to remove headers with name length less than 5 
characters with regular expression but it seems impossible or the module does 
not handle $ char


remove_hf_re("^.{1,5}$")

__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@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