<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 class="gmail_signature">Leonardo Lima Ribeiro</div>
</div>