[Freeswitch-users] lua call to stop_record_session - INVALIDCOMMAND

Frank @ Impact frank at impactfax.com
Sun Dec 28 08:14:27 PST 2008


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: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
Michael Jerris
Sent: Saturday, December 27, 2008 8:53 PM
To: freeswitch-users at lists.freeswitch.org
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







More information about the FreeSWITCH-users mailing list