forked from thehunmonkgroup/jester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jester.lua
35 lines (31 loc) · 977 Bytes
/
jester.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- Main launching point for Jester.
--
-- This script is used to launch the Jester environment from within
-- FreeSWITCH. Invoke it from within your dialplan like this:
--
--```xml
-- <action
-- application="lua"
-- data="jester/jester.lua <profile> <sequence> [arg1],[arg2],...,[argN]"
-- />
--```
--
-- See the @{01-Intro.md|Intro} and other documentation for more details on
-- using Jester.
--
-- @script jester.lua
-- @author Chad Phillips
-- @copyright 2011-2015 Chad Phillips
local core = require "jester.core"
local conf = require "jester.conf"
-- Arguments can come from a few different sources, so check them all and
-- provide a default empty table.
local args = argv or arg or {}
-- Run normally.
if args[1] and args[2] then
core.bootstrap(conf, args[1], args[2], args[3])
-- Main loop.
core.main()
else
error("JESTER: missing arguments in call to jester.lua. Run 'lua jester/jester.lua help' from the FreeSWITCH console for more help", 2)
end