[asterisk-users] Sytem Commands not executing

Tim King tim at compnetwork.net
Sat Aug 20 07:00:25 CDT 2011


When using the following my sytems commands to not seem to execute.

[outboundfax]
; exten => s,1,NoOp(send a fax)
exten => s,1,Set(FAXOPT(filename)=${FAXFILE})
exten => s,n,Set(FAXOPT(ecm)=yes)
exten => s,n,Set(FAXOPT(headerinfo)=${FAXHEADER})
exten => s,n,Set(FAXOPT(localstationid)=${LOCALID})
exten => s,n,Set(FAXOPT(maxrate)=14400)
exten => s,n,Set(FAXOPT(minrate)=2400)
exten => s,n,SendFAX(${FAXFILE},d)
exten => s,n,System(/usr/bin/php /var/lib/asterisk/bin/faxnotify.php INIT
"${EMAIL}" "${DESTINATION}" "${TIMESTAMP}" "NO_STATUS"
exten => h,1,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten => h,n,NoOp(FaxStatus : ${FAXSTATUS})
exten => h,n,NoOp(FaxStatusString : ${FAXSTATUSSTRING})
exten => h,n,NoOp(FaxError : ${FAXERROR})
exten => h,n,NoOp(RemoteStationID : ${REMOTESTATIONID})
exten => h,n,NoOp(FaxPages : ${FAXPAGES})
exten => h,n,NoOp(FaxBitRate : ${FAXBITRATE})
exten => h,n,NoOp(FaxResolution : ${FAXRESOLUTION})
exten => h,n,System(/usr/bin/php /var/lib/asterisk/bin/faxnotify.php NOTIFY
"${EMAIL}" "${DESTINATION}" "${TIMESTAMP}" "${FAXSTAT
; end of outboundfax context
I added this to make sure that it was not permissions.

exten => 777,1,System(/bin/touch /var/lib/asterisk/bin/tesfile.txt)
exten => 777,n,Playback(vm-goodbye)
exten => 777,n,Hangup()
When I dial 777 the test file is created in the folder where faxnotify.php
exists.

If I copy the data I see in the console and paste it to command prompt the
faxnotify script does execute and everything works.
/var/lib/asterisk/bin/faxnotify.php NOTIFY "tim at compnetwork.net"
"6165551212" "20/08/11 : 06:55:11" "FAX_SUCCESS" "1"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110820/34ceac78/attachment.htm>


More information about the asterisk-users mailing list