Module: kamailio Branch: master Commit: 3deb74b1054451ac91fa96ddd4b1dc44274a60ee URL: https://github.com/kamailio/kamailio/commit/3deb74b1054451ac91fa96ddd4b1dc44274a60ee
Author: mt.ghafari <[email protected]> Committer: Henning Westerholt <[email protected]> Date: 2026-06-24T10:49:26+02:00 secfilter: added configuration documentation - documented 9 granular identity check functions in admin XML --- Modified: src/modules/secfilter/doc/secfilter_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/3deb74b1054451ac91fa96ddd4b1dc44274a60ee.diff Patch: https://github.com/kamailio/kamailio/commit/3deb74b1054451ac91fa96ddd4b1dc44274a60ee.patch --- diff --git a/src/modules/secfilter/doc/secfilter_admin.xml b/src/modules/secfilter/doc/secfilter_admin.xml index 359885b7339..e50d7d5d4d7 100644 --- a/src/modules/secfilter/doc/secfilter_admin.xml +++ b/src/modules/secfilter/doc/secfilter_admin.xml @@ -604,6 +604,92 @@ </section> <section> + + + <section id="secfilter.f.secf_check_username"> + <title> + <function moreinfo="none">secf_check_username_[from|to|contact]_hdr()</function> + </title> + <para> + These three functions (<emphasis>secf_check_username_from_hdr</emphasis>, + <emphasis>secf_check_username_to_hdr</emphasis>, and + <emphasis>secf_check_username_contact_hdr</emphasis>) check only the + <emphasis>username</emphasis> part of the respective SIP URI. + </para> + <para>Return values:</para> + <itemizedlist> + <listitem> 2 = username is whitelisted</listitem> + <listitem> 1 = username not found (neutral)</listitem> + <listitem>-1 = error (parsing failed)</listitem> + <listitem>-2 = username is blacklisted</listitem> + </itemizedlist> + <example> + <title><function>secf_check_username_from_hdr</function> usage</title> + <programlisting format="linespecific"> + if (secf_check_username_from_hdr() == -2) { + sl_send_reply("403", "Forbidden User"); + exit; + } + </programlisting> + </example> + </section> + + <section id="secfilter.f.secf_check_name"> + <title> + <function moreinfo="none">secf_check_name_[from|to|contact]_hdr()</function> + </title> + <para> + These three functions (<emphasis>secf_check_name_from_hdr</emphasis>, + <emphasis>secf_check_name_to_hdr</emphasis>, and + <emphasis>secf_check_name_contact_hdr</emphasis>) check only the + <emphasis>name</emphasis> part of the respective SIP URI. + </para> + <para>Return values:</para> + <itemizedlist> + <listitem> 2 = name is whitelisted</listitem> + <listitem> 1 = name not found (neutral)</listitem> + <listitem>-1 = error (parsing failed)</listitem> + <listitem>-2 = name is blacklisted</listitem> + </itemizedlist> + <example> + <title><function>secf_check_name_from_hdr</function> usage</title> + <programlisting format="linespecific"> + if (secf_check_name_from_hdr() == -2) { + sl_send_reply("403", "Forbidden name"); + exit; + } + </programlisting> + </example> + </section> + + <section id="secfilter.f.secf_check_domain"> + <title> + <function moreinfo="none">secf_check_domain_[from|to|contact]_hdr()</function> + </title> + <para> + These three functions (<emphasis>secf_check_domain_from_hdr</emphasis>, + <emphasis>secf_check_domain_to_hdr</emphasis>, and + <emphasis>secf_check_domain_contact_hdr</emphasis>) check only the + <emphasis>domain</emphasis> part of the respective SIP URI. + </para> + <para>Return values:</para> + <itemizedlist> + <listitem> 2 = domain is whitelisted</listitem> + <listitem> 1 = domain not found (neutral)</listitem> + <listitem>-1 = error (parsing failed)</listitem> + <listitem>-2 = domain is blacklisted</listitem> + </itemizedlist> + <example> + <title><function>secf_check_domain_from_hdr</function> usage</title> + <programlisting format="linespecific"> + if (secf_check_domain_from_hdr() == -2) { + sl_send_reply("403", "Forbidden domain"); + exit; + } + </programlisting> + </example> + </section> + <title>RPC commands</title> <section id="secfilter.r.reload"> _______________________________________________ Kamailio - Development Mailing List -- [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!
