[OpenSIPS-Users] Boolean values from DB and avp
vladpaiu at opensips.org
Mon Feb 23 15:58:54 CET 2015
In OpenSIPS, AVPs can have either integer or string values.
For boolean values in Postgres, the module internally stores them as
strings, so you will either get 't' or 'f' in your script - so yes, it's
an OpenSIPS restriction in some ways.
On 23.02.2015 16:36, Patrick Wakano wrote:
> Hello list,
> I've been using Opensips 11.3.1 with a Postgres DB 9.1 and noticed
> that if I perform an avp_db_query call to retrieve any boolean value
> from DB, the result gives me an avp with a string and not the boolean
> value. For instance if I have any false value in my DB, my
> avp_db_query gives me an avp with the string value "f" and not the
> boolean value false.
> Is this behaviour due to some misconfiguration in my DB or Opensips,
> or is it an Opensips restriction? The docs shows "The value type of
> the AVP (string or integer) will be derived from the type of the
> columns." but have no mention to boolean...
> Users mailing list
> Users at lists.opensips.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users