<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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;}
/* 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;
        font-weight:normal;
        font-style:normal;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.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]-->
</head>
<body lang="NL" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Consider this answered! Found my error.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt;line-height:12.75pt"><span style="mso-fareast-language:NL">Vriendelijke groet,<br>
<br>
<b><span style="color:#84C41B">Rik Broers</span></b><br>
</span><span style="font-size:9.0pt;color:#212735;mso-fareast-language:NL">Voice Engineer</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:NL">From:</span></b><span lang="EN-US" style="mso-fareast-language:NL"> users-bounces@lists.opensips.org [mailto:users-bounces@lists.opensips.org]
<b>On Behalf Of </b>Rik Broers<br>
<b>Sent:</b> woensdag 23 april 2014 15:21<br>
<b>To:</b> OpenSIPS users mailling list<br>
<b>Subject:</b> [OpenSIPS-Users] problem with $rU<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">On an ACK message i try to receive the rU value and put it in an AVP.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Is $rU not available on an ACK message or am I missing something else straightforward?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ERROR:core:do_assign: no value in right expression<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ERROR:core:do_assign: error at line: 380<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ERROR:core:parse_uri: bad uri, state 0 parsed: <@int> (4) / <@internal.lan:5060> (24)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Line 380 is the following:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $avp(s:orig_user) = $rU;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">What happens after this is I replace the $rU with the result of a query and do a lookup location over it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I then place back the original $rU so the endpoint understands it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">For reference the block of code I’m having issues with.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $avp(s:orig_user) = $rU;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $ru = "sip:" + $avp(s:orig_user) + "@internal.lan:5060";<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> lookup("location");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> if ($retcode == -1) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> xlog("L_DEBUG", "Entering case -1\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $avp(orig_user) = $rU;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> avp_db_query("select <stuff>","$avp(s:extension),$avp(s:d_trunk)");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> if ($avp(s:d_trunk)){<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $rU = $avp(s:extension);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $ru = "sip:" + $rU + "@" + "internal.lan" + ":5060";<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> lookup("location");
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> $rU = $avp(orig_user);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> };<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> record_route();<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> force_send_socket(172.16.1.22);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Anyone an idea on what to try?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;line-height:12.75pt"><span style="mso-fareast-language:NL">Vriendelijke groet,<br>
<br>
<b><span style="color:#84C41B">Rik Broers</span></b><br>
</span><span style="font-size:9.0pt;color:#212735;mso-fareast-language:NL">Voice Engineer</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</body>
</html>