Interaction with is done through a series of predefined objects provided by pbx_lua. The app
table is used to access dialplan applications. Any asterisk application can be accessed and executed as if it were a function attached to the app
table. Dialplan variables and functions are accessed and executed via the channel
table.
Dialplan Applications
Any dialplan application can be executed using the app
table. Application names are case insensitive. Arguments are passed to dialplan applications just as arguments are passed to functions in lua. String arguments must be quoted as they are lua strings. Empty arguments may be passed as nil
or as empty strings.
Channel Variables
After this the channel variable ${my_variable
} contains the value "my_value".
Any channel variable can be read and set using the channel
table. Local and global lua variables can be used as they normally would and are completely unrelated to channel variables.
Dialplan Functions
Note the use of the :
operator with the get()
and set()
methods.