[Freeswitch-users] lua call to stop_record_session - INVALID COMMAND
Michael Jerris
mike at jerris.com
Sat Dec 27 17:53:21 PST 2008
On Dec 27, 2008, at 5:21 PM, Frank @ Impact wrote:
> I was trying to stop a session record from lua but when I try I get a
> "Result is INVALID COMMAND!"
>
> I am calling this lua script with
> <action application="set" data="api_hangup_hook=lua proc.lua .."/>
>
> so by the time the lua is called, someone has hungup one of the legs.
>
> In the lua script I am using this to try to end the record session to
> the wav file so it gets closed and so I can convert it to mp3 right
> away
> and a few other things in the lua script...
>
> 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