[asterisk-users] FAX CNG detected but no fax extension

Harel harel at mayorcom.com
Tue Nov 29 12:30:58 CST 2016

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

Mayorcom Limited
Mobile:    +350 58009379

Office:     +350 20066665

 <mailto:harel at mayorcom.com> harel at mayorcom.com


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


> 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

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. 
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20161129/a3db8dfb/attachment.html>

More information about the asterisk-users mailing list