<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    the parameters are expected to be variables, but looking at the log
    messages it seems that config optimization replace them with the
    string values, at you have the assignment just above the function,
    the parameters will be those string values always at runtime.<br>
    <br>
    Can you remove the assign statements and try again to see if starts
    ok?<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 8/14/12 1:11 AM, Ron Hopson wrote:<br>
    </div>
    <blockquote cite="mid:502989A5.8000908@netweave.com" type="cite">Hello,
      <br>
      <br>
      I cannot create a configuration consistent with uac_reg_lookup.
      Does someone have a configuration with a simple example of
      uac_reg_lookup that works with db_text file uacreg?
      <br>
      <br>
      I have kamailio 3.3 running on linux.&nbsp; Based on suggestions in
      <br>
      <a class="moz-txt-link-freetext" href="http://kamailio.org/docs/modules/3.3.x/modules_k/uac.html">http://kamailio.org/docs/modules/3.3.x/modules_k/uac.html</a>
      <br>
      and
      <br>
<a class="moz-txt-link-freetext" href="http://by-miconda.blogspot.com/2010/10/best-of-new-in-kamailio-310-10.html">http://by-miconda.blogspot.com/2010/10/best-of-new-in-kamailio-310-10.html</a>
      <br>
      I created this record in db_text file uacreg:
      <br>
2:12345678:daniel:mysipserver.com:daniel123:sipprovider.com:sipprovider.com:daniel123:xxxxx:<a class="moz-txt-link-rfc2396E" href="sip:sipprovider.com">"sip:sipprovider.com"</a>
      <br>
      <br>
      I assume that function uac_reg_lookup retrieves registration
      information from this record after it is loaded into a memory
      table.
      <br>
      One version of the configuration file is attached.&nbsp; Here are three
      examples of failures to create a configuration.
      <br>
      <br>
      &nbsp;&nbsp;&nbsp; $rU = 12345678;
      <br>
      <br>
      &nbsp;&nbsp;&nbsp; if(uac_reg_lookup("$rU", "$ru")){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #line 73
      <br>
      <br>
      &nbsp;0(13856) DEBUG: &lt;core&gt; [rvalue.c:2857]: RV fixing type 1
      <br>
      &nbsp;0(13856) DEBUG: &lt;core&gt; [rvalue.c:2861]: RV is int: 12345678
      <br>
      &nbsp;0(13856) DEBUG: &lt;core&gt; [rvalue.c:2857]: RV fixing type 4
      <br>
      &nbsp;0(13856) DEBUG: &lt;core&gt; [route.c:929]: fixing
      uac_reg_lookup()
      <br>
      &nbsp;0(13856) ERROR: &lt;core&gt; [route.c:1216]: fixing failed
      (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:73
      <br>
      ---------
      <br>
      &nbsp;&nbsp;&nbsp; $rU = "12345678";
      <br>
      <br>
      &nbsp;&nbsp;&nbsp; if(uac_reg_lookup("$rU", "$ru")){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #line 73
      <br>
      <br>
      &nbsp;0(13973) DEBUG: &lt;core&gt; [rvalue.c:2857]: RV fixing type 2
      <br>
      &nbsp;0(13973) DEBUG: &lt;core&gt; [rvalue.c:2865]: RV is str:
      "12345678"
      <br>
      &nbsp;0(13973) DEBUG: &lt;core&gt; [rvalue.c:2857]: RV fixing type 4
      <br>
      &nbsp;0(13973) DEBUG: &lt;core&gt; [route.c:929]: fixing
      uac_reg_lookup()
      <br>
      &nbsp;0(13973) ERROR: &lt;core&gt; [route.c:1216]: fixing failed
      (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:73
      <br>
      --------
      <br>
      &nbsp;&nbsp;&nbsp; $rU = "12345678";
      <br>
      &nbsp;&nbsp;&nbsp; $ru = <a class="moz-txt-link-rfc2396E" href="sip:mysipserver.com">"sip:mysipserver.com"</a>;
      <br>
      <br>
      &nbsp;&nbsp;&nbsp; if(uac_reg_lookup("$rU", "$ru")){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #line 74
      <br>
      <br>
      <br>
      &nbsp;0(13976) DEBUG: &lt;core&gt; [rvalue.c:2857]: RV fixing type 2
      <br>
      &nbsp;0(13976) DEBUG: &lt;core&gt; [rvalue.c:2865]: RV is str:
      "12345678"
      <br>
      &nbsp;0(13976) DEBUG: &lt;core&gt; [rvalue.c:2857]: RV fixing type 2
      <br>
      &nbsp;0(13976) DEBUG: &lt;core&gt; [rvalue.c:2865]: RV is str:
      <a class="moz-txt-link-rfc2396E" href="sip:mysipserver.com">"sip:mysipserver.com"</a>
      <br>
      &nbsp;0(13976) DEBUG: &lt;core&gt; [rvalue.c:2857]: RV fixing type 4
      <br>
      &nbsp;0(13976) DEBUG: &lt;core&gt; [route.c:929]: fixing
      uac_reg_lookup()
      <br>
      &nbsp;0(13976) ERROR: &lt;core&gt; [route.c:1216]: fixing failed
      (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:74
      <br>
      <br>
      ---------------------
      <br>
      regards,
      <br>
      Ron Hopson
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a>
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kpw">http://asipto.com/u/kpw</a></pre>
  </body>
</html>