[OpenSIPS-Users] Removing header by contents
Bogdan-Andrei Iancu
bogdan at opensips.org
Mon Jan 22 11:17:27 UTC 2024
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,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
https://www.siphub.com
On 15.01.2024 21:08, Ihor Olkhovskyi wrote:
> 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
>
> https://github.com/OpenSIPS/opensips/blob/224a3236cbeaeb06a897cb3beab8c3a0c3d5903f/modules/sipmsgops/sipmsgops.c#L425
>
>
> Le 15/01/2024 à 15:03, Alexey a écrit :
>> 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
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list