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