Module: kamailio
Branch: master
Commit: ee191ccd01ec6391c715e22efed2dc6581fe9d72
URL:
https://github.com/kamailio/kamailio/commit/ee191ccd01ec6391c715e22efed2dc6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-01-18T09:29:21+01:00
kex: docs for is_myhost()
---
Modified: src/modules/kex/doc/kex_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/ee191ccd01ec6391c715e22efed2dc6…
Patch:
https://github.com/kamailio/kamailio/commit/ee191ccd01ec6391c715e22efed2dc6…
---
diff --git a/src/modules/kex/doc/kex_admin.xml b/src/modules/kex/doc/kex_admin.xml
index 91080d8c1db..9f99e6a6bc4 100644
--- a/src/modules/kex/doc/kex_admin.xml
+++ b/src/modules/kex/doc/kex_admin.xml
@@ -360,7 +360,8 @@ pv_printf("$avp(x)", "From: $fU - To: $tU");
<listitem>
<para>
<emphasis>uri</emphasis> - Valid SIP URI or IP address to
- check against the list of local IP addresses or domains.
+ check against the list of local IP addresses or domains, matching
+ as well the port and protocol if they are provided.
The parameter value can contain pseudo-variables.
</para>
</listitem>
@@ -376,6 +377,37 @@ if(is_myself("$fu")) {
...
}
...
+</programlisting>
+ </example>
+ </section>
+ <section id="kex.f.is_myhost">
+ <title><function
moreinfo="none">is_myhost(uri)</function></title>
+ <para>
+ Check if the host part of the parameter matches a local domain
+ or IP address.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>uri</emphasis> - Valid SIP URI, hostname of IP address to
+ check against the list of local IP addresses or domains. If it
+ is a SIP URI, the port and protocol are ignored.
+ The parameter value can contain pseudo-variables.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>is_myhost</function> usage</title>
+ <programlisting format="linespecific">
+...
+if(is_myhost("$tu")) {
+ ...
+}
+...
</programlisting>
</example>
</section>
@@ -992,4 +1024,3 @@ Module: kex
</section>
</chapter>
-