<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"><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 class="h5"><br>
      On 06/03/15 00:20, José Seabra wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <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">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>