[OpenSIPS-Users] variable interpolation in strings
liviu at opensips.org
Wed Mar 31 16:38:31 EST 2021
On 31.03.2021 19:34, Kingsley Tart wrote:
> Why does this code:
> $var(oldstr) ="sip:_44*121-1234@";
> $var(uriOLD) = "<$var(oldstr)batty.com;user=phone>";
> Result in these log entries?
This issue has been in there since forever, catching many of us (myself
included) off-guard at times. For now, the solution is to just
concatenate strings in variable assignment expressions using the "+"
$var(uriOLD) = "<" + $var(oldstr) + "batty.com;user=phone>";
As for when or if this is going to be addressed... is subject to a longer discussion...
www.twitter.com/liviuchircu | www.opensips-solutions.com
OpenSIPS eBootcamp 2021 | www.opensips.org/training
More information about the Users