<div dir="ltr">Thanks Vlad!<div><br></div><div>As an last annoying comment, I think it would be nice to apply this kind of boolean lexer to the DB queries too!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 12:15 PM, Vlad Paiu <span dir="ltr">&lt;<a href="mailto:vladpaiu@opensips.org" target="_blank">vladpaiu@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Hello,<br>
      <br>
      From the OpenSIPS lexer :<br>
      <br>
      YES                     &quot;yes&quot;|&quot;true&quot;|&quot;on&quot;|&quot;enable&quot;<br>
      NO                      &quot;no&quot;|&quot;false&quot;|&quot;off&quot;|&quot;disable&quot;<br>
      <br>
      All of them are equivalent, and are correspondent to integer 1 and
      respectively integer 0.<span class=""><br>
      <br>
      Best Regards,<br>
      <pre cols="72">Vlad Paiu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre></span><div><div class="h5">
      On 23.02.2015 17:09, Patrick Wakano wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">Thank you very much for the answer Vlad!
        <div><br>
        </div>
        <div>This raises me another question. I&#39;ve been using boolean
          values with avp and found no problem so far. For instance, I
          set $avp(test) = true, and then use it in an &quot;if&quot; clause and
          everything works fine! But I&#39;m really not sure if this is
          correct, and the docs are a little fuzzy regarding avp and
          boolean values. So can you clarify me what is the real support
          of boolean types in Opensips?</div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div>Patrick<br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Feb 23, 2015 at 11:58 AM, Vlad
          Paiu <span dir="ltr">&lt;<a href="mailto:vladpaiu@opensips.org" target="_blank">vladpaiu@opensips.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div>Hello,<br>
                <br>
                In OpenSIPS, AVPs can have either integer or string
                values.<br>
                For boolean values in Postgres, the module internally
                stores them as strings, so you will either get &#39;t&#39; or
                &#39;f&#39; in your script - so yes, it&#39;s an OpenSIPS
                restriction in some ways.<br>
                <br>
                Best Regards,<br>
                <pre cols="72">Vlad Paiu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre>
                <div>
                  <div> On 23.02.2015 16:36, Patrick Wakano
                    wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <div dir="ltr">Hello list,
                      <div><br>
                      </div>
                      <div>I&#39;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 &quot;f&quot; and not the boolean value false.</div>
                      <div>Is this behaviour due to some
                        misconfiguration in my DB or Opensips, or is it
                        an Opensips restriction? The docs shows &quot;The
                        value type of the AVP (string or integer) will
                        be derived from the type of the columns.&quot; but
                        have no mention to boolean...</div>
                      <div><br>
                      </div>
                      <div>Thanks,</div>
                      <div><br>
                      </div>
                      <div>Patrick</div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
            <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>