source: npl/phone/fax2email_script/testscripts/sendfax @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 586 bytes
Line 
1#!/bin/bash
2cp faxtest.tif /tmp || exit 1
3
4TO=$1
5EMAIL=$2
6
7if [ "$TO" == "" ]; then
8        echo "Usage: $0 <phonenumber> <email>"
9        exit 1
10
11fi
12
13echo "Faxing to $TO, mailing $EMAIL"
14
15#Channel: mISDN/g:trunk_m1/$TO
16#Channel: sip/0858784323/$TO
17
18cat > /var/spool/asterisk/outgoing/faxtest.$$ <<EOF
19Channel: sip/0858784323/$TO
20MaxRetries: 3
21RetryTime: 300
22WaitTime: 60
23Context: faxsend
24Extension: s
25Priority: 1
26Set: FILENAME=/tmp/faxtest.tif
27Set: STATIONID=
28Set: CONFSUCCESS=0
29Set: EMAILADDR=$EMAIL
30Set: REMOTENUMBER=0591631586
31EOF
32
33chown nobody /var/spool/asterisk/outgoing/faxtest.$$ || exit 1
34
Note: See TracBrowser for help on using the repository browser.