<div dir="ltr">did you try to answer the new_session before starting the record?</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 1, 2016 at 10:38 AM, Leonardo Lima Ribeiro <span dir="ltr"><<a href="mailto:llribeiro90@gmail.com" target="_blank">llribeiro90@gmail.com</a>></span> wrote:<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">Thanks Chad and Oz.<div><br></div><div>I tried two things:</div><div><br></div><div>1) Oz suggestion:</div><div><br></div><div><div>local new_session = freeswitch.Session("[origination_caller_id_name='<a href="tel:7136694967" target="_blank" value="+17136694967">7136694967</a>',origination_caller_id_number='<a href="tel:7136694967" target="_blank" value="+17136694967">7136694967</a>']sofia/gateway/4_NEXTIVA/<a href="tel:3157244022" target="_blank" value="+13157244022">3157244022</a>", session);</div><div>new_session:setVariable(“RECORD_STEREO”,”false”)</div><div>new_session:sleep("5000")</div><span><div>new_session:streamFile("voicemail/vm-goodbye.wav")</div><div>new_session:sleep("10000")</div><div>new_session:hangup()</div></span></div><div><br></div><div>Did not work…</div><div><br></div><div>2) Chad suggestion:</div><div><br></div><div><div>local new_session = freeswitch.Session("[origination_caller_id_name='<a href="tel:7136694967" target="_blank" value="+17136694967">7136694967</a>',origination_caller_id_number='<a href="tel:7136694967" target="_blank" value="+17136694967">7136694967</a>']sofia/gateway/4_NEXTIVA/<a href="tel:3157244022" target="_blank" value="+13157244022">3157244022</a>", session);</div><span><div><br></div><div>uuid = new_session:get_uuid()</div><div>api = freeswitch.API()</div></span><div>reply = api:executeString("uuid_record " .. uuid .. " start /usr/local/freeswitch/recordings/myrecording.wav")</div><div><br></div><div>new_session:sleep("5000")</div><span><div>new_session:streamFile("voicemail/vm-goodbye.wav")</div><div>new_session:sleep("10000")</div><div>new_session:hangup()</div></span></div><div><br></div><div>Did not work too… </div><div><br></div><div>Both cases I have 5 seconds of silence (first 5000 pause) and then when I play the Good Bye wav file it starts to record normally. So I have 5 seconds of silence, good bye sound and 10 seconds of recording.</div><div><br></div><div>Chad, I can’t use session:recordFile because it’s a synchronous command that blocks my script.. I need to do a lot of actions like pauses, stream files etc., while the call is still going on…</div><div><br></div><div>Maybe should I open a ticket for FreeSWITCH support? (I even don’t know if it exists hehe, maybe a github issue?)</div><div><br></div><div>Thank you,</div><div><div class="h5"><div><br></div><div><br><div><blockquote type="cite"><div>On Jan 30, 2016, at 12:36 AM, Chad Phillips <<a href="mailto:chad@apartmentlines.com" target="_blank">chad@apartmentlines.com</a>> wrote:</div><br><div><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" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference#LuaAPIReference-session:recordFile</a></div><div><br></div><div>or if that doesn't work, maybe this:</div><div><br></div><div>local new_session = freeswitch.Session("someoriginatestring", session);</div><div>uuid = new_session:get_uuid()</div><div>api = freeswitch.API()</div><div>reply = api:executeString("uuid_record " .. uuid .. " start " .. 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"><<a href="mailto:omortimer@gmail.com" target="_blank">omortimer@gmail.com</a>></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'm probably wrong, but worth a shot!</div><div><div><div><br>On 29 Jan 2016, at 19:53, Leonardo Ribeiro <<a href="mailto:llribeiro90@gmail.com" target="_blank">llribeiro90@gmail.com</a>> 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"><<a href="mailto:llribeiro90@gmail.com" target="_blank">llribeiro90@gmail.com</a>></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("[origination_caller_id_name=‘987654321',origination_caller_id_number=‘987654321']sofia/gateway/MY_GATEWAY/<a href="tel:3157244022" target="_blank" value="+13157244022">3157244022</a>", session);</font></div><div><font face="Courier">new_session:execute("record_session","/usr/local/freeswitch/recordings/myrecording.wav")</font></div><div><font face="Courier">new_session:sleep("10000")</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("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("[origination_caller_id_name=‘987654321',origination_caller_id_number=‘987654321']sofia/gateway/MY_GATEWAY/<a href="tel:3157244022" target="_blank" value="+13157244022">3157244022</a>", session);</font></div><div><font face="Courier">new_session:execute("record_session","/usr/local/freeswitch/recordings/myrecording.wav”)</font></div><div><span style="font-family:Courier">new_session:streamFile("voicemail/vm-goodbye.wav”);</span></div><div><font face="Courier">new_session:sleep("10000")</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" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" target="_blank" rel="noreferrer">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org/" target="_blank" rel="noreferrer">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com/" target="_blank" rel="noreferrer">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.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br></blockquote></div><br></div>
_________________________________________________________________________<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.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.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.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div></blockquote></div><br></div></div></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" target="_blank" rel="noreferrer">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank" rel="noreferrer">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank" rel="noreferrer">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" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank" rel="noreferrer">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank" rel="noreferrer">http://www.freeswitch.org</a><br></blockquote></div><br></div>