<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(&#39;%s%s&#39;, 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&#39;t know how to pass &quot;session&quot; from the default dialplan to lua in the following sentence:</div><div><br></div><div>&lt;action application=&quot;lua&quot; data=&quot;record.lua ${caller_id_number} ${destination_number} $${recordings_dir}&quot;/&gt;</div>
<div><br></div><div>any response is apprieciated!</div><div><br></div></div>