Olá David!

I had to go to some of my scripts from long-long time ago to remember some
bits of the privacy handling.

The default behaviour of the sanity module is that it will 420 a request if
it contains a Proxy-Require tag that Kamailio doesn’t list as supported.
That behavior comes from the proxy_require check (bit 512) inside
sanity_check(): if that check is enabled and the tag isn’t whitelisted in
the module’s proxy_require parameter, the module sends 420 Bad Extension
with Unsupported: "<tag X>".

You can bypass that behaviour with :
modparam("sanity", "proxy_require", "privacy");

And as you mentioned, you can also disable it by clearing bit 512 from your
defaults (your 3047 − 512 = 2535 as you said):
modparam("sanity", "default_checks", 2535);

And, aparently, from what I could confirm in Kamailio docs, I think you
should be able to do this too:
*"This parameter controls whether the module drops the SIP message
automatically if the sanity checks fail. Default value is 1 (auto drop). If
set to 0, sanity_check() function will return -1 (false) to configuration
file, allowing to write log messages for example - be sure
you “exit” execution of config without sending a SIP reply because it is
sent by module itself."*

modparam("sanity", "autodrop", 0)


Atenciosamente / Kind Regards / Cordialement / Un saludo,


*Sérgio Charrua*

*www.kahea.ai <http://www.kahea.ai> / www.voip.pt <http://www.voip.pt>*

*OpenTelecom* - Consulting for Telecoms, Lda
Tel.: +351  <callto:+351+91+104+12+66>91 631 11 44

Email : *[email protected] <[email protected]>*

This message and any files or documents attached are strictly confidential
or otherwise legally protected.

It is intended only for the individual or entity named. If you are not the
named addressee or have received this email in error, please inform the
sender immediately, delete it from your system and do not copy or disclose
it or its contents or use it for any purpose. Please also note that
transmission cannot be guaranteed to be secure or error-free.








On Thu, Nov 13, 2025 at 9:32 AM David Costa via sr-users <
[email protected]> wrote:

> Hello,
>
>
>
> When my kamailio 5.8.2 receives an INVITE with header “Proxy-Require:
> privacy” it replies “420 Bad Proxy Require Extension” with “Unsupported:
> privacy”, but we are treating privacy on our code.
>
>
>
> Is the default behavior for sanity Proxy-Require validations rejecting
> calls with “420 Bad Proxy Require Extension” ?
>
>
>
> If default behavior for sanity Proxy-Require validations is rejecting
> calls with “420 Bad Proxy Require Extension” , I can use
> “modparam("sanity", "proxy_require", "privacy")”.
>
>
>
> Or based on
> https://lists.kamailio.org/pipermail/sr-users/2015-August/089636.html
> the best approach to solve this is subtract 512 from proxy_require to
> kamailio default sanity value 3047 using modparam("sanity",
> "default_checks", 2535)?
>
>
>
>
>
> Thanks,
>
> David Costa
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions --
> [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
>
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- 
[email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to