<div dir="ltr">
<span style="color:rgb(34,34,34);font-family:"Courier New";font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:47.2px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">bridge_pre_execute_aleg_app</span> pointso to application<br><div>
<span style="color:rgb(34,34,34);font-family:"Courier New";font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:47.2px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">bridge_pre_execute_aleg_data</span> points to application argument<br></div><div><br></div><div>you need to set them both.</div><div><br></div><div><br></div><div>also, you should set them on A-leg.</div><div><br></div><div>and use:</div><div><br></div><div>session.setVariable("varName","varValue")</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 March 2018 at 19:16, Francesco Facco de Lagarda <span dir="ltr"><<a href="mailto:francesco@delagarda.com" target="_blank">francesco@delagarda.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="IT" link="#0563C1" vlink="#954F72"><div class="m_-6925120010937741636WordSection1"><p class="MsoNormal"><span lang="EN-US">‘Evening one and all.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Im going crazy trying to record calls from javascript scripting<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">This is what I have done:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">I have installed mod_shout <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">$ apt-get install freeswitch-mod-shout<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">enable in /autoload ../modules.xml<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">reloaded freeswitch<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">$ service freeswitch restart<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Checked that module was loaded<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">fs_cli -x "show modules" | grep shout<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">And set it up before bridge:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">set "bridge_pre_execute_aleg_app record_session /tmp/test.mp3"<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Simplyfied code I have:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">if (session.ready()) {<u></u><u></u></span></p><p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-family:"Courier New"">var sessOut = new Session("sofia/gateway/<wbr>realtoneFXO/" + dialedNum + "@<a href="http://192.168.0.216:5060" target="_blank">192.168.0.216:5060</a>")<u></u><u></u></span></p><p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-family:"Courier New"">if (sessOut.ready()) {<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="EN-US" style="font-family:"Courier New"">sessOut.execute("set", "bridge_pre_execute_aleg_app record_session /tmp/test.mp3");<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="EN-US" style="font-family:"Courier New"">bridge(session, sessOut);<u></u><u></u></span></p><p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-family:"Courier New"">}</span><span style="font-family:"Courier New""><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">}</span><span style="font-family:"Courier New""><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">But nothing appears in “/tmp” !!!!<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Where am I going wrong?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>