Module: kamailio
Branch: master
Commit: 4d2e1172be1184666275cacb7481dd691071954d
URL:
https://github.com/kamailio/kamailio/commit/4d2e1172be1184666275cacb7481dd6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-03-28T08:28:15+02:00
phonenum: documentation for phonenum_match_cn()
---
Modified: src/modules/phonenum/doc/phonenum_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/4d2e1172be1184666275cacb7481dd6…
Patch:
https://github.com/kamailio/kamailio/commit/4d2e1172be1184666275cacb7481dd6…
---
diff --git a/src/modules/phonenum/doc/phonenum_admin.xml
b/src/modules/phonenum/doc/phonenum_admin.xml
index 16e85c5766..8715e821c1 100644
--- a/src/modules/phonenum/doc/phonenum_admin.xml
+++ b/src/modules/phonenum/doc/phonenum_admin.xml
@@ -68,7 +68,7 @@
</section>
<section>
<title>Parameters</title>
- <section>
+ <section id="phonenum.p.smode">
<title><varname>smode</varname> (int)</title>
<para>
Phone number search mode.
@@ -92,7 +92,7 @@ modparam("phonenum", "smode", 0)
<section>
<title>Functions</title>
- <section>
+ <section id="phonenum.f.phonenum_match">
<title>
<function moreinfo="none">phonenum_match(num, pvc)</function>
</title>
@@ -122,7 +122,37 @@ if(phonenum_match("1-484-555-8888", "src")) {
</programlisting>
</example>
</section>
-
+ <section id="phonenum.f.phonenum_match_cn">
+ <title>
+ <function moreinfo="none">phonenum_match(num, cnc,
pvc)</function>
+ </title>
+ <para>
+ Match num against the libphonenumber and set the attributes inside
+ the pvc container, restricting the rules with a country name code
+ (two letter, e.g: "DE", "US", "ES"). The function has to
be called
+ before accessing a key via: $phn(pvc=>key).
+ </para>
+ <para>
+ The parameters can be static strings or strings with variables.
+ </para>
+ <para>
+ It can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>phonenum_match_cn</function> usage</title>
+ <programlisting format="linespecific">
+...
+if(phonenum_match_cn("1-484-555-8888", "US", "src")) {
+ if($phn(src=>valid)==1) {
+ xlog("number normalized to: $phn(src=>normalized)\n");
+ } else {
+ xlog("number normalization error: $phn(src=>error)\n");
+ }
+}
+...
+</programlisting>
+ </example>
+ </section>
</section>
<section>