I suspect I followed a guide much like the one you have used including information found on voip-info - sorry, I can't seem to find any bookmarks of relevant information.

I spent an enormous amount of time getting it working and working very well, the real issue was getting T.38 working - I applied a patch to Asterisk version 1.8 to get the T.38 gateway functionality.

I would have started off my testing by confirming communications between two IAX modems, I presume you are using HylaFAX too.

Once the communications between the two IAX modems was working I progressed with testing sending and receiving faxes using G711A through my VoIP service and a modem attached to a PSTN service, suffice to say T.38 functionality was the key to getting reliable faxes working through VoIP at least when traversing the Internet, fortunately my VoIP provider facilitates T.38.

Using an SPA8800 on my network I tested sending and receiving faxes with a modem attached to the SPA8800, it worked in G711A and T.38.

I progressed to Asterisk 11 where the T.38 gateway functionality is better along with other improvements.

What is the output on your system for:

    fax show version


Cheers,

Larry.

On 15/11/2016 8:09 PM, tux john wrote:
Hi. Since I am messing a lot with it without seeing the end of, may I ask if there is any solid guide for that please?
On 13/11/2016, 07:42 Larry Moore <[email protected]> wrote:

    Some additional information which may help you with your installation.

    I have 4 IAX Modems named iaxmodem0 - iaxmodem3. I use iaxmodem3
    for outbound fax transmissions.

    I created a queue for the other 3 modems, here is my entry in
    queues.conf:

        [hylafax-iax]
        strategy=linear
        ringinuse=yes
        autopause=no
        retry=4
        timeout=5
        timeoutpriority=conf
        reportholdtime=no
        joinempty=strict
        leavewhenempty=strict
        musicclass=silence

        member => IAX2/iaxmodem2
        member => IAX2/iaxmodem1
        member => IAX2/iaxmodem0

    In case you are wondering about the 'musicclass' I have used, here
    is the section from musiconhold.conf, the actual location of the
    files may be elsewhere on your system:

        [silence]
        mode=files
        directory=/usr/local/share/asterisk/silence
        ; ls /usr/local/share/asterisk/silence
        ; 10.gsm
        ;
        ; The file 10.gsm came from
        /usr/local/share/asterisk/sounds/en/silence

    I changed 'callbackextension' in my sip.conf for the trunk so that
    it would go directly to the 'fax' extension in the dialplan i.e.
    'callbackextension=fax'.

    I've included the console output when an incoming fax is received:

          == Using SIP RTP TOS bits 184
            -- Executing [fax@from-itsp:1] NoOp("SIP/itsp-00000044",
        "Fax Detected 2016-11-13 12:33:40 +0800") in new stack
            -- Executing [fax@from-itsp:2] GotoIf("SIP/itsp-00000044",
        "0?3:8") in new stack
            -- Goto (from-itsp,fax,8)
            -- Executing [fax@from-itsp:8] NoOp("SIP/itsp-00000044",
        "Finish if_from-itsp_237") in new stack
            -- Executing [fax@from-itsp:9] GotoIf("SIP/itsp-00000044",
        "0?10:13") in new stack
            -- Goto (from-itsp,fax,13)
            -- Executing [fax@from-itsp:13] NoOp("SIP/itsp-00000044",
        "Finish if_from-itsp_238") in new stack
            -- Executing [fax@from-itsp:14] Set("SIP/itsp-00000044",
        "FAXOPT(gateway)=yes") in new stack
            -- Executing [fax@from-itsp:15] Queue("SIP/itsp-00000044",
        "hylafax-iax,dRt,,,15") in new stack
            -- Started music on hold, class 'silence', on
        SIP/itsp-00000044
            -- Call accepted by 127.0.0.1 (format alaw)
            -- Format for call is (alaw)
            -- IAX2/iaxmodem2-3086 is ringing
            -- Stopped music on hold on SIP/itsp-00000044
            -- IAX2/iaxmodem2-3086 answered SIP/itsp-00000044
               > 0x89bac000 -- Probation passed - setting RTP source
        address to <ITSP IP Address>:18998
          == Using UDPTL TOS bits 184
            -- Executing [h@from-itsp:1] GotoIf("SIP/itsp-00000044",
        "0?2:3") in new stack
            -- Goto (from-itsp,h,3)
            -- Executing [h@from-itsp:3] NoOp("SIP/itsp-00000044",
        "Finish if_from-itsp_239") in new stack
            -- Executing [h@from-itsp:4] NoOp("SIP/itsp-00000044",
        "Call/Fax Ended 2016-11-13 12:36:41 +0800") in new stack
            -- Hungup 'IAX2/iaxmodem2-3086'
          == Spawn extension (from-itsp, fax, 15) exited non-zero on
        'SIP/itsp-00000044'

    I'm sure you've already checked and confirmed you have 'alaw' and
    'ulaw' codecs permitted in your IAX Modems, iax.conf and sip.conf
    configurations

    To test your configuration you could set it up your environment so
    that you send an outgoing fax to yourself i.e. your dial your
    number at the VoIP provider, this assumes when you dial your VoIP
    number a connection is made back to you, you can then troubleshoot
    the communication.

    This is how I performed the majority of my tests.

    Not sure why you haven't explored the option of terminating a fax
    call in Asterisk, you will need some scripts to convert the
    received image to a PDF which is then e-mailed. An offer was made
    to you to provide scripts, if you set this up when your iaxmodem's
    aren't working a fallback will be for Asterisk to accept the call
    as it falls through, one thing you should know, if you use the
    T.38 Gateway in your dialplan you will need to disabled it prior
    to Asterisk terminating the call. I use extensions.ael so here is
    an example, I've included the macro I use to receive a fax in
    Asterisk:

        context from-itsp {

                s => {
                        NoOp(Call Received ${STRFTIME(,,%F %T %z)});
                        Set(CHANNEL(language)=en_AU);
                        Set(DIALTIMEOUT=30);
                        Progress();
                        NoOp(Call Received from ${CALLERID(name)},
        Tel: ${CALLERID(num)});
                .
                . other conditions checked and extensions dialled
                .
                };

                fax => {
                        NoOp(Fax Detected ${STRFTIME(,,%F %T %z)});
                        Set(FAXOPT(gateway)=yes);
                        Queue(hylafax-iax,dRt,,,15);

                        Set(FAXOPT(gateway)=no);
        &fax-receive(<TSID>,<Header>,FaxMaster,lmoore);
                        Hangup();
                };

                h => {
                        if ( "X${FAXRXFILE}" != "X" )
                        {
                                &email_rxfax();
                        }
                        NoOp(Call/Fax Ended ${STRFTIME(,,%F %T %z)});
                };
        };

        macro fax-receive( fax-number, header-info, sender, recipient ) {
        /*
                ${ARG1} is Receiving Station Fax Number
                ${ARG2} is Fax Header Information
                ${ARG3} is Fax Sender E-mail Address
                ${ARG4} is Fax Recipient E-mail Address
        */
                NoOp(**** FAX RECEIVE ****);
                Set(FAXOPT(localstationid)=${LOCAL(fax-number)});
                Set(FAXOPT(headerinfo)=${LOCAL(header-info)});
                Set(FROMADDR=${LOCAL(sender)});
                Set(TOADDR=${LOCAL(recipient)});
                NoOp(**** SETTING FAXOPT ****);
                NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)});
                NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)});
                NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)});
                Set(RXSTART=${EPOCH});
                Set(FAXRXPATH=/var/spool/asterisk/fax/received);
                Set(FAXRXFILE=fax-${CALLERID(number)}-${UNIQUEID});
                NoOp(**** RECEIVING FAX : ${FAXRXFILE} ****);
                ReceiveFAX(${FAXRXPATH}/${FAXRXFILE}.tif,f);
                NoOp(**** Subroutine Return ****);
                return;
                };

    Cheers,

    Larry.


    On 13/11/2016 8:07 AM, Larry Moore wrote:

        Is your network/firewall configuration permitting the ports
        for UDPTL, runn the command:  udptl show config

            UDPTL Global options
            --------------------
            udptlstart:      4000
            udptlend:        4999
            udptlfecentries: 3
            udptlfecspan:    3
            use_even_ports:  No
            udptlchecksums: Yes

        In your sip configuration for your 'mytrunk' peer have you set
        applicable options e.g.:

            t38pt_udptl=yes,redundancy,maxdatagram=400

        In your extensions.conf you could and probably should set the
        following option prior to dialing the IAX channel, this is to
        enable the T.38 gateway feature of Asterisk 11:

            Set(FAXOPT(gateway)=yes)

        I have it working in my installation however I have incoming
        voice calls too hence I use 'faxdetect' to direct the call to
        the 'fax' extension.

        Cheers,

        Larry.

        On 12/11/2016 5:24 AM, tux john wrote:

            hi. i am using asterisk 11.24.1 in my raspberry. i do have
            a sip trunk with a provider with g711a. I am trying to
            setup a fax server by following the guide
            inhttp://the-asterisk-book.com/1.6/faxserver.html.
            i do live in Greece and the number is 00302112152130
            the problem is that i am getting the following error and i
            am stuck:
              == Using SIP RTP TOS bits 184
              == Using SIP RTP CoS mark 5
                -- Executing [00302112152130@fax-in:1]
            Dial("SIP/mytrunk-00000001", "IAX2/iaxmodem") in new stack
                -- Called IAX2/iaxmodem
                -- Hungup 'IAX2/iaxmodem-3818'
              == Everyone is busy/congested at this time (1:0/0/1)
                -- Auto fallthrough, channel 'SIP/mytrunk-00000001'
            status is 'CHANUNAVAIL'
            RasPBX*CLI>
            the extensions.conf has
            [fax-in]
            exten => 00302112152130,1,Dial(IAX2/iaxmodem)
            any ideas, please?






    --
    _____________________________________________________________________
    -- Bandwidth and Colocation Provided byhttp://www.api-digital.com
    <http://www.api-digital.com> -- Check out the new Asterisk
    community forum at:https://community.asterisk.org/
    <https://community.asterisk.org/> New to Asterisk? Start
    here:https://wiki.asterisk.org/wiki/display/AST/Getting+Started
    <https://wiki.asterisk.org/wiki/display/AST/Getting+Started>
    asterisk-users mailing list To UNSUBSCRIBE or update options
    visit:http://lists.digium.com/mailman/listinfo/asterisk-users
<http://lists.digium.com/mailman/listinfo/asterisk-users>



-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to