You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
boolean - aliases to 1 (true, on, yes) or 0 (false, off, no)
Moreover the if() and while() statement can accept a number as condition. My expectation was that passing non-zero is always converted to true, but this is not correct.
Please document how numbers are converted to booleans in case of if() and while() conditions.
The text was updated successfully, but these errors were encountered:
henningw
changed the title
Unclear conversion from number to boolean
Extend documentation for conversion from number to boolean in core cookbook
Dec 18, 2022
Thanks for the issue. I marked it as enhancement request, which will be closed after some time if no developer started to work on it.
If you want to generally discuss it, please use the sr-users mailing list.
According to https://www.kamailio.org/wikidocs/cookbooks/devel/core/ (Core Cookbook) type boolean is documented as:
Moreover the if() and while() statement can accept a number as condition. My expectation was that passing non-zero is always converted to true, but this is not correct.
Please document how numbers are converted to booleans in case of if() and while() conditions.
The text was updated successfully, but these errors were encountered: