make sure that the shell location is right...<br><br>#!/bin/bash<br>not equal to <br>#!//ust/local/bin<br><br>common mistake.. <br><br><br><br><div><span class="gmail_quote">On 5/25/06, <b class="gmail_sendername">Maxim Vexler
</b> <<a href="mailto:hq4ever@gmail.com">hq4ever@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 5/24/06, Michael Collins <
<a href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.com</a>> wrote:<br>> > you should mv the file (and in the same filesystem, so 'rename' is<br>> used)<br>> ><br>><br>> You might want to chmod or even chown the file first as well. I wrote a
<br>> little script that does all of this before the .call file is mv'd into<br>> the outgoing directory:<br>><br>> cp /tmp/test3.call /tmp/test1.call<br>> chmod 666 /tmp/test1.call<br>> chgrp asterisk /tmp/test1.call
<br>> chown asterisk /tmp/test1.call<br>> mv /tmp/test1.call /var/spool/asterisk/outgoing/<br>><br>> I've been doing a lot of test calls to work on other aspects of .call<br>> files, so this script is quite handy for making the same call over and
<br>> over again.<br>><br>> HtH<br>><br>> -MC<br>> _______________________________________________<br>> --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>>
<br>> Asterisk-Users mailing list<br>> To UNSUBSCRIBE or update options visit:<br>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>
<br>><br><br>Thank you both, Tzafrir and Michael.<br>I ended up using the script from<br><a href="http://www.voip-info.org/wiki-Asterisk+tips+callback">http://www.voip-info.org/wiki-Asterisk+tips+callback</a><br><br>It looks like this:
<br><<<<br>#!/bin/bash<br><br> if [ "x$1" != "x" ];then phone_number="$1"; else return 1; fi<br><br> #note use of '-' in '-EOF1' - Escapes tab at beginning of lines<br> CALLFILE=$(cat <<-EOF1
<br>Channel: Zap/g0/$phone_number<br>MaxRetries: 2<br># Retry in 5 min<br>RetryTime: 300<br>WaitTime: 45<br><br>Context: ext-local<br>Extension: 211<br>Priority: 1<br><br>EOF1<br>)<br> echo "$CALLFILE" >> "/var/spool/asterisk/outgoing/max.call"
<br> # echo "$CALLFILE" >> "/tmp/calltomake.txt"<br>>>><br><br>I call it by doing a simple ./makecall.sh SOMEPHONE<br><br>The only problem I'm having now is that I must run the script as user
<br>asterisk, otherwise I get the same asterisk error as before.<br><br>Is there any way to fix this ?<br><br><br>Thank you.<br><br>--<br>Cheers,<br>Maxim Vexler<br><br>"Free as in Freedom" - Do u GNU ?<br><br>_______________________________________________
<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>Asterisk-Users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br><br><br></blockquote></div><br>