<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello all,<div class=""><br class=""></div><div class="">I’m trying to record an IVR using my gateway to do the outbound call in my luascript:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier" class="">local new_session = freeswitch.Session("[origination_caller_id_name=‘987654321',origination_caller_id_number=‘987654321']sofia/gateway/MY_GATEWAY/3157244022", session);</font></div><div class=""><font face="Courier" class="">new_session:execute("record_session","/usr/local/freeswitch/recordings/myrecording.wav")</font></div><div class=""><font face="Courier" class="">new_session:sleep("10000")</font></div><div class=""><font face="Courier" class="">new_session:hangup()</font></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">The problem is that I have an empty recording file.. Why?</div><div class=""><br class=""></div><div class="">The funny thing is: if I add this command after the record_session command:&nbsp;</div><div class=""><font face="Courier" class="">new_session:streamFile("voicemail/vm-goodbye.wav”);</font></div><div class=""><br class=""></div><div class="">And then this is the entire new script:</div><div class=""><div class=""><font face="Courier" class="">local new_session = freeswitch.Session("[origination_caller_id_name=‘987654321',origination_caller_id_number=‘987654321']sofia/gateway/MY_GATEWAY/3157244022", session);</font></div><div class=""><font face="Courier" class="">new_session:execute("record_session","/usr/local/freeswitch/recordings/myrecording.wav”)</font></div><div class=""><span style="font-family: Courier;" class="">new_session:streamFile("voicemail/vm-goodbye.wav”);</span></div><div class=""><font face="Courier" class="">new_session:sleep("10000")</font></div><div class=""><font face="Courier" class="">new_session:hangup()</font></div></div><div class=""><br class=""></div><div class="">I can hear the Good Bye sound from my script and then hear the Bank of America IVR.</div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Do you know what’s happening? How can I solve this?</div><div class=""><br class=""></div><div class="">Thank you!</div>
<br class=""></div></body></html>