<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="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 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1125083363;
        mso-list-type:hybrid;
        mso-list-template-ids:1111262430 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1
        {mso-list-id:1669094923;
        mso-list-type:hybrid;
        mso-list-template-ids:706377200 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l2
        {mso-list-id:1689717820;
        mso-list-template-ids:892628596;}
@list l2:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</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 bgcolor=white lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Razvan,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>If I can reproduce it again I will turn on
full logs and send it.&nbsp; In the example code that produced the results
below (my original post) $avpi(jimmy) was not initialized anywhere, I just used
get to print the results.&nbsp; It may be a simple misunderstanding I have
about AVPs, as I am learning more about them. &nbsp;I have a long history with
SIP (with other software) and with Lua, but am new at opensips and
understanding how AVPs work. &nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>In previous versions of testing I DID set
$avp(jimmy) to a number of string values in both opensips cfg file as well as
in LUA. &nbsp;Obviously when I changed the cfg file I had to restart opensips. &nbsp;However,
at one point I noticed that I hand multiple opensips instances running &#8211;
all with the same cfg file, because they had not died when I exited with a
Cntrl-C. &nbsp;I did kill -9 all of them before running the test below. &nbsp;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>When I set the $avp(jimmy) value it would
show up as expected (with the value I set it to), but when I changed code to
NOT initialize that particular AVP it should up with the &#8220;Old_mcDonald&#8221;
value which I used to set the $avp(bingo). &nbsp;Other AVPs that I did not
initialize but printed returned a &#8220;nil&#8221; value &#8211; which is what
I would have expected.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>NOTE that in the example below (original post)
that the printout (Output) prints the value of $avp(jimmy) two times. &nbsp;The
first time is before I set $avp(bingo) and the value returned is &#8220;nil&#8221;.&nbsp;
Then I set $avp(bingo) in Lua, but do NOT set $avp(jimmy) but the value gets changed
to the same thing as &nbsp;$avp(bingo). &nbsp;That is what really made me
scratch my head!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I am a fan of Lua and really like the
concept of have the option to use it with opensips. &nbsp;I am willing to do
testing and debugging, etc to help make it rock solid.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Additionally there are a number of
undocumented lua functions that would be good to add to the documentation. &nbsp;For
example:<o:p></o:p></span></font></p>

<ul style='margin-top:0in' type=disc>
 <li class=MsoNormal style='color:navy;mso-list:l1 level1 lfo4'><font size=2
     color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>&quot;pseudoVarSet&quot;<o:p></o:p></span></font></li>
 <li class=MsoNormal style='color:navy;mso-list:l1 level1 lfo4'><font size=2
     color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>&quot;scriptVarGet&quot;<o:p></o:p></span></font></li>
 <li class=MsoNormal style='color:navy;mso-list:l1 level1 lfo4'><font size=2
     color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial'>&quot;scriptVarSet&quot;<o:p></o:p></span></font></li>
</ul>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>NOTE: It would probably be good to change &#8220;pseudoVar&#8221;
function name to be &#8220;pseudoVar</span></font><b><font size=2 color=red
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:red;
font-weight:bold'>Get</span></font></b><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>&#8221; to match &quot;pseudoVar</span></font><b><font
size=2 color=red face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:red;font-weight:bold'>Set</span></font></b><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>&quot;, &quot;scriptVar<b><span
style='font-weight:bold'>Get</span></b>&quot; and &quot;scriptVar<b><span
style='font-weight:bold'>Set</span></b>&quot; for consistency.&nbsp; </span></font><font
size=2 color=navy face=Wingdings><span style='font-size:10.0pt;font-family:
Wingdings;color:navy'>J</span></font><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks for help.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>James <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'> users-bounces@lists.opensips.org
[mailto:users-bounces@lists.opensips.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Razvan Crainea<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, June 15, 2012 2:58
AM<br>
<b><span style='font-weight:bold'>To:</span></b> users@lists.opensips.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [OpenSIPS-Users] LUA
AVP issue?</span></font><font color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><tt><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>Hi, James!</span></font></tt><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><br>
<br>
<tt><font face="Courier New">I am not sure what exactly is the problem, but I
have an assumption. When the scenario was failing, where exactly was the
$avp(jimmy) first declared? Inside the LUA script? Is it now first declared in
OpenSIPS?</font></tt><br>
<tt><font face="Courier New">Is there any chance you could reproduce this issue
again in full debugging?</font></tt><br>
<br>
<tt><font face="Courier New">Regards,</font></tt><br>
<br>
</span></font><o:p></o:p></p>

<pre><font size=2 color=black face="Courier New"><span style='font-size:10.0pt'>Razvan Crainea<o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>OpenSIPS Core Developer<o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'><a
href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></span></font></pre>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>On 06/15/2012 12:30 AM, Gledhill, James wrote:<o:p></o:p></span></font></p>

</div>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'
cite="mid:A671FCA12875564E8CC11878981732BB1577FBBA@mse2be2.mse2.exchange.ms"
type=cite>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I made a few more changes to my code and
tested some more and now the problem has gone away and I can no longer
replicate it. &nbsp;Perhaps it is just something I do not fully understand
about AVPs or opensips or the lua implementation. &nbsp;&nbsp;I was able to
reproduce it 100% of the time for a while, but now can not &#8211; strange!<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Any thoughts what happened in the original
post?<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> <a
href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a>
[<a href="mailto:users-bounces@lists.opensips.org">mailto:users-bounces@lists.opensips.org</a>]
<b><span style='font-weight:bold'>On Behalf Of </span></b>Gledhill, James<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, June 14, 2012 3:54
PM<br>
<b><span style='font-weight:bold'>To:</span></b> <a
href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>
<b><span style='font-weight:bold'>Subject:</span></b> [OpenSIPS-Users] LUA AVP
issue?</span></font><u1:p></u1:p><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><u1:p>&nbsp;</u1:p><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>I am testing the Lua module in hopes of being able to
use it more later, but am coming across some strange things.<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>Is this the best place to ask about it?&nbsp; If not
point me in the right direction. <u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>AVP_set or AVP_get (in Lua module) seem to be getting
data for/from other AVP(s).<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>I have included enough code from opensips.cfg and the
lua file to be able to replicate this problem. &nbsp;It happens 100% of the
time. <u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;I am using <u1:p></u1:p></span></font><o:p></o:p></p>

<ul style='margin-top:0in' type=disc>
 <li class=MsoNormal style='mso-list:l0 level1 lfo3'><font size=2 color=black
     face=Arial><span style='font-size:10.0pt;font-family:Arial'>opensips 1.8<u1:p></u1:p></span></font><o:p></o:p></li>
 <li class=MsoNormal style='mso-list:l0 level1 lfo3'><font size=2 color=black
     face=Arial><span style='font-size:10.0pt;font-family:Arial'>CentOS 5.8<u1:p></u1:p></span></font><o:p></o:p></li>
 <li class=MsoNormal style='mso-list:l0 level1 lfo3'><font size=2 color=black
     face=Arial><span style='font-size:10.0pt;font-family:Arial'>Lua 5.1.4<u1:p></u1:p></span></font><o:p></o:p></li>
</ul>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>=============<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>Opensips.cfg (partial file)<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>=============<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>## route[INVITE] is called for all invites &#8211;
simple way to test </span></font><font size=2 face=Wingdings><span
style='font-size:10.0pt;font-family:Wingdings'>J</span></font><o:p></o:p></p>

<u1:p></u1:p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>route[INVITE] {<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; xlog(&quot;In
route_INVITE\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; $avp(abcde) = &quot;bean&quot;;<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; xlog(&quot;** ** avp(abcde) =
$avp(abcde)\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; if ( lua_exec(&quot;invite&quot;)
) {&nbsp;&nbsp;&nbsp;&nbsp; ## call the invite method in lua file<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xlog(&quot;lua_exec returned TRUE\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; } else {<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xlog(&quot;lua_exec returned not true\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; }<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; xlog(&quot;** ** avp(jimmy) =
$avp(jimmy)\n&quot;);&nbsp;&nbsp;&nbsp; ## this avp is reporting the value set
in lua to another avp &#8230; WHY?<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;486&quot;,
&quot;I am not answering now!&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; exit;<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>}<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>=============<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>Lua (partial file)<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>=============<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>function invite(param)<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;
xlog(&quot;**********&nbsp;&nbsp;&nbsp;&nbsp; ---&gt;&nbsp; INVITE test from
lua -- getpid =&quot; .. getpid() .. &quot;\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; -- AVP_get(&quot;jimmy&quot;)
returns a null because it is not set - this is expected.<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;
xlog(&quot;**********&nbsp;&nbsp;&nbsp;&nbsp; ---&gt;&nbsp; INVITE test from
lua -- AVP_get(jimmy) =&quot; .. tostring(AVP_get(&quot;jimmy&quot;)) ..
&quot;\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;
AVP_set(&quot;bingo&quot;,&quot;Old_mcDonald&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;
xlog(&quot;**********&nbsp;&nbsp;&nbsp;&nbsp; ---&gt;&nbsp; INVITE test from
lua -- AVP_get(bingo) =&quot; .. tostring(AVP_get(&quot;bingo&quot;)) ..
&quot;\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;
xlog(&quot;**********&nbsp;&nbsp;&nbsp;&nbsp; ---&gt;&nbsp; INVITE test from
lua -- AVP_get(abcde) =&quot; .. tostring(AVP_get(&quot;abcde&quot;)) ..
&quot;\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;
xlog(&quot;**********&nbsp;&nbsp;&nbsp;&nbsp; ---&gt;&nbsp; INVITE test from
lua -- AVP_get(fred) =&quot; .. tostring(AVP_get(&quot;fred&quot;)) ..
&quot;\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=red face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:red'>&nbsp;&nbsp;&nbsp; -- NOW &#8230;
AVP_get(&quot;jimmy&quot;) &nbsp;returns &quot;Old_mcDonald&quot; which is what
&quot;bingo&quot; is set to .. WHY IS avp(jimmy) returning this?<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=red face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:red'>&nbsp;&nbsp;&nbsp;
xlog(&quot;**********&nbsp;&nbsp;&nbsp;&nbsp; ---&gt;&nbsp; INVITE test from lua
-- AVP_get(jimmy) =&quot; .. tostring(AVP_get(&quot;jimmy&quot;)) ..
&quot;\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;
xlog(&quot;**********&nbsp;&nbsp;&nbsp;&nbsp; ---&gt;&nbsp; INVITE test from
lua -- filemtime =&quot; .. filemtime(&quot;/root/foo.dump&quot;) ..
&quot;\n&quot;);<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; return 0;<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>end<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>=============<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>Output<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>=============<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>In route_INVITE<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>** ** avp(abcde) = bean<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>siplua: **********&nbsp;&nbsp;&nbsp;&nbsp;
---&gt;&nbsp; INVITE test from lua -- getpid =6269<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>siplua: **********&nbsp;&nbsp;&nbsp;&nbsp;
---&gt;&nbsp; INVITE test from lua -- AVP_get(jimmy) =nil<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>siplua: **********&nbsp;&nbsp;&nbsp;&nbsp;
---&gt;&nbsp; INVITE test from lua -- AVP_get(bingo) =Old_mcDonald<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>siplua: **********&nbsp;&nbsp;&nbsp;&nbsp;
---&gt;&nbsp; INVITE test from lua -- AVP_get(abcde) =bean<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>siplua: **********&nbsp;&nbsp;&nbsp;&nbsp;
---&gt;&nbsp; INVITE test from lua -- AVP_get(fred) =nil<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=red face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:red'>siplua: **********&nbsp;&nbsp;&nbsp;&nbsp;
---&gt;&nbsp; INVITE test from lua -- AVP_get(jimmy) =Old_mcDonald
&nbsp;&nbsp;&lt;&lt;HOW/WHY is this getting set?&gt;&gt;<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>siplua: **********&nbsp;&nbsp;&nbsp;&nbsp;
---&gt;&nbsp; INVITE test from lua -- filemtime =1277825218<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'>lua_exec returned TRUE<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=red face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:red'>** ** avp(jimmy) = Old_mcDonald<u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=black face=Arial><span style='font-size:
10.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset><o:p></o:p></span></font></p>

<pre><font size=2 color=black face="Courier New"><span style='font-size:10.0pt'>_______________________________________________<o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>Users mailing list<o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'><a
href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'><a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></span></font></pre></blockquote>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>