On 7/23/07, <b class="gmail_sendername">Dovid B</b> &lt;<a href="mailto:asteriskusers@dovid.net">asteriskusers@dovid.net</a>&gt; wrote:<div><span class="gmail_quote"></span><div>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff"><div><font face="Arial" size="2">Can it be that asterisk does not have permission to 
copy the file over ?&nbsp; Also check your date settings on the 
server.</font></div></div></blockquote><div><br><br>Yes, it&#39;s interesting that the page intro includes the sentence &quot;Lots of error checking to make sure its done correctly&quot;, but the final step that makes the process work (ensuring that the callfile ends up in the directory that pbx_spool is watching) doesn&#39;t have any error checking:
<br><br><span style="color: rgb(153, 0, 153);"><span style="font-family: courier new,monospace;">                                touch( $wakefile, $time_wakeup, $time_wakeup );
</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                                rename( $wakefile, $callfile );
</span><br><br>The fact that you see files in /tmp when all is said and done means that at least some of the script is working.&nbsp; A few things to check:<br><br>Do the files in /tmp have the correct timestamp (file matches the requested wakeup time)?&nbsp; If so, then everything preceeding the rename seems to have worked, so check if the user running the AGI can move files from /tmp to /var/spool/asterisk/outgoing.&nbsp; Though given that it&#39;s an AGI being run by *, you&#39;d have to have a pretty strange setup for that to fail.&nbsp; Perhaps the outgoing directory just doesn&#39;t exist (was never created for some reason?)
<br><br>If the files don&#39;t have the correct timestamp, start following the logic backwards.&nbsp; Do they look complete?&nbsp; Look through the AGI for places where the wakeup file is written to (i.e. </span><span style="color: rgb(153, 0, 153);">
<span style="font-family: monospace;">fputs(&nbsp;$wuc,&nbsp;&quot;maxretries:&nbsp;$parm_maxretries\n&quot;);
</span></span><span style="color: rgb(153, 0, 153);"> ) and check that everything that should be written is being written<br><br>Working backwards you should be able to figure out where the script is failing, then you can check everything that comes afterwards as the user running the AGI to make sure that permissions and directories are set up properly.
</span><span style="color: rgb(153, 0, 153);"><br></span></div></div><br>-- <br>j.