Hi, <action application="lua" data="recordmsg.lua $${dorf_mailbox_prefix}/${** mailbox_to}/greeting.alaw ${mailbox} ${msgtime}"/> 1st Argument: $${dorf_mailbox_prefix}/${**mailbox_to}/greeting.alaw 2nd Argument: ${mailbox} 3rd Argument: ${msgtime} Can you verify that the ${msgtime} is properly calculated and is not NULL at the taime of execution of application=lua ? Regards, Sammy On Tue, Jul 31, 2012 at 2:12 PM, Thomas Hoellriegel <admin@blindi.net>wrote:
hi guy, I have simply written a voicemailrecording in lua. My dialplan extension is: <extension name="dorf_mailboxes" > <condition field="destination_number" expression="^44[0-9][0-9][0-9]**[0-9]\d*$"> <action application="set" data="msgtime=msg_${strftime(%** Y_%m_%d_%H_%M_%S)}_${mailbox}.**alaw"/> <action application="lua" data="recordmsg.lua $${dorf_mailbox_prefix}/${**mailbox_to}/greeting.alaw ${mailbox} ${msgtime}"/> </condition> </extension>
The luascript:
-- simply mailbox recording -- parameters: -- mailbox, sender, message mailbox = argv[1]; from_box = argv[2]; msg_file = argv[3]; snd = "/usr/local/freeswitch/sounds/**dorf"; file, errMsg = io.open( mailbox, "r" ); if not file then session:streamFile("/usr/**local/freeswitch/sounds/dorf/** mailbox_not.alaw") session:execute("transfer","**dorf_now XML dorf_now"); else freeswitch.consoleLog("info", "msg_file is: " .. msg_file .. "\n"); session:execute("playback",**mailbox); session:streamFile("/usr/**local/freeswitch/sounds/ivr/**beep.alaw") session:execute("record","/**tmp/" .. msg_file .. " 180 200 3 "); session:execute("transfer","**dorf_send XML dorf_send"); end
I become the error: [ERR] mod_lua.cpp:198 /usr/local/freeswitch/scripts/**recordmsg.lua:13 : attempt to concatenate global 'msg_file' (a nil value)M
I have 3 arguments, only 2 arguments will be works. Can your help please? thanks.
--------------- Du kannst mich jederzeit kostenlos per Festnetz erreichen unter: http://www.blindi.net/callback homepage: http://www.blindi.net blinde-misc mailingliste für blinde. anmeldung unter: http://www.blindi.net/mailman/**listinfo/blinde-misc<http://www.blindi.net/mailman/listinfo/blinde-misc>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org