<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><tt>Hi Miguel,<br>
        <br>
        Have you looked at the lookup() function from the registrar
        module ?<br>
        &nbsp;&nbsp;&nbsp;
        <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294366">http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294366</a><br>
        <br>
        Regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 19.06.2014 12:48, Miguel Oyarzo wrote:<br>
    </div>
    <blockquote
cite="mid:CA+d2mV-+nyjgiN3g2gMFOaKmkTqyMioiYx5fNWw=sVOPSuYv4w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>Hi,<br>
                <br>
              </div>
              What is the best way to read a data from the location
              database?<br>
            </div>
            <div>I'm using postgreSQL.<br>
              <br>
            </div>
            <div><br>
            </div>
            E.g. Assuming there is a registered user:<br>
            <br>
            if (is_method("INVITE")) {<br>
          </div>
          &nbsp; &nbsp; $var(x)=read_data_from_location(" select contact where
          user='71000' ");<br>
          &nbsp;&nbsp;&nbsp; ...<br>
        </div>
        &nbsp;&nbsp;&nbsp; // do something with $var(x)
        <div>&nbsp;&nbsp;&nbsp; ..<br>
          &nbsp;&nbsp;&nbsp; ..<br>
          }<br>
          <div>
            <br>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>Thanks,<br clear="all">
                      </div>
                      <div><br>
                        -- <br>
                        <div dir="ltr">
                          <div><span
style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">"Efficiency
                              is doing things right; effectiveness is
                              doing the right things</span><span
style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span
style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
                                (Peter Drucker)</span>"<br>
                            </span></div>
                          <br>
                          <div><span
style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Miguel
                              Oyarzo</span><br
style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
                            <span
style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">DevOps
                              &amp; VoIP Engineer</span><br
style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
                            <span
style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Linux
                              User: # 483188 -&nbsp;</span><font
                              color="#888888" face="arial, sans-serif"><a
                                moz-do-not-send="true"
                                href="http://counter.li.org"
                                target="_blank">counter.li.org</a></font><br
style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
                            <span
                              style="background-color:rgb(255,255,255)"><font
                                color="#888888" face="arial, sans-serif"><a
                                  moz-do-not-send="true"
                                  href="http://au.linkedin.com/in/mikeaustralia"
                                  target="_blank">http://au.linkedin.com/in/mikeaustralia</a>&nbsp;</font><br>
                              <font color="#888888" face="arial,
                                sans-serif">Melbourne, Australia</font></span>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>