<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">Hello Rik,<br>
      <br>
      Basically, "registered" is just a way of doing a "lookup" but
      without overwriting the R-URI. So to me it should also populate
      the <i>attributes</i> avp, if it's defined.<br>
      <br>
      Moreover, this is the best way you can achieve what you want,
      since the usrloc module stores its keys in a way which optimizes
      subsequent lookups. (using an AVL tree)<br>
      <br>
      I just committed a patch for the "registered" function. It will
      now also populate the AVP. (also on 1.10)<br>
      <br>
      Best regards,
      <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 10/02/2013 12:12 PM, Rik Broers wrote:<br>
    </div>
    <blockquote
cite="mid:685BED81F9FCC7418ACC487ECF36B7E919FBDD4D@W2K8SV00008.MOTTOVOIP.lan"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
@font-face
        {font-family:"Lucida Console \;color\:\#BB0000";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Lucida Console \;color\:aqua";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
h3
        {mso-style-priority:9;
        mso-style-link:"Heading 3 Char";
        margin-top:2.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:12.0pt;
        font-family:"Calibri Light","sans-serif";
        color:#1F4D78;
        mso-fareast-language:EN-US;
        font-weight:normal;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:black;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:black;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:black;}
span.Heading3Char
        {mso-style-name:"Heading 3 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 3";
        font-family:"Calibri Light","sans-serif";
        color:#1F4D78;
        mso-fareast-language:EN-US;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><a moz-do-not-send="true"
            name="_MailEndCompose"><span style="color:black"
              lang="EN-US">Managed to get it working. After Lookup the
              AVP is repopulated<o:p></o:p></span></a></p>
        <p class="MsoNormal"><span style="color:black" lang="EN-US">Should
            this also be the case on the
            <b>registered(domain [,AOR[, callid]]) </b>function?<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:black" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:black" lang="EN-US">My
            problem would be completely solved if this function also
            fills the AVP which it currently doesn&#8217;t seem to do!<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:black" lang="EN-US">As
            Lookup rewrites my ruri which is undesirable in my script.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:black" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:black" lang="EN-US">Regards,<o:p></o:p></span></p>
        <div>
          <table class="MsoNormalTable" style="width:529.15pt"
            border="0" cellpadding="0" cellspacing="0" width="706">
            <tbody>
              <tr>
                <td style="width:529.15pt;padding:0cm 0cm 0cm 0cm"
                  width="706">
                  <p class="MsoNormal" style="margin-bottom:13.5pt"><span
                      style="font-size:10.0pt;font-family:&quot;Trebuchet
MS&quot;,&quot;sans-serif&quot;;mso-fareast-language:NL">Met
                      vriendelijke groet,</span><span
                      style="font-size:13.5pt;mso-fareast-language:NL"><o:p></o:p></span></p>
                </td>
              </tr>
              <tr>
                <td style="width:529.15pt;padding:0cm 0cm 0cm 0cm"
                  width="706">
                  <p class="MsoNormal" style="margin-bottom:13.5pt"><b><span
                        style="font-size:10.0pt;font-family:&quot;Trebuchet
MS&quot;,&quot;sans-serif&quot;;color:#A1C31F;mso-fareast-language:NL"
                        lang="EN-US">Rik Broers</span></b><span
                      style="font-size:13.5pt;mso-fareast-language:NL"
                      lang="EN-US"><br>
                    </span><b><i><span
                          style="font-size:8.0pt;font-family:&quot;Trebuchet
MS&quot;,&quot;sans-serif&quot;;mso-fareast-language:NL" lang="EN-US">Voice
                          engineer</span></i></b><span
                      style="font-size:13.5pt;mso-fareast-language:NL"
                      lang="EN-US"><o:p></o:p></span></p>
                </td>
              </tr>
            </tbody>
          </table>
          <p class="MsoNormal"><span
              style="color:black;mso-fareast-language:NL" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        </div>
      </div>
      <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>