Mike,
I did some testing and this file is not getting closed.  I called the
script on hangup.  Made sure both legs hungup and then even did a sleep
for 5 secs to make sure FS could close any files is needed to.  Then I
made a copy of the wav file to a tmp file.  Then ended the script to
return back to the dialplan and made another copy of the wav file to a
second tmp file.

The first copy I made could not be opened by the media player. Said it
was corrupt.

The second copy of the file could be opened just fine by the media
player.

So FS is doing something to the recording file after the lua script
returns.  This is why I was trying to stop the recording session.

Any ideas?

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Michael Jerris
Sent: Saturday, December 27, 2008 8:53 PM
To: [email protected]
Subject: Re: [Freeswitch-users] lua call to stop_record_session -
INVALIDCOMMAND

>
> apicmd = "stop_record_session";
> apiarg = recordfile;
> res = api:execute(apicmd,apiarg);
>
> but that is when I get the INVALID COMMAND on the freeswitch console.
>
> Is there a proper way to do this from lua?

When the call hangs up the record session should stop by itself  
anyways so this should not be necessary.

Mike




_______________________________________________
Freeswitch-users mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to