<div dir="ltr"><div>i use ESL instead of JavaScript, but the logic is the same :=)</div><div><br></div>try this :=)<br><div><br></div><div>

<p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span lang="EN-US">if (session.ready()) {<u></u><u></u></span></p><p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span lang="EN-US"><br></span></p><p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span lang="EN-US">             </span></p><p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;text-indent:35.4pt"><span lang="EN-US">var sessOut = new Session("sofia/gateway/<wbr>realtoneFXO/" +  dialedNum + "@<a href="http://192.168.0.216:5060/" target="_blank" style="color:rgb(17,85,204)">192.168.0.216:5060</a>")<u></u><u></u></span></p><p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;text-indent:35.4pt"><span lang="EN-US">if (sessOut.ready()) {<u></u><u></u></span></p><p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;text-indent:35.4pt"><span lang="EN-US"><br></span></p><p class="MsoNormal" style="margin:0px;text-align:start;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;text-indent:35.4pt"><span lang="EN-US" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px">             </span><span style="text-indent:35.4pt;font-size:12.8px">session.setVariable("bridge_pre_execute_aleg_app", "record_session");</span></p><p class="MsoNormal" style="text-indent:35.4pt"><span style="font-size:12.8px">             session.setVariable("bridge_pre_execute_aleg_data" , "/path/to/recordingFile.wav");</span></p><p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;text-indent:35.4pt"><span lang="EN-US"><br></span></p><p class="MsoNormal" style="margin:0px 0px 0px 35.4pt;color:rgb(34,34,34);font-family:arial,sans-serif;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-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;text-indent:35.4pt"><span lang="EN-US">bridge(session, sessOut);<u></u><u></u></span></p><p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;text-indent:35.4pt"><span lang="EN-US">}<u></u><u></u></span></p><p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span lang="EN-US">}<u></u><u></u></span></p><p class="MsoNormal" style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;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:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span lang="EN-US"><u></u> </span></p>

<br></div><div>T.</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 15:26, 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_-2492843938549973626WordSection1"><p class="MsoNormal"><span lang="EN-US">Thank you Tihomir, I am VERY new to this.. can you please elaborate just a little more?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thanks in advance!<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><div><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> FreeSWITCH-users <<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@<wbr>lists.freeswitch.org</a>> <b>On Behalf Of </b>Tihomir Culjaga<br><b>Sent:</b> giovedì 8 marzo 2018 12:16<br><b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.<wbr>freeswitch.org</a>><br><b>Subject:</b> Re: [Freeswitch-users] Javascript<u></u><u></u></span></p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style="margin-bottom:12.0pt">Just set bridge_pre_execute_bleg/<wbr>aleg_app/data for record application before you execute bridge .<span><u></u><u></u></span></p><div id="m_-2492843938549973626AppleMailSignature"><p class="MsoNormal">Sent from my iPhone<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>On 8 Mar 2018, at 11:12, Francesco Facco de Lagarda <<a href="mailto:francesco@delagarda.com" target="_blank">francesco@delagarda.com</a>> wrote:<u></u><u></u></p></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><p class="MsoNormal"><span lang="EN-US">Good morning all..</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">Could someone please tell me how to initiate a call recording in javascript?</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">Simplyfied code I have:</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">if (session.ready()) {</span><u></u><u></u></p><p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US">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>")</span><u></u><u></u></p><p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US">if (sessOut.ready()) {</span><u></u><u></u></p><p class="MsoNormal" style="margin-left:35.4pt;text-indent:35.4pt"><span lang="EN-US">bridge(session, sessOut);</span><u></u><u></u></p><p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US">}</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">}</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">Any help appreciated.. have a happy and productive day and Happy Women’s day for any ladies there!</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US">Francesco</span><u></u><u></u></p><p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p></div></blockquote><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><p class="MsoNormal"><span>______________________________<wbr>______________________________<wbr>_____________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.<wbr>org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" 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" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><u></u><u></u></span></p></div></blockquote></div></div></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>