[SR-Users] lua_run seems to be working in asynchronous way
José Seabra
joseseabra4 at gmail.com
Mon Mar 9 09:41:15 CET 2015
Hi Javi, Thank you again for your feedback,
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.
anyway thank you for your help.
Regards
2015-03-09 8:23 GMT+00:00 Javi Gallart <jgallart at systemonenoc.com>:
> Hi
>
> 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.
>
> Regards
>
> Javi
>
>
> On 06/03/15 09:48, José Seabra wrote:
>
> Hi Javi
> Thank you for your reply,
> 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.
>
> Thank you
> Best regards
>
> 2015-03-06 8:47 GMT+00:00 José Seabra <joseseabra4 at gmail.com>:
>
>> Hi Javi
>> Thank you for your reply,
>> 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.
>>
>> Thank you
>> Best regards
>>
>> 2015-03-06 8:13 GMT+00:00 Javi Gallart <jgallart at systemonenoc.com>:
>>
>>> Hello
>>>
>>> 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?
>>>
>>> Regards
>>>
>>> On 06/03/15 00:20, José Seabra wrote:
>>>
>>> Hi there,
>>> 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:
>>> if(!lua_run("get_prefs","$fU","$fd"))
>>> {
>>> xdbg("SCRIPT: failed to execute lua function!\n");
>>> }
>>>
>>> kamailio gets the avp's after send the invite to the destine,(the
>>> invite will fail because kamailio needs avp information).
>>> 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?
>>>
>>> Best Regards
>>> --
>>> Cumprimentos
>>> José Seabra
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>>
>> --
>> Cumprimentos
>> José Seabra
>>
>
>
>
> --
> Cumprimentos
> José Seabra
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users at lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
--
Cumprimentos
José Seabra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150309/16439ab5/attachment.html>
More information about the sr-users
mailing list