Okay, I’ve finally managed to grab the console output and call file while sending a fax.
Call file:
Channel: SIP/fax_line/07YYYYYYYY
MaxRetries: 1
RetryTime: 60
WaitTime: 60
Archive: yes
Context: outboundfax
Extension: s
Priority: 1
Set: FAXFILE=/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif
Set: FAXHEADER=MY_BUSINESS_NAME
Set: TIMESTAMP=07/08/20 : 16:18:44
Set: DESTINATION=07YYYYYYYY
Set: LOCALID=07XXXXXXXX
Set: EMAIL=Dr SENDER NAME
And then we have the following console output:
Executing [s@outboundfax:1] Set("SIP/fax_line-000001aa", "FAXOPT(filename)=/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif") in new stack
[Aug 7 16:18:46] WARNING[18404][C-000000e8]: res_fax.c:4670 acf_faxopt_write: channel 'SIP/fax_line-000001aa' set FAXOPT(filename) to '/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif' is unhandled!
-- Executing [s@outboundfax:2] Set("SIP/fax_line-000001aa", "CALLERID(num-pres)=allowed") in new stack
-- Executing [s@outboundfax:3] Set("SIP/fax_line-000001aa", "FAXOPT(ecm)=yes") in new stack
-- Executing [s@outboundfax:4] Set("SIP/fax_line-000001aa", "FAXOPT(headerinfo)=MY_BUSINESS_NAME") in new stack
-- Executing [s@outboundfax:5] Set("SIP/fax_line-000001aa", "FAXOPT(localstationid)=07XXXXXXXX") in new stack
-- Executing [s@outboundfax:6] Set("SIP/fax_line-000001aa", "FAXOPT(maxrate)=9600") in new stack
-- Executing [s@outboundfax:7] Set("SIP/fax_line-000001aa", "FAXOPT(minrate)=2400") in new stack
-- Executing [s@outboundfax:8] System("SIP/fax_line-000001aa", "/usr/local/bin/faxnotify ANSWERED "Dr SENDER NAME" "07YYYYYYYY" "07/08/20 : 16:18:44" "IN_PROGRESS" "NO_PAGES" "/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif"") in new stack
-- Executing [s@outboundfax:9] SendFAX("SIP/fax_line-000001aa", "/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif,d") in new stack
-- Channel 'SIP/fax_line-000001aa' sending FAX:
-- /<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif
== Using UDPTL CoS mark 5
[Aug 7 16:19:44] WARNING[18284]: pbx_spool.c:350 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/24470531.call: Operation not permitted
-- Attempting call on SIP/fax_line/07YYYYYYYY for s@outboundfax:1 (Retry 1)
== Using SIP RTP CoS mark 5
-- Called fax_line/07YYYYYYYY
-- SIP/fax_line-000001ab answered
-- Executing [s@outboundfax:1] Set("SIP/fax_line-000001ab", "FAXOPT(filename)=/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif") in new stack
[Aug 7 16:19:46] WARNING[18410][C-000000e9]: res_fax.c:4670 acf_faxopt_write: channel 'SIP/fax_line-000001ab' set FAXOPT(filename) to '/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif' is unhandled!
-- Executing [s@outboundfax:2] Set("SIP/fax_line-000001ab", "CALLERID(num-pres)=allowed") in new stack
-- Executing [s@outboundfax:3] Set("SIP/fax_line-000001ab", "FAXOPT(ecm)=yes") in new stack
-- Executing [s@outboundfax:4] Set("SIP/fax_line-000001ab", "FAXOPT(headerinfo)=MY_BUSINESS_NAME") in new stack
-- Executing [s@outboundfax:5] Set("SIP/fax_line-000001ab", "FAXOPT(localstationid)=07XXXXXXXX") in new stack
-- Executing [s@outboundfax:6] Set("SIP/fax_line-000001ab", "FAXOPT(maxrate)=9600") in new stack
-- Executing [s@outboundfax:7] Set("SIP/fax_line-000001ab", "FAXOPT(minrate)=2400") in new stack
-- Executing [s@outboundfax:8] System("SIP/fax_line-000001ab", "/usr/local/bin/faxnotify ANSWERED "Dr SENDER NAME" "07YYYYYYYY" "07/08/20 : 16:18:44" "IN_PROGRESS" "NO_PAGES" "/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif"") in new stack
-- Executing [s@outboundfax:9] SendFAX("SIP/fax_line-000001ab", "/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif,d") in new stack
-- Channel 'SIP/fax_line-000001ab' sending FAX:
-- /<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif
== Using UDPTL CoS mark 5
-- Auto fallthrough, channel 'SIP/fax_line-000001ab' status is 'UNKNOWN'
-- Executing [h@outboundfax:1] NoOp("SIP/fax_line-000001ab", "FAXOPT(ecm) : yes") in new stack
-- Executing [h@outboundfax:2] NoOp("SIP/fax_line-000001ab", "FaxStatus : FAILED") in new stack
-- Executing [h@outboundfax:3] NoOp("SIP/fax_line-000001ab", "FaxStatusString : Received no response to DCS or TCF") in new stack
-- Executing [h@outboundfax:4] NoOp("SIP/fax_line-000001ab", "FaxError : Received no response to DCS or TCF") in new stack
-- Executing [h@outboundfax:5] NoOp("SIP/fax_line-000001ab", "RemoteStationID : ") in new stack
-- Executing [h@outboundfax:6] NoOp("SIP/fax_line-000001ab", "FaxPages : 0") in new stack
-- Executing [h@outboundfax:7] NoOp("SIP/fax_line-000001ab", "FaxBitRate : 14400") in new stack
-- Executing [h@outboundfax:8] NoOp("SIP/fax_line-000001ab", "FaxResolution : 8031x7700") in new stack
-- Executing [h@outboundfax:9] System("SIP/fax_line-000001ab", "/usr/local/bin/faxnotify ONHOOK "Dr SENDER NAME" "07YYYYYYYY" "07/08/20 : 16:18:44" "FAILED" "0" "/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif"") in new stack
[Aug 7 16:20:31] NOTICE[18410][C-000000e9]: pbx_spool.c:460 attempt_thread: Call completed to SIP/fax_line/07YYYYYYYY
== Spawn extension (outboundfax, s, 9) exited non-zero on 'SIP/fax_line-000001aa'
-- Executing [h@outboundfax:1] NoOp("SIP/fax_line-000001aa", "FAXOPT(ecm) : yes") in new stack
-- Executing [h@outboundfax:2] NoOp("SIP/fax_line-000001aa", "FaxStatus : FAILED") in new stack
-- Executing [h@outboundfax:3] NoOp("SIP/fax_line-000001aa", "FaxStatusString : The call dropped prematurely") in new stack
-- Executing [h@outboundfax:4] NoOp("SIP/fax_line-000001aa", "FaxError : The call dropped prematurely") in new stack
-- Executing [h@outboundfax:5] NoOp("SIP/fax_line-000001aa", "RemoteStationID : ") in new stack
-- Executing [h@outboundfax:6] NoOp("SIP/fax_line-000001aa", "FaxPages : 0") in new stack
-- Executing [h@outboundfax:7] NoOp("SIP/fax_line-000001aa", "FaxBitRate : 9600") in new stack
-- Executing [h@outboundfax:8] NoOp("SIP/fax_line-000001aa", "FaxResolution : 8031x7700") in new stack
-- Executing [h@outboundfax:9] System("SIP/fax_line-000001aa", "/usr/local/bin/faxnotify ONHOOK "Dr SENDER NAME" "07YYYYYYYY" "07/08/20 : 16:18:44" "FAILED" "0" "/<<DIRECTORY_XXXXX>>/Faxes/SentXXXX_XXXXXX_Xlg_20200807_review.tif"") in new stack
[Aug 7 16:20:45] NOTICE[18404][C-000000e8]: pbx_spool.c:460 attempt_thread: Call completed to SIP/fax_line/07YYYYYYYY
I’m wondering if the message about safe_append is a clue - is something touching the call file and causing asterisk to see it as a new file again? The PHP script I’m using creates the call file in /var/spool/asterisk/tmp before moving it to /var/spool/asterisk/outgoing.