← Volver al índice de módulos

phonenum

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.
🛠️ Utilidades y Varios Kamailio 6.1 4 parámetros 4 funciones

Descripción general

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.

Documentación oficial: https://www.kamailio.org/docs/modules/stable/modules/phonenum.html
Código fuente: https://github.com/kamailio/kamailio/tree/master/src/modules/phonenum

Parámetros de configuración

ParámetroTipoDescripción
smode int 3.2. resid (str)
resid str 3.1. smode (int)
smode int Phone number search mode (not in use yet).
resid str Preregister result container id during initialization, enabling the use of the module in KEMI scripts. In native kamailio.cfg file, registration is done when parsing config and finding variables.

Funciones exportadas

phonenum_match(num, pvc)

4.2. phonenum_match_cn(num, cnc, pvc)

phonenum_match_cn(num, cnc, pvc)

4.1. phonenum_match(num, pvc)

phonenum_match(num, pvc)

Match num against the libphonenumber and set the attributes inside the pvc result container. The function has to be called before accessing a key via: $phn(pvc=>key).

phonenum_match_cn(num, cnc, pvc)

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).

Autores y contribuidores

Daniel-Constantin MierlaDaniel-Constantin Mierla <miconda@gmail.com>

Copyright © 2017 Daniel-Constantin Mierla (asipto.com)

Módulos relacionados

auth_web3 auth_xkeys avp avpops benchmark blst call_control call_obj