Table of Contents
List of Examples
timeout
parameterserver
parameterpdb_query
usagepdb.status
usagepdb.activate
usagepdb.deactivate
usageTable of Contents
This is a module for fast number portability handling. The client is this module and the server exists in the /utils/pdbt directory. The PDB module and server supports load-balancing and aggressive timeouts. Normally it does not need more than a few ms to query the remote server and return the reply to the configuration script.
The pdb module allows Kamailio to send queries to a list of servers and store the answer in an AVP. The idea is to ask all servers in parallel and use the first answer, that comes back. A timeout for the query can be defined in milliseconds. The querying can be activated and deactivated using FIFO commands.
More about the new communication protocol between this module and pdb_server can be found in utils/pdbt/docs/network_protocol.txt. The current version is 1.
The module depends on the following modules (in the other words the listed modules must be loaded before this module):
none
This is the timeout in milliseconds for the pdb_query function.
Default value is “50”.
Sends the query string to all configured servers and stores the answer in dstavp. If it takes more than the configured timeout, false is returned. Pseudo-variables or AVPs can be used for the query string. The answer must consist of the null terminated query string followed by a two byte integer value in network byte order. The integer value will be stored in the given AVP.
Example 1.3. pdb_query
usage
... # query external service for routing information if (!pdb_query("$rU", "$avp(i:82)")) $avp(i:82) = 0; # default routing } cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id"); ...
Prints the status of the module. This can either be "active" or "deactivated".
Activates the module. This is the default after loading the module.