Problem with detecting fax on PRI/DAHDI channels

Home » Asterisk Users » Problem with detecting fax on PRI/DAHDI channels
Asterisk Users 6 Comments

Hello all,

I am using call files to dial out to a set of PSTN numbers. The calls
are going out fine and being handled correctly by the dial plan.

The problem occurs when I accidentally call a fax machine. I would
expect the dial plan to pick this up and jump to the “fax” extension
in the current context. This is not happening.

In the call file I send the call out via Dial(DAHDI/g0/XXXXXXXX) and
then it goes to my dial plan context:

[SendCall]
exten => start,1,Answer()
same => n, Wait(5)
same => n, ….. ;; do some more stuff

exten => fax,1,Verbose(got a Fax on ${EXTEN})
same =>n, Hangup()

;;;;

I do get a message on the CLI telling me “Channel 63 detected a CED
tone from the network” but still no jumping to the fax extension.
This is while dialplan is in the Wait(5).

CLI> core show version
Asterisk 1.8.4.1-1digium1~natty built by pbuilder @ nighthawk on a
x86_64 running Linux on 2011-05-23 22:05:17 UTC

ISDN lines connected via Digium TE412P card.

I have “faxdetect = both” in chan_dahdi.conf in the general section as
well as specifically for the configured spans.

Would appreciate any help.

Thanks

Sawan

6 thoughts on - Problem with detecting fax on PRI/DAHDI channels

  • ‘faxdetect’ is for detecting *calling* FAX machines, not *called* FAX
    machines. It listens for the CNG tone generated by a (non-V.34) calling
    FAX terminal.

    If you are wanting to detect that a number you have dialed is being
    answered by a FAX machine, there are applications available (but not
    included with Asterisk) to do that. I believe NVFaxDetect can do it, and
    most of the add-on answering machine detection applications can do it as
    well.

  • It does exactly what is says… it enables faxdetect based on the
    direction the channel was setup (incoming, outgoing, or “doesn’t
    matter”). ‘outgoing’ is used in some applications to redirect outgoing
    FAXes to a local FAX server, or to do store-and-forward FAX. It’s not as
    necessary as it used to be… when the only channel that had ‘faxdetect’
    functionality was chan_zap/chan_dahdi, ‘outgoing’ mode was necessary to
    be able to catch all outgoing FAXes (and redirect the incoming channel
    to a different destination in the dialplan). Now that chan_sip has
    ‘faxdetect’ as well, many usages of ‘outgoing’ in chan_dahdi are no
    longer necessary.

  • Many thanks for this.

    Where would I be able to get NVFaxDetect for Asterisk 1.8?

    Can you recommend a decent add-on ?

    Sawan

  • Everything after the channel line above will have no effect on the
    channels created by the above line. Thus the faxdetect=both below
    will not have any effect.

    Please note that the include is part of the chan_dahdi.conf
    config file.

    Richard

  • hi,

    I am also setting faxdetect=both in the individual channels in
    dahdi-channels.conf.

    ===snip===
    group=0,12
    context=from-pstn
    switchtype = euroisdn
    signalling = pri_cpe
    channel => 1-15,17-31
    context = default
    group = 63
    faxdetect = both

    =========

    Sawan

  • Same problem, you have these settings AFTER the channel => line, not before. Move the settings to BEFORE the channel => lines.