<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"><a
        href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">How
        to subscribe</a><br>
      <br>
      On 08/19/2012 07:19 PM, Ron Hopson wrote:<br>
    </div>
    <blockquote cite="mid:5031747A.50307@netweave.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Daniel,<br>
      <br>
      Thank you for your response.&nbsp; I was away the remainder of the past
      week.<br>
      <br>
      Calls to uac_reg_lookup() and uac_reg_request_to(), with prior
      assignment or no assignment, yield "fixing failed (code=-1)".&nbsp; For
      example,<br>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp; if(uac_reg_request_to("$rU", 0)){&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #line 76<br>
      <br>
      &nbsp;0(16293) DEBUG: &lt;core&gt; [route.c:929]: fixing
      uac_reg_request_to()<br>
      &nbsp;0(16293) ERROR: &lt;core&gt; [route.c:1216]: fixing failed
      (code=-1) at cfg:/usr/local/etc/kamailio/kamailio.cfg:76<br>
      <br>
      I am most interested in function uac_reg_request_to().&nbsp; I expect
      to receive a REGISTER command from a local user and forward it
      with proper credentials to a remote server.&nbsp; I believe
      uac_reg_request_to() will read (a memory image of) the uacreg file
      for the remote user's name and credentials, and manage
      registration at the remote server.&nbsp; Is this correct?<br>
      <br>
      I would like to lookup the registration information by $tU. Both
      of the following code snippets get "fixing failed".<br>
      (1) &nbsp;&nbsp;&nbsp; if(uac_reg_request_to("$tU", 0)){<br>
      and<br>
      (2)&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $rU = $tU;<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; if(uac_reg_request_to("$rU", 0)){<br>
      <br>
      Thank you for any hints or examples of how to use
      uac_reg_request_to().<br>
      <br>
      BTW:&nbsp; How do I become a member of <a moz-do-not-send="true"
        class="moz-txt-link-abbreviated"
        href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>?<br>
      <br>
      regards,<br>
      Ron Hopson<br>
      <br>
      <div class="moz-cite-prefix">On 8/14/2012 12:59 AM,
        Daniel-Constantin Mierla wrote:<br>
      </div>
      <blockquote cite="mid:5029F76D.6090903@gmail.com" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        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 moz-do-not-send="true" 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 moz-do-not-send="true" 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
            moz-do-not-send="true" 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 moz-do-not-send="true"
            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
            moz-do-not-send="true" 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 moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" 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 moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" 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 moz-do-not-send="true" 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 moz-do-not-send="true" class="moz-txt-link-freetext" href="http://asipto.com/u/kpw">http://asipto.com/u/kpw</a></pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>