Dialplan flow stops right after ReceiveFAX

Hello group !

When I receive an incoming fax and the call gets into my 1.8 dialplan, an AGI script is called so to verify if the DID is a FAX DID, and if so, a local channel is created dialing back to the dialplan so to reach the “receive fax” context. I presently have no way of changing this process;

My issue is that as soon as the fax is received, the flow stops right there and no further instructions are executed (the NoOps in the dialplan below). The issue with that is that I can’t process the fax file.

I tried setting a channel variable just before the ReceiveFAX command but it comes out empty in the script that calls the context and I am not sure why.

What am I missing? I am sure it’s not very complicated but I have spent my day on this…any help appreciated !


exten => _X!,n,ReceiveFAX(/var/spool/asterisk/faxreceived/{DT}.tif,df) exten => _X!,n,NoOp(FAXOPT(pages) : {FAXOPT(pages)})
exten => _X!,n,NoOp(FAXOPT(status) : {FAXOPT(status)}) exten => _X!,n,NoOp(FAXOPT(statusstr) : {FAXOPT(statusstr)})
exten => _X!,n,NoOp(FAXOPT(error) : ${FAXOPT(error)})
exten => _X!,n,Hangup()

Dialplan execution stops when the call is hung up. Normally after a fax the call is hung up, so dialplan does not continue. You would want to use the ‘h’ extension which is executed on hangup to do things.

Thanks i will double check that!

Indeed that was the issue, I had tested it but I beleive my test was done when I wasn’t actually answering the call before calling ReceiveFax. Thanks for that !