[Freeswitch-users] lua call to stop_record_session - INVALID COMMAND

Frank @ Impact frank at impactfax.com
Sat Dec 27 14:21:23 PST 2008


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?





More information about the FreeSWITCH-users mailing list