<div dir="ltr"><div>have you tried the session method specifically for recording files?</div><div><br></div><div><a href="https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference#LuaAPIReference-session:recordFile">https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference#LuaAPIReference-session:recordFile</a></div><div><br></div><div>or if that doesn&#39;t work, maybe this:</div><div><br></div><div>local new_session = freeswitch.Session(&quot;someoriginatestring&quot;, session);</div><div>uuid = new_session:get_uuid()</div><div>api = freeswitch.API()</div><div>reply = api:executeString(&quot;uuid_record &quot; .. uuid .. &quot; start &quot; .. filepath)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 29, 2016 at 1:31 PM, Oz Mortimer <span dir="ltr">&lt;<a href="mailto:omortimer@gmail.com" target="_blank">omortimer@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><span></span></div><div><div></div><div>since this is a single left call try setting record_stereo to false - <a href="https://wiki.freeswitch.org/wiki/Variable_RECORD_STEREO" target="_blank">https://wiki.freeswitch.org/wiki/Variable_RECORD_STEREO</a></div><div>I&#39;m probably wrong, but worth a shot!</div><div><div class="h5"><div><br>On 29 Jan 2016, at 19:53, Leonardo Ribeiro &lt;<a href="mailto:llribeiro90@gmail.com" target="_blank">llribeiro90@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hello Guys,<div><br></div><div>Any idea?<br>I could not evolve this yet...</div><div><br></div><div>Thank you,</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-28 18:52 GMT-02:00 Leonardo Lima Ribeiro <span dir="ltr">&lt;<a href="mailto:llribeiro90@gmail.com" target="_blank">llribeiro90@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hello all,<div><br></div><div>I’m trying to record an IVR using my gateway to do the outbound call in my luascript:</div><div><br></div><div><div><font face="Courier">local new_session = freeswitch.Session(&quot;[origination_caller_id_name=‘987654321&#39;,origination_caller_id_number=‘987654321&#39;]sofia/gateway/MY_GATEWAY/<a href="tel:3157244022" value="+13157244022" target="_blank">3157244022</a>&quot;, session);</font></div><div><font face="Courier">new_session:execute(&quot;record_session&quot;,&quot;/usr/local/freeswitch/recordings/myrecording.wav&quot;)</font></div><div><font face="Courier">new_session:sleep(&quot;10000&quot;)</font></div><div><font face="Courier">new_session:hangup()</font></div><div><br></div><div>So in the above script I just call to the Bank Of America as an example and try to record the first 10 seconds of the call in the recordings path.</div><div><br></div><div>The problem is that I have an empty recording file.. Why?</div><div><br></div><div>The funny thing is: if I add this command after the record_session command: </div><div><font face="Courier">new_session:streamFile(&quot;voicemail/vm-goodbye.wav”);</font></div><div><br></div><div>And then this is the entire new script:</div><div><div><font face="Courier">local new_session = freeswitch.Session(&quot;[origination_caller_id_name=‘987654321&#39;,origination_caller_id_number=‘987654321&#39;]sofia/gateway/MY_GATEWAY/<a href="tel:3157244022" value="+13157244022" target="_blank">3157244022</a>&quot;, session);</font></div><div><font face="Courier">new_session:execute(&quot;record_session&quot;,&quot;/usr/local/freeswitch/recordings/myrecording.wav”)</font></div><div><span style="font-family:Courier">new_session:streamFile(&quot;voicemail/vm-goodbye.wav”);</span></div><div><font face="Courier">new_session:sleep(&quot;10000&quot;)</font></div><div><font face="Courier">new_session:hangup()</font></div></div><div><br></div><div>I can hear the Good Bye sound from my script and then hear the Bank of America IVR.</div><div><br></div><div>I just don’t understand why the record works if I play a sound in our side and the record does not work if I don’t play any sound.</div><div><br></div><div>Do you know what’s happening? How can I solve this?</div><div><br></div><div>Thank you!</div>
<br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Leonardo Lima Ribeiro</div>
</div>
</div></blockquote></div></div><blockquote type="cite"><div><span>_________________________________________________________________________</span><br><span>Professional FreeSWITCH Consulting Services: </span><br><span><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a></span><br><span><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a></span><br><span></span><br><span>Official FreeSWITCH Sites</span><br><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br><span><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a></span><br><span><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a></span><br><span></span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br><span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span></div></blockquote></div></div><br>_________________________________________________________________________<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.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.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.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/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>