- configuration variables can be declared in the script:
authorMiklos Tirpak <miklos@iptel.org>
Thu, 24 Jan 2008 15:36:56 +0000 (15:36 +0000)
committerMiklos Tirpak <miklos@iptel.org>
Thu, 24 Jan 2008 15:36:56 +0000 (15:36 +0000)
commit140137c9e8edd412bb3279d5a7027c8aff06e48d
tree7e2a8155cfa7aad182aef6d4c614ebdc7cf5e126
parent35ab13d8b15a3f1be4ba911372dbdb09b817f833
- configuration variables can be declared in the script:
<group_name>.<var_name> = <value> [descr <description>]
- free the list of cfg groups during exit

It is possible to declare new config variables in the script,
and retrieve them via select calls. The variables behave the same
way as the core or module variables, they are constant during
message processing, and they can be modified by the cfg drivers,
for example via RPC calls.

gateway.destination = "127.0.0.1" descr "IP addr of the gateway"
gateway.enabled = 1 descr "enable/disable the gateway"

route[0] {
...
if (@cfg_get.gateway.enabled == 1) {
xlset_destination("<sip:%@cfg_get.gateway.destination>");
}
...
}
cfg.lex
cfg.y
cfg/cfg.c
cfg/cfg.h
cfg/cfg_ctx.c
cfg/cfg_ctx.h
cfg/cfg_script.c [new file with mode: 0644]
cfg/cfg_script.h [new file with mode: 0644]
cfg/cfg_struct.c
cfg/cfg_struct.h