Table of Contents
setsflag(flag)
issflagset(flag)
resetsflag(flag)
setbflag(flag [, branch])
isbflagset(flag [, branch])
resetsflag(flag [, branch])
km_append_branch([uri])
setdsturi(uri)
resetdsturi()
isdsturiset()
pv_printf(var, str)
is_myself(uri)
setdebug(level)
resetdebug()
List of Examples
setsflag
usagesetsflag
usageresetsflag
usagesetbflag
usagesetbflag
usageresetsflag
usagesetdsturi
usageresetdsturi
usageisdsturiset
usagepv_printf
usageis_myself
usagesetdebug
usageresetdebug
usageTable of Contents
setsflag(flag)
issflagset(flag)
resetsflag(flag)
setbflag(flag [, branch])
isbflagset(flag [, branch])
resetsflag(flag [, branch])
km_append_branch([uri])
setdsturi(uri)
resetdsturi()
isdsturiset()
pv_printf(var, str)
is_myself(uri)
setdebug(level)
resetdebug()
This module collects extensions from Kamailio core.
Kamailio Core CookBook is available at: http://kamailio.org/dokuwiki/
The following modules must be loaded before this module:
No dependencies on other Kamailio modules.
Set the script flag.
Meaning of the parameters is as follows:
flag - the index of the script flag to be set. Can be integer or pseudo-variable with integer value.
This function can be used from ANY_ROUTE.
Return true of the script flag is set.
Meaning of the parameters is as follows:
flag - the index of the script flag to be tested. Can be integer or pseudo-variable with integer value.
This function can be used from ANY_ROUTE.
Reset the script flag.
Meaning of the parameters is as follows:
flag - the index of the script flag to be reset. Can be integer or pseudo-variable with integer value.
This function can be used from ANY_ROUTE.
Set the branch flag.
Meaning of the parameters is as follows:
flag - the index of the branch flag to be set. Can be integer or pseudo-variable with integer value.
branch - the index of the branch whose flag to be set. Can be integer or pseudo-variable with integer value. If omitted, then branch 0 is used (R-URI).
This function can be used from ANY_ROUTE.
Example 1.4. setbflag
usage
... setbflag("1"); ... $var(flag) = 11; setbflag("$var(flag)", "1"); ...
Return true of the branch flag is set.
Meaning of the parameters is as follows:
flag - the index of the branch flag to be tested. Can be integer or pseudo-variable with integer value.
branch - the index of the branch whose flag to be set. Can be integer or pseudo-variable with integer value. If omitted, then branch 0 is used (R-URI).
This function can be used from ANY_ROUTE.
Reset the script flag.
Meaning of the parameters is as follows:
flag - the index of the script flag to be reset. Can be integer or pseudo-variable with integer value.
branch - the index of the branch whose flag to be set. Can be integer or pseudo-variable with integer value. If omitted, then branch 0 is used (R-URI).
This function can be used from ANY_ROUTE.
It was replaced by append_branch() from corex module, starting with version 3.4.0.
Set the destination address URI (outbound proxy address).
Meaning of the parameters is as follows:
uri - Valid SIP URI representing the address where to send the request. It must be a static string, no variables are evaluated at runtime. If you need to set outbound proxy address via a variable, use assginment to $du.
This function can be used from ANY_ROUTE.
Reset the destination address URI (outbound proxy address).
This function can be used from ANY_ROUTE.
Check if the destination address URI (outbound proxy address) is set.
This function can be used from ANY_ROUTE.
Evalues the str and sets the resulted value to variable var. For backward compatibility reasons, same function can be executed via 'avp_printf(var, str)'.
Meaning of the parameters is as follows:
var - name of a writable variable
str - string that may contain variables which will be evaluated at runtime.
This function can be used from ANY_ROUTE.
Example 1.10. pv_printf
usage
... pv_printf("$ru", "sip:$rU@$fd"); pv_printf("$avp(x)", "From: $fU - To: $tU"); ...
Check if the parameter matches the 'myself' condition (i.e., is a local IP or domain).
Meaning of the parameters is as follows:
uri - Valid SIP URI or IP address to check against the list of local IP addresses or domains. The parameter value can contain pseudo-variables.
This function can be used from ANY_ROUTE.
Set the debug log level per process.
Meaning of the parameters is as follows:
level - the debug log level to be set. Can be integer or pseudo-variable with integer value.
This function can be used from ANY_ROUTE.
Print command line arguments.
Name: arg
Parameters: none.
MI FIFO Command Format:
:arg:_reply_fifo_file_ _empty_line_
Kill the application.
Name: kill
Parameters: none.
MI FIFO Command Format:
:kill:_reply_fifo_file_ _empty_line_
Print working directory.
Name: pwd
Parameters: none.
MI FIFO Command Format:
:pwd:_reply_fifo_file_ _empty_line_
Print uptime.
Name: uptime
Parameters: none.
MI FIFO Command Format:
:uptime:_reply_fifo_file_ _empty_line_
Print version information.
Name: version
Parameters: none.
MI FIFO Command Format:
:version:_reply_fifo_file_ _empty_line_
Print list of available MI commands.
Name: which
Parameters: none.
MI FIFO Command Format:
:which:_reply_fifo_file_ _empty_line_
Print the list of available internal statistics.
Name: get_statistics
Parameters: statsid - which statistics to be printed. If set to 'all' then all statistics are printed; if set to 'statsgroup:' then all statistics in the group are printed; if set to 'statsname' then the statistics identified by the name is printed.
MI FIFO Command Format:
:get_statistics:_reply_fifo_file_ _statsid_ _empty_line_
Reset internal statistics.
Name: reset_statistics
Parameters: statsid - which statistics to be reset, give as name.
MI FIFO Command Format:
:reset_statistics:_reply_fifo_file_ _statsid_ _empty_line_
Print private memory (pkg) usage statistics per process. It can take optinally a filter to print statistics only for a specific process or set of processes. If no filter is given, it prints statistics for all processes.
The filter can be:
pid value - print statistics for specific process pid.
rank value - print statistics for specific process rank.
index value - print statistics for specific index in process table.
Examples:
kamcmd pkg.stats kamcmd pkg.stats pid 1234 kamcmd pkg.stats rank 1 kamcmd pkg.stats index 10