Hello. I want to use mod_xml_rpc, or something else to return raw audio files which a recorded on file system using lua script to verify credentials and select file. For now I enable mod_xml_rpc and created a simple lua script: local f=assert(io.open("/path/file.mp3","rb")) io.write( f:read("*all")) f:close() Using http://freeswitch:ip:8080/api/luarun?script.lua gives "+OK", but not the file content. Using http://freeswitch:ip:8080/api/lua?script.lua gives error. Instead I change: local f=assert(io.open("/path/file.mp3","rb")) stream:write( f:read("*all")) f:close() gives nothing thru mod_xml_rpc, but on console outputs the content of the file if file is text. If file is mp3, the output is just some rando three characters. How to get the whole content fro an audio file using lua and some access method? -- Mimiko desu.
I don't understand-why can't you just use record_session for your use case? You can specify the encoding it saves. -Avi
On 30.06.2013 12:48, Avi Marcus wrote:
I don't understand-why can't you just use record_session for your use case? You can specify the encoding it saves.
Marcus, the session is recorded. I want to download the recorded file from freeswitch later on demand. Maybe using embedded web server, but it does not support server side scripting. -- Mimiko desu.
participants (2)
-
Avi Marcus
-
Mimiko