[SR-Users] How to define variable as string explicitly

Mino Haluz mino.haluz at gmail.com
Wed Jun 12 12:10:47 CEST 2013


Hi,

I need to define variables as string explicitly.

What I have in the code:

in prefix_list is 123,456,789
$var(matched_prefix) = $(var(prefix_list){s.select,$var(i),,});

then in MAIN route:

$var(matched_prefix) = route(INCOMING_AUTH);

and this check

if ($var(matched_prefix) != "nullprefix")

returns:

WARNING: <core> [rvalue.c:1012]: automatic string to int conversion for
"nullprefix" failed
WARNING: <core> [rvalue.c:1916]: rval expression conversion to int failed
(153,32-153,43)

I would like to have all values as string to avoid these errors.

Thanks,
Mino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130612/c50637e5/attachment.html>


More information about the sr-users mailing list