12 thoughts on - Problem with ReceiveFax

  • Hi

    Can’t test till Monday morning now but will post results once I can.
    However, the f option doesn’t sho in core show application for that
    version:
    ‘core show application ReceiveFAX’
    [sudo] password for ish:

    -= Info about application ‘ReceiveFAX’ =-

    [Synopsis]
    Receive a Fax

    [Description]
    Receives a FAX from the channel into the given filename overwriting the file
    if it already exists.
    File created will be in TIFF format.
    This application sets the following channel variables:
    ${LOCALSTATIONID}: To identify itself to the remote end
    ${LOCALHEADERINFO}: To generate a header line on each page
    ${FAXSTATUS}:
    SUCCESS
    FAILED
    ${FAXERROR}: Cause of failure
    ${REMOTESTATIONID}: The CSID of the remote side
    ${FAXPAGES}: Number of pages sent
    ${FAXBITRATE}: Transmission rate
    ${FAXRESOLUTION}: Resolution of sent fax

    [Syntax]
    ReceiveFAX(filename[,c])

    [Arguments]
    filename
    Filename of TIFF file save incoming fax
    c
    Makes the application behave as the calling machine
    (Default behavior is as answering machine)

    [See Also]
    Not available

    Otherwise I would have tried it!

    Thanks

    Ish

  • [..snip..]

    The res_fax module was fixed to correctly display in 1.8.8.0.

    I am currently running 1.8.9.2 and this what is shown

    -= Info about application ‘ReceiveFAX’ =-

    [Synopsis]
    Receive a FAX and save as a TIFF/F file.

    [Description]
    This application is provided by res_fax, which is a FAX technology agnostic
    module that utilizes FAX technology resource
    modules to complete a FAX
    transmission.
    Session arguments can be set by the FAXOPT function and to check results
    of the ReceiveFax() application.

    [Syntax]
    ReceiveFAX(filename[,options])

    [Arguments]
    options
    d: Enable FAX debugging.

    f: Allow audio fallback FAX transfer on T.38 capable channels.

    s: Send progress Manager events (overrides statusevents setting in
    res_fax.conf).

    [See Also]
    FAXOPT

    Cheers,

    Larry.

  • I’ve tried this with the f option on receiveFax but it still isn’t
    working. Any insight would be helpful as this is driving me a bit potty

    == Using UDPTL CoS mark 5
    == Using SIP RTP CoS mark 5

  • Looking at the information you have sent in this posting in certainly
    appears that the ‘f’ option has indeed helped however you have another
    matter to overcome.

    You may wish to set the following parameters in your peer configuration
    for 588.

    ignoresdpversion=yes
    directmedia=no

    I use Spandsp FAX successfully.

    I have also attached an analogue Fax Modem to the FXS port on an SPA8800
    and an HT-502 and have been able to receive faxes on them when I last
    tested, the SPA8800 like the HT-502 are now in storage.

    Looking at the User Guide for the Vigor 2701 there is an option in the
    configuration to enable T.38 mode, did you enable it?

    In my sip.conf I have the following;

    [general]
    .
    .
    .
    faxdetect=cng
    t38pt_udptl=yes,redundancy,maxdatagram=400
    ;t38pt_usertpsource=yes
    .
    .
    .
    [903]
    ; Cisco SPA8800 FXS Port 3
    ; Grandstream HT502 FXS Port 1
    ; Analogue FAX Modem attached
    type=friend
    defaultuser=903
    secret=you_guessed_it
    call-limit=2
    disallow=g722
    transport=udp
    qualify=yes
    canreinvite=no
    directmedia=no
    host=dynamic
    context=FAX-T38
    faxdetect=no

    Larry.

  • When the T.38 re-INVITE was rejected by your SIP peer, they sent an SDP
    offer with the audio stream set to port number zero (‘0’). This means
    the audio stream is not active, and thus cannot be used.

  • “FAXFILE=/tmp/fax-588-20120312-092231.tiff”)
    “/tmp/fax-588-20120312-092231.tiff,f”)
    ‘/tmp/fax-588-20120312-092231.tiff’
    channel ‘SIP/588-00000000’ refused to negotiate T.38
    Unsupported SDP media type in offer: audio 0 RTP/AVP 8
    due to no acceptable offer found
    channel ‘SIP/588-00000000’ FAX session ‘0’ failure, reason: ‘fax session
    timed-out’ (TIMEOUT)
    FAILED”)
    TIMEOUT”)
    “)
    “)
    ish@-net.co.uk< /tmp/fax-588-20120312-092231.tiff")
    ‘FAILED’ (FAX_NO_FAX), error: ‘T1_TIMEOUT’, pages: 0, resolution:
    ‘unknown’, transfer rate: ‘2400’, remoteSID: ”

    Looking at the information you have sent in this posting in certainly
    appears that the ‘f’ option has indeed helped however you have another
    matter to overcome.

    You may wish to set the following parameters in your peer configuration
    for 588.

    ignoresdpversion=yes
    directmedia=no

    I use Spandsp FAX successfully.

    I have also attached an analogue Fax Modem to the FXS port on an SPA8800
    and an HT-502 and have been able to receive faxes on them when I last
    tested, the SPA8800 like the HT-502 are now in storage.

    Looking at the User Guide for the Vigor 2701 there is an option in the
    configuration to enable T.38 mode, did you enable it?

    In my sip.conf I have the following;

    [general]
    .
    .
    .
    faxdetect=cng
    t38pt_udptl=yes,redundancy,maxdatagram=400
    ;t38pt_usertpsource=yes
    .
    .
    .
    [903]
    ; Cisco SPA8800 FXS Port 3
    ; Grandstream HT502 FXS Port 1
    ; Analogue FAX Modem attached
    type=friend
    defaultuser=903
    secret=you_guessed_it
    call-limit=2
    disallow=g722
    transport=udp
    qualify=yes
    canreinvite=no
    directmedia=no
    host=dynamic
    context=FAX-T38
    faxdetect=no

    Larry.

  • Does anyone know if these settings are correct and if not, how to change
    them?

    CLI> fax show settings
    FAX For Asterisk Settings:
    ECM: Enabled
    Status Events: On
    Minimum Bit Rate: 2400
    Maximum Bit Rate: 14400
    Modem Modulations Allowed: V17,V27,V29

    FAX Technology Modules:

    DIGIUM (Digium FAX Driver) Settings:
    Maximum T.38 Packet Delay: 800
    T.38 Session Packet Capture: Off
    G.711 Session Audio Capture: Off

    Ish

  • In SIP Account Configuration on Draytek;

    Set Voice Active Detect to Off

    In Phone Settings on the Draytek;

    Enable Symmetric RTP
    Check Start & End RTP Ports match values set in /etc/asterisk/udptl.conf
    for udptlstart & udptlend

    In /etc/asterisk/udptl.conf set;

    use_even_ports=yes

  • This is unnecessary; the two endpoints are free to use different port
    ranges if they wish, it won’t make any difference.

  • Thanks for the above, I was hoping to have replied earlier with a
    success message buy alas, no joy to be had.

    Could I be having some sort of DTMF issue? I noticed this in amongst the
    console output once I set the console logging level to include dtmf

    [2012-03-13 12:06:39] DTMF[24784]: channel.c:3976 __ast_read: DTMF end ‘f’ received on SIP/588-0000000c, duration 0 ms
    [2012-03-13 12:06:39] DTMF[24784]: channel.c:4002 __ast_read: DTMF begin emulation of ‘f’ with duration 100 queued on SIP/588-0000000c
    [2012-03-13 12:06:39] DTMF[24784]: channel.c:4138 __ast_read: DTMF end emulation of ‘f’ queued on SIP/588-0000000c

    does the above look correct for an inbound fax?

    Thanks in advance (again!)

    Ish

  • Yes. In Asterisk, a DTMF ‘f’ is the FAX CNG tone emitted by calling FAX
    terminals.

  • It’s now time to do some debugging.

    I would suggest you capture packets between asterisk and peer 588 using
    tcpdump, make sure you enable a large enough snaplen (-s) to ensure you
    capture all packets in the frame.

    Submit your fax and upon completion of the session whether or not it is
    received successfully, transfer the file where you can open the captured
    file in Wireshark and select VoIP Calls located in the Telephony menu.
    You can then select the relevant line or lines in the session and click
    on the “Flow” button and review what is happening.

    I have a Grandstream HT-503 at the other end of an IPSEC vpn which has
    the FXO port connected to a PSTN line.

    I have configured the HT-503 to call the fax extension in the dialplan
    when it answers a call hence I have disabled faxdetect in the peer
    configuration.

    Looking at the Draytek manual I think this would be setup in VoIP >>
    Phone Settings by enabling Call Forwarding and setting it to “Always”
    and defining the SIP URL as fax@, assuming you have a
    fax extension enabled in the context of the peer. I am assuming you
    currently have this set to 200@
    .

    Did you disable VAD on the Draytek.

    I would also suggest you disable “Call Waiting” & “Call Transfer”.

    You may also want to look at “Volume Gain” in case that affects the
    level of the signal being converted to T.38 on the Draytek. Testing by
    progressively decreasing the level and if that doesn’t help then
    increasing it.

    Here is the peer configuration I just tested with my HT-503.

    T.38 is enabled in the [general] section of sip.conf

    [0123456789]
    type=peer
    defaultuser=0123456789
    secret=you_guessed_it
    call-limit=2
    host=dynamic
    disallow=g722
    g726nonstandard=yes ;(this is required for Sipura and
    Grandstream ATAs, among others).
    transport=udp,tcp
    encryption=no
    directmedia=no
    faxdetect=no
    context=Fax-Test
    qualify=yes

    Good luck.

    Larry.