T38modem (almost)

Discussion in 'General' started by ikamp, Mar 15, 2011.

  1. ikamp

    Joined:
    Feb 3, 2010
    Messages:
    28
    Likes Received:
    0
    Hi all,

    I tried yesterday to use t38modem with latest elastix release (2.0.3) and hylafax.
    I think that I am very close so I will describe in detail what I did if anyone is interested or has any clue on how to wrap it up successfully.

    First of all you need to remove ptlib so

    yum remove ptlib

    Then download for dependencies specific revision for optlib and opal

    svn co https://opalvoip.svn.sourceforge.net/sv ... tlib/trunk -r 24174 ptlib
    svn co https://opalvoip.svn.sourceforge.net/sv ... opal/trunk -r 24174 opal

    then latest t38modem

    cvs -z3 -d:pserver:anonymous@t38modem.cvs.sourceforge.net:/cvsroot/t38modem co -P t38modem

    I downloaded everything in /root.

    #So we start by building ptlib

    cd /root/ptlib
    ./configure --prefix=/opt/t38modem
    make && make install

    #Then opal && opal spandsp plugin
    cd /root/opal
    export PKG_CONFIG_PATH=/root/ptlib
    ./configure --prefix=/opt/t38modem
    #build spandsp plugin (needs separate build - its excluded from main makefile due to licensing issues)
    cd plugins/fax/fax_spandsp/
    make && make install
    #then opal
    cd /root/opal/
    make && make install

    #finally t38modem
    cd /root/t38modem/
    export PTLIBDIR=/root/ptlib/
    export OPALDIR=/root/opal/
    make USE_OPAL=1 USE_UNIX98_PTY=1 opt

    #The precious binary lies inside obj_linux_x86_64_opal directory.
    #Obviously for 32bit it should have a slightly different name
    #Copy it in /opt/t38modem/bin
    cp obj_linux_x86_64_opal/t38modem /opt/t38modem/bin/.



    And this concludes our build process
    I tried to include a .tgz for the lazy ones (64bit version) with the output as well as other useful stuff but it seems it was rather big (15MB) so I wiped out all the binaries and included just some useful staff for a template /opt/t38modem directory.
    ===========================================================================================================
    Inside the .tgz a init.d script is included.

    cp /opt/t38modem/init.d/t38modem /etc/init.d/.
    chkconfig --add t38modem

    You can edit the number of faxmodems and the udp port they use (default is 5 faxmodems udp ports 6060-6064).

    You will also need a valid hylafax config (/opt/t38modem/hylafax/config.ttyx)
    Copy it to /var/spool/hylafax/etc/. and create config.ttyT38-0, config.ttyT38-1 and so on.

    Also you need to append (5 faxmodems)

    ft1:2345:respawn:/usr/sbin/faxgetty ttyT38-0
    ft2:2345:respawn:/usr/sbin/faxgetty ttyT38-1
    ft3:2345:respawn:/usr/sbin/faxgetty ttyT38-2
    ft4:2345:respawn:/usr/sbin/faxgetty ttyT38-3
    ft5:2345:respawn:/usr/sbin/faxgetty ttyT38-4

    in /etc/inittab

    Then

    init q
    service t38modem start
    service hylafax restart

    Also do create one sip extension for each faxmodem in elastix web-gui. Please do remember that you need to specify
    host 127.0.0.1 and port 6060 (for ttyT38-0). Ports increase like the faxmodem number.
    The log for each t38modem is in /opt/t38modem/log.
    ===========================================================================================================
    If you follow the instructions above (and I have not forgotten anything :p ) you will see everything ok.
    Needless to say that this setup was inspired by various blogs/posts/... I just took bits and pieces and got the thing together.

    Now the difficult part.

    I tried two configurations:

    a. t38modem (Hylafax) ATA (SPA3102) Xerox 6180D MFP Fax/Printer
    b. t38modem (Hylafax) Asterisk/Elastix 2.0.3 ATA (SPA3102) Xerox 6180D MFP Fax/Printer

    Obviously what i described above is configuration (b). You may easily adapt your settings to derive (a).
    The strange part is that (a) works like a charm! T38 fax ok while (b) is unsuccessful.
    Asterisk hangs up the call at some time (I think when the t38 reinvite takes place, but not sure yet and a bit
    tired to search further atm).


    I have added
    t38pt_udptl = yes,redundancy,maxdatagram=400
    instead of just
    t38pt_udptl = yes
    in sip_general_custom.conf but it did not make a difference.


    Any ideas are greatly appreciated.

    Best regards,

    Giannis


    P.S.: I know that i can use fax for asterisk for t38 faxing but free/open source solutions seem more attractive :p. http://forum.elastix.org/old_files/t38modem_template.tgz
     
  2. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    t38 modem is too buggy and not even the gurus at asterisk-es could make it work easily and we all give up trying....
     
  3. ikamp

    Joined:
    Feb 3, 2010
    Messages:
    28
    Likes Received:
    0
    Well I do not know if t38modem is that buggy..
    I would rather say it needs more attention than usual stuff :p

    However, at least I figured what is causing the problem:

    https://issues.asterisk.org/view.php?id=16327

    From a sip debug in cli, (and taking out most of the crap):

    Sending to 192.168.1.14 : 5060 (no NAT)
    Got T.38 offer in SDP in dialog 2811d9aa-67bf37a@192.168.1.14
    Got T.38 Re-invite without audio. Keeping RTP active during T.38 session.
    SIP/2.0 488 Not acceptable here

    Seems like an asterisk bug to me.
    Now I am open to suggestions :)

    Best regards,

    Giannis
     
  4. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    Re: Re:T38modem (almost)

    do u have tested with hand cmopiled modern asterisk for example 1.6.2.17 or 18 asterisk 1.8.3 or 4
     
  5. ikamp

    Joined:
    Feb 3, 2010
    Messages:
    28
    Likes Received:
    0
    No, I haven't. Actually I do not want to use asterisk 1.8 yet and would like something functional using elastix standard distribution. However I might get tempted to download latest 1.6 revision and try again.
     
  6. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    Re: Re:T38modem (almost)

    elastix OOTB is in the last months simply a joint venture of multiple prograns that are not working...and t38modem is buggy and not maintained so its not functional until the developers get on it again
     
  7. ikamp

    Joined:
    Feb 3, 2010
    Messages:
    28
    Likes Received:
    0
    Re: Re:T38modem (almost)

    Well everything needs some customisation to work as you like. However I believe that elastix is a very good suite of programs that delivers what is expected. Anyway, lets not turn it into a debate on elastix. Let's see if anyone can enlight us further or has any other ideas.
     
  8. fmvillares

    Joined:
    Sep 8, 2007
    Messages:
    1,785
    Likes Received:
    0
    Re: Re:T38modem (almost)

    well the debate is on the table ni other post as we are debating really hard of the future of the distro....as it is not delivering any of what is expected in a telephony solution and that is the consensus of all the experts...
    again the t38modem is not even endorsed by the gurus in the best list of the asterisk workd asterisk-es so instead i use the free app_fax from digium that is free for 1 channel and support cmoplete t38 protocol as endpoint and passthrough / gateway in asterisk 1.8
     

Share This Page