[asterisk-users] extensions.lua with luasql.mysql.
Rodrigo Lang
rodrigoferreiralang at gmail.com
Mon Feb 28 08:12:32 CST 2011
Thanks a lot!
Best regards,
Rodrigo Lang.
2011/2/28 Borin <katerin.borin at gmail.com>
> Hi
> try this pls
> https://issues.asterisk.org/bug_view_advanced_page.php?bug_id=18671
> it did help to me
>
> On Thu, Feb 24, 2011 at 9:31 PM, Rodrigo Lang <
> rodrigoferreiralang at gmail.com> wrote:
>
>> Hi to all!
>>
>> I'm trying to create a context for integration with extensions.lua and
>> libsql.mysql, but I'm not getting to run. When I reload the module
>> pbx_lua.so the following error appears:
>>
>> [Feb 24 16:59:29] ERROR[30749]: pbx_lua.c:1249 exec: Error executing lua
>> extension: error loading module 'luasql.mysql' from file
>> '/usr/lib/lua/5.1/luasql/mysql.so':
>> /usr/lib/lua/5.1/luasql/mysql.so: undefined symbol: lua_getfield
>> stack traceback:
>> [C]: ?
>> [C]: in function 'require'
>> [string "extensions.lua"]:205: in function <[string
>> "extensions.lua"]:204>
>>
>>
>> I tested my script with a file.lua and works ok and the extensions.lua
>> works fine too. My extensions.lua:
>>
>> extensions = {
>> luatest = {
>> ["302"] = function()
>> require("luasql.mysql")
>> app.Answer()
>> app.Log("NOTICE", "Trying to connect in MySQL")
>> app.Wait("2")
>> env = assert(luasql.mysql())
>> sql = assert
>> (env:connect("asterisk_teste","root","*********","localhost",3306))
>> sel = sql:execute('SELECT * FROM cdr;')
>> sel:fetch(Fetcharray)
>> app.Noop(Fetcharray[1])
>> end;
>> h = function()
>> app.Hangup()
>> end;
>> };
>> }
>>
>>
>> Does anyone know what is happening?
>>
>> Thansk in advance,
>> --
>> Rodrigo Lang
>> Opening your mind - Just another Open Source site<http://openingyourmind.wordpress.com/>
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>> New to Asterisk? Join us for a live introductory webinar every Thurs:
>> http://www.asterisk.org/hello
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Rodrigo Lang
Opening your mind - Just another Open Source
site<http://openingyourmind.wordpress.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110228/c1cb1eb5/attachment-0001.htm>
More information about the asterisk-users
mailing list