<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>
Both issues happened because of a bug in the contact-DB
translation function. It is now fixed. Thank you for reporting!<br>
<br>
Best regards,<br>
<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 09/27/2013 09:08 AM, Rik Broers wrote:<br>
</div>
<blockquote
cite="mid:685BED81F9FCC7418ACC487ECF36B7E919FB89D3@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:"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:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
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;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:black;}
.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">The problem of getting the Variable into the
database is now solved!<o:p></o:p></span></a></p>
<p class="MsoNormal"><span style="color:black" lang="EN-US">The
was some integer and char mismatch in the database. Putting
every used column on the same type (char) it worked!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black" lang="EN-US">But
I am still struggling to get the AVP filled after a lookup,
I have a successful match according to logging. But the AVP
is not there.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black" lang="EN-US"><o:p> </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:"Trebuchet
MS","sans-serif";color:black;mso-fareast-language:NL">Met
vriendelijke groet,</span><span
style="font-size:13.5pt;color:black;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:"Trebuchet
MS","sans-serif";color:#A1C31F;mso-fareast-language:NL"
lang="EN-US">Rik Broers</span></b><span
style="font-size:13.5pt;color:black;mso-fareast-language:NL"
lang="EN-US"><br>
</span><b><i><span
style="font-size:8.0pt;font-family:"Trebuchet
MS","sans-serif";color:black;mso-fareast-language:NL"
lang="EN-US">Voice engineer</span></i></b><span
style="font-size:13.5pt;color:black;mso-fareast-language:NL"
lang="EN-US"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="color:black" lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b><span
style="mso-fareast-language:NL" lang="EN-US">From:</span></b><span
style="mso-fareast-language:NL" lang="EN-US">
<a class="moz-txt-link-abbreviated" href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>
[<a class="moz-txt-link-freetext" href="mailto:users-bounces@lists.opensips.org">mailto:users-bounces@lists.opensips.org</a>]
<b>On Behalf Of </b>Rik Broers<br>
<b>Sent:</b> donderdag 26 september 2013 11:37<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
<b>Subject:</b> [OpenSIPS-Users] avp not saved or
restored. Usrloc/Registrar module<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">Hello List,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">I’m having trouble getting $avp(attr) filled
after the lookup(“location”)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">I do the following:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">On incoming register<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console";color:#BBBB00" lang="EN-US">modparam("auth_db",
"load_credentials", "$avp(type)</span><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">=<span style="color:#BB0000">type")</span><span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">modparam("registrar",
"attr_avp", "$avp(attr)")<o:p></o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">modparam("usrloc",
"attr_column", "attr")<o:p></o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">if (is_method("REGISTER"))<span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> {<span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> xlog("Register
incoming")<span style="color:aqua">;</span><span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console";color:black;background:black;mso-highlight:black"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">
<span style="color:aqua"># authenticate the REGISTER
requests</span><span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> if
(!www_authorize("", "subscriber"))<span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> {<span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">
www_challenge("", "0")<span
style="color:aqua">;</span><span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> exit<span
style="color:aqua">;</span><span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> }<span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console";color:black;background:black;mso-highlight:black"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> ……<span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console";color:#BBBB00" lang="EN-US">
$avp(attr)</span><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">=<span style="color:#BB0000">$avp(type)</span><span
style="color:aqua">;</span><span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> xlog("attr avp :
$avp(attr) ... type avp : $avp(type)")<span
style="color:aqua">;</span><span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> if
(!save("location"))<span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">
sl_reply_error()<span style="color:aqua">;</span><span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console";color:black;background:black;mso-highlight:black"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> exit<span
style="color:aqua">;</span><span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
style="font-size:9.0pt;font-family:"Lucida
Console";color:black;background:black;mso-highlight:black"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">This works. It prints nicely both values in the
Log but when I check the location table the ATTR column is
still NULL.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">Also when I put it by hand on a value in the DB
after Lookup(“location”) the AVP is still not filled..<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">I’m trying to have a custom value ready from DB
on every incoming INVITE so I can decide on different
scenario’s.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">During invite I do the following:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">lookup("location","m", "$fu")<span
style="color:aqua">;<o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">If I understand the documentation the
$avp(attr) should be filled with the value provided during
save.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">In testing I got the value during every invite
with proxy_authorize (which filled $avp(type) ).
Unfortunately it seems that the other end is incapable of
authorizing on invites so I have to save the value during
register..<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">What’s going wrong? And is there maybe an
easier module to achieve what I want?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"
style="margin-left:35.4pt;text-autospace:none"><span
lang="EN-US">I’m using
</span><span style="font-size:9.0pt;font-family:"Lucida
Console"" lang="EN-US">version: opensips 1.10.0-notls
(x86_64/linux)<span
style="color:black;background:black;mso-highlight:black"><o:p></o:p></span></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US">Kind regards,<o:p></o:p></span></p>
<table class="MsoNormalTable"
style="width:529.15pt;margin-left:35.4pt" 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:"Trebuchet
MS","sans-serif";color:black;mso-fareast-language:NL">Met
vriendelijke groet,</span><span
style="font-size:13.5pt;color:black;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:"Trebuchet
MS","sans-serif";color:#A1C31F;mso-fareast-language:NL"
lang="EN-US">Rik Broers</span></b><span
style="font-size:13.5pt;color:black;mso-fareast-language:NL"
lang="EN-US"><br>
</span><b><i><span
style="font-size:8.0pt;font-family:"Trebuchet
MS","sans-serif";color:black;mso-fareast-language:NL"
lang="EN-US">Voice engineer</span></i></b><span
style="font-size:13.5pt;color:black;mso-fareast-language:NL"
lang="EN-US"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin-left:35.4pt"><span
style="mso-fareast-language:NL" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span
lang="EN-US"><o:p> </o:p></span></p>
</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>