[Freeswitch-users] Simple LuaScript to Record Session Failing

Oz Mortimer omortimer at gmail.com
Fri Jan 29 23:31:46 MSK 2016


since this is a single left call try setting record_stereo to false - https://wiki.freeswitch.org/wiki/Variable_RECORD_STEREO
I'm probably wrong, but worth a shot!

> On 29 Jan 2016, at 19:53, Leonardo Ribeiro <llribeiro90 at gmail.com> wrote:
> 
> Hello Guys,
> 
> Any idea?
> I could not evolve this yet...
> 
> Thank you,
> 
> 2016-01-28 18:52 GMT-02:00 Leonardo Lima Ribeiro <llribeiro90 at gmail.com>:
>> Hello all,
>> 
>> I’m trying to record an IVR using my gateway to do the outbound call in my luascript:
>> 
>> local new_session = freeswitch.Session("[origination_caller_id_name=‘987654321',origination_caller_id_number=‘987654321']sofia/gateway/MY_GATEWAY/3157244022", session);
>> new_session:execute("record_session","/usr/local/freeswitch/recordings/myrecording.wav")
>> new_session:sleep("10000")
>> new_session:hangup()
>> 
>> 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.
>> 
>> The problem is that I have an empty recording file.. Why?
>> 
>> The funny thing is: if I add this command after the record_session command: 
>> new_session:streamFile("voicemail/vm-goodbye.wav”);
>> 
>> And then this is the entire new script:
>> local new_session = freeswitch.Session("[origination_caller_id_name=‘987654321',origination_caller_id_number=‘987654321']sofia/gateway/MY_GATEWAY/3157244022", session);
>> new_session:execute("record_session","/usr/local/freeswitch/recordings/myrecording.wav”)
>> new_session:streamFile("voicemail/vm-goodbye.wav”);
>> new_session:sleep("10000")
>> new_session:hangup()
>> 
>> I can hear the Good Bye sound from my script and then hear the Bank of America IVR.
>> 
>> 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.
>> 
>> Do you know what’s happening? How can I solve this?
>> 
>> Thank you!
> 
> 
> 
> -- 
> Leonardo Lima Ribeiro
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services: 
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160129/7381367b/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list