[asterisk-users] Lua extensions are not working on asterisk 1.8.2.3

Tilghman Lesher tilghman at meg.abyt.es
Tue Feb 15 11:22:07 CST 2011


On Tuesday 15 February 2011 11:06:32 Carlo Pires wrote:
> Hi,
> 
> After compiling a installing asterisk 1.8.2.3 I wanted to play with
> lua but I noticed that extensions created in extensions.lua was not
> being registered with asterisk.
> 
> uga1*CLI> dialplan show
> [ Context 'app_queue_gosub_virtual_context' created by 'app_queue' ]
>   's' =>            1. NoOp()                                    
> [app_queue]
> 
> [ Context 'parkedcalls' created by 'features' ]
>   '700' =>          1. Park()                                    
> [features]
> 
> [ Context 'app_dial_gosub_virtual_context' created by 'app_dial' ]
>   's' =>            1. NoOp()                                    
> [app_dial]
> 
> [ Context 'local' created by 'pbx_lua' ]
>   Alt. Switch =>    'Lua/'                                       
> [pbx_lua]
> 
> [ Context 'demo' created by 'pbx_lua' ]
>   Alt. Switch =>    'Lua/'                                       
> [pbx_lua]
> 
> [ Context 'default' created by 'pbx_lua' ]
>   Alt. Switch =>    'Lua/'                                       
> [pbx_lua]
> 
> -= 3 extensions (3 priorities) in 6 contexts. =-
> uga1*CLI>
> uga1*CLI> dialplan show demo
> [ Context 'demo' created by 'pbx_lua' ]
>   Alt. Switch =>    'Lua/'                                       
> [pbx_lua]
> 
> -= 0 extensions (0 priorities) in 1 context. =-
> uga1*CLI>
> 
> Need I enable something to get lua extensions to be created?

No, that's how Lua extensions work, with the switch statement.  Your
extensions are still being evaluated by Lua.  The only difference is that
pbx_lua now doesn't see any need to create extensions, because it will see
every extension when it hits the switch.

-- 
Tilghman



More information about the asterisk-users mailing list