On 5/24/06, Michael Collins <[EMAIL PROTECTED]> wrote:
> you should mv the file (and in the same filesystem, so 'rename' is
used)
>

You might want to chmod or even chown the file first as well.  I wrote a
little script that does all of this before the .call file is mv'd into
the outgoing directory:

cp /tmp/test3.call /tmp/test1.call
chmod 666 /tmp/test1.call
chgrp asterisk /tmp/test1.call
chown asterisk /tmp/test1.call
mv /tmp/test1.call /var/spool/asterisk/outgoing/

I've been doing a lot of test calls to work on other aspects of .call
files, so this script is quite handy for making the same call over and
over again.

HtH

-MC
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Thank you both, Tzafrir and Michael.
I ended up using the script from
http://www.voip-info.org/wiki-Asterisk+tips+callback

It looks like this:
<<<
#!/bin/bash

    if [ "x$1" != "x" ];then phone_number="$1"; else return 1; fi

     #note use of '-' in '-EOF1' - Escapes tab at beginning of lines
     CALLFILE=$(cat <<-EOF1
Channel: Zap/g0/$phone_number
MaxRetries: 2
# Retry in 5 min
RetryTime: 300
WaitTime: 45

Context: ext-local
Extension: 211
Priority: 1

EOF1
)
      echo "$CALLFILE" >> "/var/spool/asterisk/outgoing/max.call"
      # echo "$CALLFILE" >> "/tmp/calltomake.txt"


I call it by doing a simple ./makecall.sh SOMEPHONE

The only problem I'm having now is that I must run the script as user
asterisk, otherwise I get the same asterisk error as before.

Is there any way to fix this ?


Thank you.

--
Cheers,
Maxim Vexler

"Free as in Freedom" - Do u GNU ?
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to