I have a dialplan that is trying to receive and process a fax, the first issue I have is that I can’t get it to continue after calling ReceiveFax(). The relevant bit of the extension is:
same => n,LOG(Notice,${SEQ}:${CALLTIME}:RECEIVING FAX : ${FAXFILE})
; Use Tryexec to avoid abnormal termination messing up the logic
same => n,TryExec(ReceiveFAX(${FAXFILE},d))
same => n,LOG(Notice,TRYSTATUS: ${TRYSTATUS})
same => n,NoOp(**** FAX Complete, Hanging up : ${FAXSTATUS} ****)
same => n(hangup),Hangup()
As you can see the ReceiveFax() call is wrapped in TryExec(), so it should, as I understand it, always proceed to the next line and log the value of ${TRYSTATUS}, however the log ends with
[Oct 15 09:08:00] NOTICE[24677][C-0000006c] Ext. faxin: 66:20141015090800:RECEIVING FAX : /home/asterisk/faxin/...
As far as I can see none of the extension after TryExec(ReceiveFAX()) is reached.
The events from AMI indicate that the TRYSTATUS variable was set to FAILED.
Does anyone have any idea what I am doing wrong?