TheMole
Guru
- Joined
- Aug 28, 2008
- Messages
- 96
- Reaction score
- 9
Hello all. I'm using a dated version of PIAF but things work for me.
I have a external process that will get a URL (http://IP.ADDRESS/cgi-bin/FrontDoor2.pl) . That URL will trigger a call file to be created. The process has worked _flawlessly_ for me for many months. Until now. I cannot determine what has changed.
The Apache logs confirm the external process correctly calls the URL, but the call file seems not to be created. Asterisk logs show no call is placed. additionallyl the FD2.txt file's timestamp is updated, so i know it's running.
FrontDoor2.pl contains the following:
when run manually from a bash shell, this works fine.
can someone take a look a that the above and confirm for me i'm not doing anything grossly incorrect? i just need to eliminate a gross error in the above to continue my investigation.
I have a external process that will get a URL (http://IP.ADDRESS/cgi-bin/FrontDoor2.pl) . That URL will trigger a call file to be created. The process has worked _flawlessly_ for me for many months. Until now. I cannot determine what has changed.
The Apache logs confirm the external process correctly calls the URL, but the call file seems not to be created. Asterisk logs show no call is placed. additionallyl the FD2.txt file's timestamp is updated, so i know it's running.
FrontDoor2.pl contains the following:
Code:
#!/bin/bash
echo "Content-type: text/html"
echo ""
echo "<html><head><title>Front Door Alert Handler"
echo "</title></head><body>"
echo "<h1>Message Received. Alert Sent. Thank you.</h1>"
echo "<pre> $(echo 1 > /tmp/FD2.txt)</pre>"
echo "<pre> $(echo "Channel: Local/881999@ext-paging" > /tmp/newcall.call)</pre>"
echo "<pre> $(echo "WaitTime: 5" >> /tmp/newcall.call)</pre>"
echo "<pre> $(echo "Context: ext-paging" >> /tmp/newcall.call)</pre>"
echo "<pre> $(echo "CallerID: \"ALERT Front Door\" <2229>" >> /tmp/newcall.call)</pre>"
echo "<pre> $(echo "Extension: 2229" >> /tmp/newcall.call)</pre>"
echo "<pre> $(echo "Priority: 1" >> /tmp/newcall.call)</pre>"
echo "<pre> $(chmod 666 /tmp/newcall.call)</pre>"
echo "<pre> $(mv /tmp/newcall.call /var/spool/asterisk/outgoing/newcall.call)</pre>"
echo "</body></html>"
when run manually from a bash shell, this works fine.
can someone take a look a that the above and confirm for me i'm not doing anything grossly incorrect? i just need to eliminate a gross error in the above to continue my investigation.