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

Reply via email to