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