[asterisk-users] PBX Lua with Asterisk ODBC

Matthew Nicholson mnicholson at digium.com
Mon Jul 26 14:29:32 CDT 2010


On Mon, 2010-07-26 at 12:10 -0400, Leif Madsen wrote:
> On 10-07-26 10:34 AM, Faisal Hanif wrote:
> >   You need to create a function is res_odbc for each of required query
> > and then u can use that function as normal asterisk dialplan function.
> 
> So in the dialplan, after you've modified func_odbc.conf you'd be able to do a 
> query like:
> 
> exten => start,1,Set(MyResult=${ODBC_GET_MY_DATA(banana_lollipop)})

With pbx_lua this would be something like:

MyResult = channel.ODBC_GET_MY_DATA("banana_lollipop"):get()


> How you structure that in pbx_lua I'm not sure, but you "create" the functions 
> with func_odbc.conf, which is probably the piece you're missing.
> 
> Leif Madsen.
> 

-- 
Matthew Nicholson
Digium, Inc. | Software Developer




More information about the asterisk-users mailing list