FAX CNG Detected But No Fax Extension

Home » Asterisk Users » FAX CNG Detected But No Fax Extension
Asterisk Users 3 Comments

Hello, I have a question regarding incoming fax to local file (on the Asterisk server). While the fax is received properly (I have the tiff file generated as expected) I get the warning ‘FAX CNG detected but no fax extension’ on the consol.

If the fax is received ok then what ‘fax extension’ does it expect and what should I do there?

My Setup:
Sender -> Public PSTN -> provider -> SIP trunk (configured with G711a) -> Asterisk (13.6.0)

My extension.conf on relevant section is this (obviously this is not production code):
exten => s,1,Answer()
same => n,Verbose(0, Attempt to Receive FAX)
same => n,Set(FAXOPT(gateway)=no)
same => n,ReceiveFax(/var/workspace/testfax.tiff,d)
same => n,Hangup()

and Server*CLI> module show like fax Module Description Use Count Status Support Level res_fax.so Generic FAX Applications 1 Running core res_fax_spandsp.so Spandsp G.711 and T.38 FAX Technologies 0 Running extended
2 modules loaded

Thank you for your assistance,

Kind Regards, Harel Cohen

3 thoughts on - FAX CNG Detected But No Fax Extension

  • The good news is you don’t really have anything wrong and as things are working as expected, you can ignore the warning if you so choose.

    What generates that error is that on your trunk, you have faxdetect=yes. This will cause Asterisk to listen in to all your calls on that trunk and try to detect a fax and if it finds it will redirect it to a fax extension to be handled as a fax.

    You have written a fax handler for your fax lines, but that doesn’t stop the fax detection from trying to route it to an extension called fax. Since this doesn’t exist in your case, you get the warning, but the fax is received because you are handling in the current path.

    Where things would actually break is if someone sent a fax to one of your voice lines. If you don’t have a fax extension to send it to, the person being called would pick up to fax tones. If you do have a fax extension, they would get the call yanked from them and it would be sent over to the fax extension. In my particular case, testing shows I get about half a ring to my desk phone before the system determines fax call and sends it to the fax system.

  • Just an FYI, in the dialplan below, The ReceiveFax() application receives the fax document and then automatically hangs up the call when it is finished. That means Asterisk will then jump to the hangup extension in the same context (if it exists) without executing any lines of code after the ReceiveFax line (the Hangup() never gets executed). Regards;
    John V.

    —–Original Message—

  • Hi Kevin,

    Thank you for your detailed answer which explained some basics of what I need to know about fax.

    So if I have a number which is dedicated for fax I could actually do without faxdetect=yes in sip.conf, right?

    John, thank you for your input as well. Indeed I’ve noticed that the hangup() is never executed but it’s my habit to put one in such small modules to avoid nasty auto-fallthrough when you don’t expect it…

    Kind Regards,

    Harel Cohen Director

    Mayorcom Limited Mobile: +350 58009379

    Office: +350 20066665

    harel@mayorcom.com

    From: kevin.larsen@pioneerballoon.com [mailto:kevin.larsen@pioneerballoon.com]
    Sent: Tuesday, 29 November, 2016 5:24 PM
    To: harel@mayorcom.com; Asterisk Users Mailing List – Non-Commercial Discussion
    Subject: Re: [asterisk-users] FAX CNG detected but no fax extension

    The good news is you don’t really have anything wrong and as things are working as expected, you can ignore the warning if you so choose.

    What generates that error is that on your trunk, you have faxdetect=yes. This will cause Asterisk to listen in to all your calls on that trunk and try to detect a fax and if it finds it will redirect it to a fax extension to be handled as a fax.

    You have written a fax handler for your fax lines, but that doesn’t stop the fax detection from trying to route it to an extension called fax. Since this doesn’t exist in your case, you get the warning, but the fax is received because you are handling in the current path.

    Where things would actually break is if someone sent a fax to one of your voice lines. If you don’t have a fax extension to send it to, the person being called would pick up to fax tones. If you do have a fax extension, they would get the call yanked from them and it would be sent over to the fax extension. In my particular case, testing shows I get about half a ring to my desk phone before the system determines fax call and sends it to the fax system.

LEAVE A COMMENT