Подключение lua_pbx.so

Skip to end of metadata
Go to start of metadata

Создаем пустой файл extensions.lua:

extensions = {}

extensions.default = {}

extensions.users = {
  ['700'] = function(context, extension)
    app.answer()
    app.wait(1)
    app.playback('demo-thanks')
    end
}

Перегружаем модуль pbx_lua через CLI> module reload pbx_lua.so, проверяем из CLI> dialplan show:

[ Context 'users' created by 'pbx_lua' ]
  Alt. Switch =>    'Lua/'                                        [pbx_lua]

[ Context 'default' created by 'pbx_lua' ]
  Alt. Switch =>    'Lua/'                                        [pbx_lua]
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.