<div dir="ltr">Hi Javi, Thank you again for your feedback,<div><br><div>this was a weird issue, what i did was reboot my server and now i have the expected behavior, maybe i was doing something wrong :) and it was the first time that i was testing my lua modules in this version i was asking me if that was an expected behavior or not.</div><div><br></div><div>anyway thank you for your help.</div><div><br></div><div><br></div><div>Regards</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-09 8:23 GMT+00:00 Javi Gallart <span dir="ltr"><<a href="mailto:jgallart@systemonenoc.com" target="_blank">jgallart@systemonenoc.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi <br>
      <br>
      we have a similar setup; within a lua_run call several avp are
      assgined; and I see no different behaviour in 4.2.2 than in other
      versions (we run 4.2.1 in production): avp_print() shows the
      correct values.<br>
      <br>
      Regards<span class="HOEnZb"><font color="#888888"><br>
      <br>
      Javi</font></span><div><div class="h5"><br>
      <br>
      On 06/03/15 09:48, José Seabra wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr"><span style="font-size:12.8000001907349px">Hi Javi</span>
        <div style="font-size:12.8000001907349px">Thank you for your
          reply,</div>
        <div style="font-size:12.8000001907349px">Yes i don't have avp
          ready after lua_run, i use avp_print(); after lua_run, but it
          prints the avp's only when the kamailio sent invite, this is
          weird, and what is more weird is that i have another kamailio
          instance connected to same redis and with same setup, and i
          don't see this behavior there.</div>
        <div style="font-size:12.8000001907349px"><br>
        </div>
        <div style="font-size:12.8000001907349px">Thank you </div>
        <div style="font-size:12.8000001907349px">Best regards</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2015-03-06 8:47 GMT+00:00 José Seabra <span dir="ltr"><<a href="mailto:joseseabra4@gmail.com" target="_blank">joseseabra4@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hi Javi
              <div>Thank you for your reply,</div>
              <div>
                <div>Yes i don't have avp ready after lua_run, i use
                  avp_print(); after lua_run, but it prints the avp's
                  only when the kamailio sent invite, this is weird, and
                  what is more weird is that i have another kamailio
                  instance connected to same redis and with same setup,
                  and i do see this behavior there.</div>
              </div>
              <div><br>
              </div>
              <div>Thank you </div>
              <div>Best regards</div>
            </div>
            <div class="gmail_extra">
              <div>
                <div><br>
                  <div class="gmail_quote">2015-03-06 8:13 GMT+00:00
                    Javi Gallart <span dir="ltr"><<a href="mailto:jgallart@systemonenoc.com" target="_blank">jgallart@systemonenoc.com</a>></span>:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000">
                        <div>Hello <br>
                          <br>
                          do you mean that the avp you assign inside the
                          lua scripts are not yet ready after "lua_run"?
                          What do you obtain if you print their values?<br>
                          <br>
                          Regards
                          <div>
                            <div><br>
                              On 06/03/15 00:20, José Seabra wrote:<br>
                            </div>
                          </div>
                        </div>
                        <blockquote type="cite">
                          <div>
                            <div>
                              <div dir="ltr">
                                <div>Hi there,</div>
                                <div>I'm using kamailio version 4.2.2 to
                                  a short time, and I'm using lua
                                  scripts to build some avps with
                                  information needed to make calls(lua
                                  functions uses redis as source data to
                                  build avp data.), what i have noticed
                                  today making some tests is that when i
                                  make a call my lua function:</div>
                                <div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">if(!lua_run("get_prefs","$fU","$fd"))</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">
                                  <span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">{</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">
                                  <span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">
                                    xdbg("SCRIPT: failed to execute lua
                                    function!\n");</span><br style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">
                                  <span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:18px;white-space:pre-wrap">}</span><br clear="all">
                                  <div><br>
                                  </div>
                                  <div>
                                    <div>kamailio gets the avp's after
                                      send the invite to the
                                      destine,(the invite will fail
                                      because kamailio needs avp
                                      information).</div>
                                    <div>it seems that kamailio calls
                                      the lua_run in asynchronous way, i
                                      never noticed that before in old
                                      version. is that a normal behavior
                                      or it is an issue in this version?</div>
                                  </div>
                                  <div><br>
                                  </div>
                                  <div>Best Regards</div>
                                  -- <br>
                                  <div>Cumprimentos
                                    <div>José Seabra</div>
                                  </div>
                                </div>
                              </div>
                              <br>
                              <fieldset></fieldset>
                              <br>
                            </div>
                          </div>
                          <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
                        </blockquote>
                        <br>
                      </div>
                      <br>
                      _______________________________________________<br>
                      SIP Express Router (SER) and Kamailio (OpenSER) -
                      sr-users mailing list<br>
                      <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
                      <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                      <br>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <div><br>
                  </div>
                </div>
              </div>
              <span><font color="#888888">-- <br>
                  <div>Cumprimentos
                    <div>José Seabra</div>
                  </div>
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div>Cumprimentos
          <div>José Seabra</div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cumprimentos<div>José Seabra</div></div>
</div>