Re: [OpenSIPS-Users] Removing header by contents

2024-01-22 Thread Bogdan-Andrei Iancu
Indeed, as per docs, the RE is applied only to the hdr name, not to its body. Of course, you can iterate thru the Contact hdrs using the $(hdr(Contact)[idx]) and check its value in script, but afterall there is no mechanism to delete that particular instance of CT hdr Regards,

Re: [OpenSIPS-Users] Removing header by contents

2024-01-18 Thread Răzvan Crainea
Unfortunately there is no support for this in OpenSIPS - you can only remove a header by its name, and that would remove all occurrences. I guess your only solution is what you already did: remove all and add back only what you want. Best regards, Răzvan Crainea OpenSIPS Core Developer /

Re: [OpenSIPS-Users] Removing header by contents

2024-01-15 Thread Ihor Olkhovskyi
Thanks, I've tried to use them, but seems they are taking for both expressions, regex and glob not looking in Header values, but names only When looking at the code, my suspicion getting stronger

Re: [OpenSIPS-Users] Removing header by contents

2024-01-15 Thread Alexey
Hello Igor, these functions - isn't it what you need? remove_hf_re(hname_expr) [1] remove_hf_glob(hname_pattern) [2] 1. https://opensips.org/docs/modules/3.4.x/sipmsgops.html#func_remove_hf_re 2. https://opensips.org/docs/modules/3.4.x/sipmsgops.html#func_remove_hf_glob -- best regards,

[OpenSIPS-Users] Removing header by contents

2024-01-14 Thread Ihor Olkhovskyi
Hello! Is there any easy possibility to remove header not by name, but name and contents or just header number? I have several Route headers and want to remove the first one only. For the moment I'm thinking to remove all headers and add all but the first in the loop, but maybe it's an