← Volver al índice de módulos

alias_db

The ALIAS_DB module can be used as an alternative for user aliases via usrloc. The main feature is that it does not store all adjacent data as for user location and always uses the database for search
🔀 Enrutamiento y Proxy SIP Kamailio 6.1 16 parámetros 6 funciones

Descripción general

The ALIAS_DB module can be used as an alternative for user aliases via usrloc. The main feature is that it does not store all adjacent data as for user location and always uses the database for search (no memory caching). A common use case is to provide additional user aliases, i.e. to supplement the registration in the location database. Users are this way on a proxy reachable with several request URIs. As the module uses no memory caching the lookup is a bit slower but the data provisioning is easier. With very fast databases like MySQL the speed penalty can be lowered. Also, the search can be performed on different tables in the same script.

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

Parámetros de configuración

ParámetroTipoDescripción
db_url str 3.2. user_column (str) 3.3. domain_column (str) 3.4. alias_user_column (str) 3.5. alias_domain_column (str) 3.6. use_domain (int) 3.7. domain_prefix (str) 3.8. append_branches (int)
user_column str 3.3. domain_column (str) 3.4. alias_user_column (str) 3.5. alias_domain_column (str) 3.6. use_domain (int) 3.7. domain_prefix (str) 3.8. append_branches (int)
domain_column str 3.4. alias_user_column (str) 3.5. alias_domain_column (str) 3.6. use_domain (int) 3.7. domain_prefix (str) 3.8. append_branches (int)
alias_user_column str 3.5. alias_domain_column (str) 3.6. use_domain (int) 3.7. domain_prefix (str) 3.8. append_branches (int)
alias_domain_column str 3.6. use_domain (int) 3.7. domain_prefix (str) 3.8. append_branches (int)
use_domain int 3.7. domain_prefix (str) 3.8. append_branches (int)
domain_prefix str 3.8. append_branches (int)
append_branches int 3.1. db_url (str)
db_url str Database URL.
user_column str Name of the column storing username.
domain_column str Name of the column storing user's domain.
alias_user_column str Name of the column storing alias username.
alias_domain_column str Name of the column storing alias domain.
use_domain int Specifies whether to use or not the domain from R-URI when searching for alias. If set to 0, the domain from R-URI is not used, if set to 1 the domain from R-URI is used.
domain_prefix str Specifies the prefix to be stripped from the domain in R-URI before doing the search.
append_branches int If the alias resolves to many SIP IDs, the first is replacing the R-URI, the rest are added as branches.

Funciones exportadas

alias_db_lookup(table_name[, flags])

4.2. alias_db_find(table_name, input, output[, flags])

alias_db_find(table_name, input, output[, flags])

4.1. alias_db_lookup(table_name[, flags])

alias_db_lookup(table_name[, flags])

The function takes the R-URI and search to see whether it is an alias or not. If it is an alias for a local user, the R-URI is replaced with user's SIP uri.

alias_db_lookup()

usage ... alias_db_lookup("dbaliases", "rd"); alias_db_lookup("dba_$(rU{s.substr,0,1})"); ...

alias_db_find(table_name, input, output[, flags])

The function is very similar to alias_db_lookup(), but instead of using fixed input (RURI) and output (RURI) is able to get the input SIP URI from a pseudo-variable and place the result back also in a pseudo-variable.

alias_db_find()

usage ... # do reverse alias lookup and find the alias for the FROM URI alias_db_find("dbaliases" , "$fu", "$avp(from_alias)", "r"); ...

Autores y contribuidores

Daniel-Constantin Mierla <miconda@gmail.com>Elena-Ramona Modroiu <ramona@asipto.com>

Copyright © 2005 Voice Sistem SRL
Copyright © 2008 asipto.com

Módulos relacionados

acc acc_diameter acc_json acc_radius app_jsdt carrierroute cfgt cfgutils