i stored timeouts to local cfg variables and tried to set them with
t_set_fr:
xlog("about to set fr to
$sel(cfg_get.local.invite_timeout)/$sel(cfg_get.local.gw_timeout)\n");
t_set_fr("$sel(cfg_get.local.invite_timeout)",
"$sel(cfg_get.local.gw_timeout)");
xlog("after setting fr\n");
unfortunately, the above t_set_fr results in syslog error:
Mar 30 21:05:10 localhost /usr/sbin/sip-proxy[31365]: ERROR: about to set fr to
75000/3000
Mar 30 21:05:10 localhost /usr/sbin/sip-proxy[31365]: ERROR: <core>
[sr_module.c:1546]: Could not convert PV to int
Mar 30 21:05:10 localhost /usr/sbin/sip-proxy[31365]: ERROR: after setting fr
why is that? the two local cfg variables have been set to int values
and no conversion should be needed:
Mar 30 21:05:00 localhost /usr/sbin/sip-proxy[31367]: INFO: Handling XMLRPC POST from
<127.0.0.1> with body <<?xml version="1.0"
?><methodCall><methodName>cfg.set_now_int</methodName><params><param><value><string>local</string></value></param><param><value><string>invite_timeout</string></value></param><param><value><int>75000</int></value></param></params></methodCall>>
Mar 30 21:05:00 localhost /usr/sbin/sip-proxy[31367]: INFO: <core>
[cfg/cfg_ctx.c:411]: INFO: cfg_set_now(): local.invite_timeout has been changed to 75000
Mar 30 21:05:03 localhost /usr/sbin/sip-proxy[31363]: INFO: Handling XMLRPC POST from
<127.0.0.1> with body <<?xml version="1.0"
?><methodCall><methodName>cfg.set_now_int</methodName><params><param><value><string>local</string></value></param><param><value><string>gw_timeout</string></value></param><param><value><int>3000</int></value></param></params></methodCall>>
Mar 30 21:05:03 localhost /usr/sbin/sip-proxy[31363]: INFO: <core>
[cfg/cfg_ctx.c:411]: INFO: cfg_set_now(): local.gw_timeout has been changed to 3000
this is with current master branch.
-- juha
ps. it took a while before i found where the error comes from because
there is no script line number in the message.