hi all,
i have a lua script(record.lua) to record the call:
record.lua
--------------------------------------
callerid = argv[1]
dest = argv[2]
recording_dir = argv[3]
filename = callerid ..dest
recording_filename = string.format('%s%s', recording_dir,
filename)
if session:ready() then -- NOTE: the session here is nil!
max_len_secs = 30
silence_threshold = 30
silence_secs = 5
test = session:recordFile(recording_filename,
max_len_secs, silence_threshold, silence_secs);
end
but i don't know how to pass "session" from the default
dialplan to lua in the following sentence:
<action application="lua" data="record.lua
${caller_id_number} ${destination_number}
$${recordings_dir}"/>
any response is apprieciated!