[SR-Users] Inconsistent string interpolation
neuhaus at tyntec.com
Thu Oct 1 11:56:01 CEST 2015
I'm occasionally running into issues with inconsistent string
interpolation in the kamailio.cfg.
Here's the latest example. Take this line:
$var(x) = "sip:+$var(abc)-$var(def)-$si@$Ri:$Rp";
Here, the values of the variables will NOT be interpolated into the
string. Instead, I have to use this:
$var(x) = "sip:+" + $var(abc) + "-" + $var(def) + "-" + $si + "@" + $Ri
+ ":" + $Rp;
However, when I have an instruction such as:
Then string interpolation takes place (i.e. the value of $var(x) is put
into the string.
This is very confusing and error prone. Is it something that can be
fixed? The behaviour should be consistent.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: OpenPGP digital signature
More information about the sr-users