Table of Contents
List of Examples
shvset
parameter usagevarset
parameter usageshv_set
usageshv_get
usageThis module collects the core pseudo-variables that can be used in configuration file. They are listed in Dokuwiki: http://www.kamailio.org/dokuwiki/, in Pseudo-Variables section
The following modules must be loaded before this module:
No dependencies on other Kamailio modules.
Set the value of a shared variable ($shv(name)). The parameter can be set many times.
The value of the parameter has the format: _name_ '=' _type_ ':' _value_
_name_: shared variable name
_type_: type of the value
“i”: integer value
“s”: string value
_value_: value to be set
Default value is “NULL”.
Example 1.1. shvset
parameter usage
... modparam("pv", "shvset", "debug=i:1") modparam("pv", "shvset", "pstngw=s:sip:10.10.10.10") ...
Set the value of a script variable ($var(name)). The parameter can be set many times.
The value of the parameter has the format: _name_ '=' _type_ ':' _value_
_name_: shared variable name
_type_: type of the value
“i”: integer value
“s”: string value
_value_: value to be set
Default value is “NULL”.
Example 1.2. varset
parameter usage
... modparam("pv", "varset", "init=i:1") modparam("pv", "varset", "gw=s:sip:11.11.11.11;transport=tcp") ...
Set the value of a shared variable ($shv(name)).
Parameters:
_name_: shared variable name
_type_: type of the value
“int”: integer value
“str”: string value
_value_: value to be set
MI FIFO Command Format:
:shv_set:_reply_fifo_file_ _name_ _type_ _value_ _empty_line_
Get the value of a shared variable ($shv(name)).
Parameters:
_name_: shared variable name. If this parameter is missing, all shared variables are returned.
MI FIFO Command Format:
:shv_get:_reply_fifo_file_ _name_ _empty_line_