/usr/share/doc/kamailio/modules/README.phonenum is in kamailio-phonenum-modules 5.1.2-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | PHONENUM Module
Daniel-Constantin Mierla
asipto.com
Edited by
Daniel-Constantin Mierla
<miconda@gmail.com>
Copyright © 2017 Daniel-Constantin Mierla (asipto.com)
__________________________________________________________________
Table of Contents
1. Admin Guide
1. Overview
2. Dependencies
2.1. Kamailio Modules
2.2. External Libraries or Applications
3. Parameters
3.1. smode (int)
4. Functions
4.1. phonenum_match(num, pvc)
5. Pseudo Variables
List of Examples
1.1. Set smode parameter
1.2. phonenum_match usage
Chapter 1. Admin Guide
Table of Contents
1. Overview
2. Dependencies
2.1. Kamailio Modules
2.2. External Libraries or Applications
3. Parameters
3.1. smode (int)
4. Functions
4.1. phonenum_match(num, pvc)
5. Pseudo Variables
1. Overview
This module allows real-time queries against the libphonenumber to be
performed from the config script. With that it is possible to get
normalize and get details about a phone number.
More details about libphonenumber can be found at
https://github.com/googlei18n/libphonenumber.
This module exports a new class of pseudo-variables - $phn(pvc=>key) -
to enable access to the results of a query to the database.
Many queries can be done and store results in different containers to
be able to use in parallel.
2. Dependencies
2.1. Kamailio Modules
2.2. External Libraries or Applications
2.1. Kamailio Modules
The following modules must be loaded before this module:
* none.
2.2. External Libraries or Applications
The following libraries or applications must be installed before
running Kamailio with this module loaded:
* libphonenumber - the phone number library.
3. Parameters
3.1. smode (int)
3.1. smode (int)
Phone number search mode.
Default value is "0".
Example 1.1. Set smode parameter
...
modparam("phonenum", "smode", 0)
...
4. Functions
4.1. phonenum_match(num, pvc)
4.1. phonenum_match(num, pvc)
Match num against the libphonenumber and set the attributes inside the
pvc container. The function has to be called before accessing a key
via: $phn(pvc=>key).
The parameters can be static strings or strings with variables.
It can be used from ANY_ROUTE.
Example 1.2. phonenum_match usage
...
if(phonenum_match("1-484-555-8888", "src"))
xlog("number normalized to: $phn(src=>num)\n");
...
5. Pseudo Variables
* $phn(pvc=>key) - pvc is an identifier for this query result; it is
designated by the second parameter of phonenum_match(). The key can
be one of the following:
+ number - normalized phone number
+ country - country for phone number
+ region - region for phone number
+ operator - operator for phone number
Exported pseudo-variables are documented at
https://www.kamailio.org/wiki/.
|