Discussion:
[SR-Users] Syntax help in comparison of values of variables
aawaise
2014-06-26 08:05:36 UTC
Permalink
I need some help regarding syntax. Can we put some comparisons on the values
of these variables like

if ("$ru"=="$fu")
{xlog("both are same")};

If this is not the way then what is the way to do so ??




--
View this message in context: http://sip-router.1086192.n5.nabble.com/Syntax-help-in-comparison-of-values-of-variables-tp128655.html
Sent from the Users mailing list archive at Nabble.com.
Daniel-Constantin Mierla
2014-06-26 08:09:55 UTC
Permalink
Hello,
Post by aawaise
I need some help regarding syntax. Can we put some comparisons on the values
of these variables like
if ("$ru"=="$fu")
remove the double quotes, because they are considered static string in
the form you used above. It should be:

if($ru==$fu)


because $fu and $ru are config variables and they should be used without
double-quotes in expressions.

Cheers,
Daniel
Post by aawaise
{xlog("both are same")};
If this is not the way then what is the way to do so ??
--
View this message in context: http://sip-router.1086192.n5.nabble.com/Syntax-help-in-comparison-of-values-of-variables-tp128655.html
Sent from the Users mailing list archive at Nabble.com.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Loading...