Menu

running with SIP?

Help
2009-12-01
2013-05-28
  • Brian Postow

    Brian Postow - 2009-12-01

    Has ANYONE actually gotten t38modem to work with SIP? I've tried several different combinations versions, and they either don't compile, or when run, they don't ever actually send out any IP Packets, or if they do, they get an error very early on…

    There also doesn't seem to be any documentation on how to run it. Via some people on the hylafax list, my current command line is:

        t38modem -tt -o t38modem.log -no-h323 -u T38modem -sip-listen udp\$127.0.0.1:6060 -sip-redundancy 3 -ptty /dev/ttypb -route "modem:2.*=sip:<dn>@192.168.90.95" -route "modem:0.*=sip:<dn>@127.0.0.1" -route "sip:.*=modem:<dn>"

    But I'm not sure what all that means (and the -sip-redundancy arg seems to be ignored…). Some documentation so that I could see what these route lines actually mean, for example, would be very helpful.

    thanks!

     
  • Dima77

    Dima77 - 2009-12-01

    >Has ANYONE actually gotten t38modem to work with SIP?

    It is not a problem.
    What version ptlib/opal/t38modem do you try with?

    -sip-redundancy is a very old command and currently not used
    To see help and possible commands, create help.txt file.
    To do it, run command

    t38modem.exe -h > help.txt

     
  • Brian Postow

    Brian Postow - 2009-12-01

    Currently, I'm running with
    T38Modem Version 1.1.0
    (OPAL-3.6.5, PTLIB-2.6.5) by Vyacheslav Frolov on Unix Darwin (10.2.0-i386)

    After trying to make a call, I get:

    2009/12/01 17:17:18.405 ptypb(e):2…0xb038d000 ModemEndPoint::GetMediaFormats
    2009/12/01 17:17:18.407 ptypb(e):2…0xb038d000 SIP     PDU Write failed: Input/output error
    2009/12/01 17:17:18.407 ptypb(e):2…0xb038d000 SIP     Could not write to sip:25554444@192.168.90.95 - Input/output error

     
  • Tom J.P. Sun

    Tom J.P. Sun - 2009-12-31

    Hi ,
    Please try modify the "-ptty /dev/ttypb" option to "-ptty +/dev/ttypb" !

     
  • Tom J.P. Sun

    Tom J.P. Sun - 2009-12-31

    Also, I have encountered another problem . And found here is the only place to ask for help !

    When using 2 minicoms opened with ttyT38-1, ttyT38-2 , when I dialed "atd0123" in minicom(/dev/ttyT38-1), there is "Ring" in another minicom(/dev/ttyT38-2) , but could not have the command "ata" get the "connected" reply, the first minicom failed after a few seconds with a "BUSY" result. 

    My environment is Debian Testing, libopal-3.6.6, libpt-2.6.5, t38modem-1.2.0

    The compiling command for t38modem is : "USE_UNIX98_PTY=1 USE_OPAL=1 make opt"

    The invoke command is :
    ./t38modem -tt -o /var/log/t38modem.log -no-h323 -u T38modem -sip-listen udp\$127.0.0.1:5060 -sip-redundancy 3 -ptty +/dev/ttyT38-1,+/dev/ttyT38-2,+/dev/ttyT38-3 -route "modem:.*=sip:<dn>@127.0.0.1" -route "sip:.*=modem:<dn>"

    The suspect part in the log is (maybe in the following last 3 lines):

    2009/12/31 10:00:51.749 ttyT38-1(e…0xb64fbb70 ModemEndPoint::OnMyCallback requ
    est={
    calltoken=modem:0123/ff5b425492/0
    mode=fax
    command=requestmode
    response=confirm
    modemtoken=ttyT38-1
    }
    2009/12/31 10:00:51.749  PThread1Arg:0xb612cb70 ModemConnection::GetMediaFormats
    Call-EP<modem>
    2009/12/31 10:00:51.749  PThread1Arg:0xb612cb70 ModemEndPoint::GetMediaFormats
    2009/12/31 10:00:51.776  PThread1Arg:0xb612cb70 RTP     Changed RTP session form
    at from 'rtp/avp' to 'udptl'
    2009/12/31 10:00:51.776  PThread1Arg:0xb612cb70 ModemConnection::GetMediaFormats
    Call-EP<modem>
    2009/12/31 10:00:51.776  PThread1Arg:0xb612cb70 ModemEndPoint::GetMediaFormats
    2009/12/31 10:00:51.781  PThread1Arg:0xb612cb70 ModemConnection::CreateMediaStre
    am Call-EP<modem> mediaFormat=T.38 sessionID=1 isSource=1
    2009/12/31 10:00:51.781  PThread1Arg:0xb612cb70 ModemConnection::CreateMediaStream Call-EP<modem> mediaFormat=T.38 sessionID=1 isSource=0
    2009/12/31 10:00:51.781  PThread1Arg:0xb612cb70 ModemEngineBody::Attach t38engine stReqModeAckWait
    2009/12/31 10:00:51.781  PThread1Arg:0xb612cb70 ttyT38-1 T38Engine::Attach
    2009/12/31 10:00:51.781  PThread1Arg:0xb612cb70 ModemEngineBody::Attach t38engine Attached
    2009/12/31 10:01:13.372  Housekeeper:0xb63b6b70 SIP     Response received for unknown handler ID: 0858ecf7-1df4-de11-9213-000ea6f84640@mobian
    2009/12/31 10:01:13.373    OnRelease:0xb612cb70 ModemConnection::OnReleased Call-EP<modem>
    2009/12/31 10:01:13.373    OnRelease:0xb612cb70 Call cleared


    Any help is appreciated !

     
  • Tom J.P. Sun

    Tom J.P. Sun - 2009-12-31

    Hi:

    By modifying the command in the previous post :

    ./t38modem -t -o /var/log/t38modem.log -no-h323 -u T38modem -sip-listen udp\$192.168.3.65:5060  -ptty +/dev/ttyT38-1,+/dev/ttyT38-2,+/dev/ttyT38-3 -route "modem:.*=sip:< dn >@192.168.3.65" -route "sip:.*=modem:< dn >"

    by using the real IP address 192.168.3.65 of the same machine instead of 127.0.0.1, I got different log error :

    2009/12/31 16:33:27.053         Pool:0xb62efb70 SIP Could not find media formats in SDP media description for session 1

    any idea ?

     
  • Vyacheslav Frolov

    Try with OPAL from SVN trunk.

     
  • il davo

    il davo - 2010-01-11

    My problem is that I don't know which is the problem :)
    I used:
    ptlib-2.6.5
    opal-3.6.6
    t38modem-1.2.0
    Ubuntu Linux 8.04 LTS

    I managed to build the binary without errors but when I do "./t38modem -help" I see the following error:

    ...
     Modem drivers:
      PTY
        Uses pseudo-tty (pty) devices to communicate with a fax application.
        For legacy ptys the tty should match to the regexp
          '^(/dev/)?tty[pqrstuvwxyzabcde][0123456789abcdef]$'
          assert.cxx(108)   PWLib   Assertion fail: Function pthread_mutex_destroy failed, file ptlib/unix/tlibthrd.cxx, line 1491, Error=2
    Assertion fail: Function pthread_mutex_destroy failed, file ptlib/unix/tlibthrd.cxx, line 1491, Error=2
    <A>bort, <C>ore dump?
    

    I googled a bit around but I have no clue.
    If I run it anyway with this syntax something works:

    ./t38modem -t -o /tmp/t38modem.log --no-h323 -p ttyx0,ttyx1 --route "modem:.*=sip:<dn>@192.168.1.213:5062" --route "sip:.*=modem:<dn>"
    

    the calls in and out the modem seems to start but I can't hear the typical whistle…and I receive a "No Carrier Detect" on the fax machine.
    I have the feeling that I'm near to solution but I'd like a little push on the right direction :)
    Thanx in advance!

     
  • il davo

    il davo - 2010-01-12

    Well…seems I managed to solve my problem.
    I had to cleanup my test server from all my previous attempt and build ptlib, opal and t38modem from scratch.
    But this time I used the latest stable sources from svn repository, ptlib V2_7 and opal V3_7 as described here:
    http://www.opalvoip.org/wiki/index.php?n=Main.Subversion&Itemid=59
    After that I followed the instructions on Opal Wiki:
    http://www.opalvoip.org/pmwiki/pmwiki.php?n=Main.BuildingPTLibUnix#Install
    http://www.opalvoip.org/pmwiki/pmwiki.php?n=Main.BuildingOpalUnix#Noinstall
    And last I build the t38modem binary following the ReadMe.txt inside the source tgz.

    With the new binary t38modem i'm able to send and receive fax using hylafax and a Gateway SN4638 Patton.
    Sure I need further testing but now I'm optimist. Here the command used to run t38modem:

    ./t38modem -t -o /tmp/t38modem.log --no-h323 -p ttyx0,ttyx1 --route "modem:.*=sip:<dn>@192.168.0.254:5062" --route "sip:.*=modem:<dn>"
    

    Where 192.168.0.254 is the Gateway listening on port 5062 instead of 5060, while t38modem is listening on the defaults port.
    Hope this may help.

     
  • Tom J.P. Sun

    Tom J.P. Sun - 2010-01-14

    yes , by following vfrolov's suggestion, and the web page indicated by lokutus25 in the last reply, we can get svn thunk for :
    ptlib 2.7.1
    opal 3.7.1
    t38modem 1.2.1

    the compiling steps is :

    # build pwlib
    cd ~/pwlib
    ./configure
    make
    sudo make install
    # build OPAL
    cd ~/opal
    ./configure
    make
    sudo make install
    sudo ldconfig
    # build T38modem
    cd ~/t38modem
    make USE_OPAL=1  opt
    sudo make USE_OPAL=1  install
    

    remember to have the kernel support CONFIG_UNIX98_PTYS=y
    the t38modem command I use is:

    t38modem -tt -o /var/log/t38modem.log --no-h323 -p ttyx0,ttyx1 --route "modem:.*=sip:<dn>@192.168.3.65:5060" --route "sip:.*=modem:<dn>"
    

    the 192.168.3.65 is real IP of the local machine.

    the test result is:
      1. open 2 minicoms, "atd0123" can "CONNECT" now. ( while the release version t38modem-1.2 cannot )
      2. combined with hylafax is working now. ( send fax from one t38modem to the other is OK)

     
  • Damir

    Damir - 2010-01-14

    I have a problem with modems:

    I have following :

    Modem ttyT38-0 (): Waiting for modem to come ready 

    Does anybody have a clue….

     
  • Tom J.P. Sun

    Tom J.P. Sun - 2010-01-14

    Please see this about "Configuring HylaFax to use T38modem"

     
  • Damir

    Damir - 2010-01-15

    Where to find t38modem ver 1.2.1 or I can use 1.2.0

     
  • il davo

    il davo - 2010-01-15

    Personally I wasn't able to download the last snapshot of t38modem with cvs due to an incorrect login.
    I used the standard tarball of 1.2.0. and it worked. But if I can get the 1.2.1 I'll test also the last one :)

     
  • Damir

    Damir - 2010-01-15

    Noe I have following error during t38modem install:

    debian:~/t38modem-1.2.0# make USE_OPAL=1 opt
    make DEBUG= default_target
    make: Entering directory `/root/t38modem-1.2.0'
    obj_linux_x86_opal/t38modem
    ./obj_linux_x86_opal/pmodeme.o: In function `Timeout::Timeout(PNotifier const&, bool)':
    pmodeme.cxx:(.text._ZN7TimeoutC1ERK9PNotifierb+0x54): undefined reference to `PTimer::SetNotifier(PNotifier const&)'
    ./obj_linux_x86_opal/modemep.o:(.data.rel.ro._ZTV15ModemConnection+0x16c): undefined reference to `OpalConnection::TransmitInternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/modemep.o:(.data.rel.ro._ZTV15ModemConnection+0x170): undefined reference to `OpalConnection::OnReceiveInternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/modemep.o:(.data.rel.ro._ZTV15ModemConnection+0x174): undefined reference to `OpalConnection::TransmitExternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/modemep.o:(.data.rel.ro._ZTV15ModemConnection+0x178): undefined reference to `OpalConnection::OnReceiveExternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/modemep.o:(.data.rel.ro._ZTV21AudioModemMediaStream+0x40): undefined reference to `OpalMediaStream::SetCommandNotifier(PNotifier const&)'
    ./obj_linux_x86_opal/modemstrm.o:(.data.rel.ro._ZTV19T38ModemMediaStream+0x40): undefined reference to `OpalMediaStream::SetCommandNotifier(PNotifier const&)'
    ./obj_linux_x86_opal/h323ep.o:(.data.rel.ro._ZTV16MyH323Connection+0x4c): undefined reference to `H323Connection::IsConnectionOnHold()'
    ./obj_linux_x86_opal/h323ep.o:(.data.rel.ro._ZTV16MyH323Connection+0x16c): undefined reference to `OpalConnection::TransmitInternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/h323ep.o:(.data.rel.ro._ZTV16MyH323Connection+0x170): undefined reference to `OpalConnection::OnReceiveInternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/h323ep.o:(.data.rel.ro._ZTV16MyH323Connection+0x174): undefined reference to `OpalConnection::TransmitExternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/h323ep.o:(.data.rel.ro._ZTV16MyH323Connection+0x178): undefined reference to `OpalConnection::OnReceiveExternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/h323ep.o:(.data.rel.ro._ZTV14MyH323EndPoint+0xd0): undefined reference to `OpalRTPEndPoint::AdjustInterfaceTable(PIPSocket::Address&, PArray<PIPSocket::InterfaceEntry>&)'
    ./obj_linux_x86_opal/sipep.o: In function `MySIPEndPoint::Initialise(PConfigArgs const&)':
    sipep.cxx:(.text+0xf25): undefined reference to `SIPRegister::Params::Params()'
    ./obj_linux_x86_opal/sipep.o:(.data.rel.ro._ZTV15MySIPConnection+0x4c): undefined reference to `SIPConnection::IsConnectionOnHold()'
    ./obj_linux_x86_opal/sipep.o:(.data.rel.ro._ZTV15MySIPConnection+0x16c): undefined reference to `OpalConnection::TransmitInternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/sipep.o:(.data.rel.ro._ZTV15MySIPConnection+0x170): undefined reference to `OpalConnection::OnReceiveInternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/sipep.o:(.data.rel.ro._ZTV15MySIPConnection+0x174): undefined reference to `SIPConnection::TransmitExternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/sipep.o:(.data.rel.ro._ZTV15MySIPConnection+0x178): undefined reference to `OpalConnection::OnReceiveExternalIM(OpalMediaFormat const&, RTP_DataFrame&)'
    ./obj_linux_x86_opal/sipep.o:(.data.rel.ro._ZTV15MySIPConnection+0x248): undefined reference to `SIPConnection::OnUseRTPSession(unsigned int, OpalMediaType const&, OpalTransportAddress const&, OpalTransportAddress&)'
    ./obj_linux_x86_opal/sipep.o:(.data.rel.ro._ZTV15MySIPConnection+0x250): undefined reference to `SIPConnection::OfferSDPMediaDescription(OpalMediaType const&, unsigned int, OpalRTPSessionManager&, SDPSessionDescription&)'
    ./obj_linux_x86_opal/sipep.o:(.data.rel.ro._ZTV13MySIPEndPoint+0xd0): undefined reference to `OpalRTPEndPoint::AdjustInterfaceTable(PIPSocket::Address&, PArray<PIPSocket::InterfaceEntry>&)'
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: Leaving directory `/root/t38modem-1.2.0'
    make: ***  Error 2

    I downloaded opal and ptlib from SVN trunk this morning and installed them without problems. Does anybody have same experience or a clue about the problem?

     
  • Tom J.P. Sun

    Tom J.P. Sun - 2010-01-18

    http://t38modem.sourceforge.net/
    I followed the instruction of this page, and could download / run t38modem successfully

     
  • il davo

    il davo - 2010-01-19

    I just can tell that I was able to build the t38modem-1.2.0 after building ptlib and opal from svn.
    Those are the environment vars used:

    ptlib
    export PTLIBPLUGINDIR=/usr/local/lib/ptlib-2.7
    PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

    opal
    export PTLIBPLUGINDIR=/usr/local/lib/ptlib-2.7:/usr/local/lib/opal-3.7
    export LD_LIBRARY_PATH=/usr/local/lib
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

    t38modem
    export PTLIBDIR=/root/t38modem/ptlib-2.7
    export OPALDIR=/root/t38modem/opal-3.7

    If I use such environment I can build the t38modem-1.2.0 from cvs download with http://t38modem.sourceforge.net/  instructions. And also seems to works fine.
    But I can't build the "latest" cvs t38modem in the same way. I managed to download the latest CVS release with:
    cvs -d:pserver:anonymous@t38modem.cvs.sourceforge.net:/cvsroot/t38modem login
    cvs -z3 -d:pserver:anonymous@t38modem.cvs.sourceforge.net:/cvsroot/t38modem co -P t38modem

    When I run the usual: "make USE_OPAL=1 opt" I have the following errors:

    # make USE_OPAL=1 opt
    make DEBUG= default_target
    make[1]: Entering directory `/home/manage/t38modem/t38modem-cvs-last'
    g++ -I/home/manage/t38modem/ptlib-svn-2_7/include -DUSE_OPAL -DPTRACING=1 -D_REENTRANT    -fno-exceptions  -Wall  -DNDEBUG -Os  -DUSE_LEGACY_PTY -felide-constructors -Wreorder  -Os -Wall -Wextra -Wstrict-aliasing -Wfloat-equal -Wno-comment -Wno-unused -Winit-self -Wno-missing-field-initializers -fPIC -DPTRACING=1 -D_REENTRANT -fno-exceptions -I/usr/local/include    -I/home/manage/t38modem/opal-svn-3_7/include  -c opal/modemep.cxx -o obj_linux_x86_opal/modemep.o
    opal/modemep.cxx: In member function ‘virtual void ModemConnection::RequestMode(PThread&, INT)’:
    opal/modemep.cxx:745: error: no matching function for call to ‘OpalConnection::AdjustMediaFormats(bool, OpalMediaFormatList&, NULL)’
    /home/manage/t38modem/opal-svn-3_7/include/opal/connection.h:878: note: candidates are: virtual void OpalConnection::AdjustMediaFormats(OpalMediaFormatList&) const
    opal/modemep.cxx: In member function ‘bool ModemConnection::RequestMode(ModemConnection::PseudoModemMode)’:
    opal/modemep.cxx:795: error: no matching function for call to ‘OpalConnection::AdjustMediaFormats(bool, OpalMediaFormatList&, NULL)’
    /home/manage/t38modem/opal-svn-3_7/include/opal/connection.h:878: note: candidates are: virtual void OpalConnection::AdjustMediaFormats(OpalMediaFormatList&) const
    opal/modemep.cxx: In member function ‘bool ModemConnection::SwitchToFaxPassthrough(OpalConnection&)’:
    opal/modemep.cxx:832: error: no matching function for call to ‘OpalConnection::AdjustMediaFormats(bool, OpalMediaFormatList&, NULL)’
    /home/manage/t38modem/opal-svn-3_7/include/opal/connection.h:878: note: candidates are: virtual void OpalConnection::AdjustMediaFormats(OpalMediaFormatList&) const
    opal/modemep.cxx:873: error: no matching function for call to ‘ModemConnection::AdjustMediaFormats(bool, OpalMediaFormatList&, NULL)’
    /home/manage/t38modem/opal-svn-3_7/include/opal/connection.h:878: note: candidates are: virtual void OpalConnection::AdjustMediaFormats(OpalMediaFormatList&) const
    opal/modemep.cxx:874: error: no matching function for call to ‘OpalConnection::AdjustMediaFormats(bool, OpalMediaFormatList&, ModemConnection* const)’
    /home/manage/t38modem/opal-svn-3_7/include/opal/connection.h:878: note: candidates are: virtual void OpalConnection::AdjustMediaFormats(OpalMediaFormatList&) const
    opal/modemep.cxx:952: error: no matching function for call to ‘ModemConnection::AdjustMediaFormats(bool, OpalMediaFormatList&, NULL)’
    /home/manage/t38modem/opal-svn-3_7/include/opal/connection.h:878: note: candidates are: virtual void OpalConnection::AdjustMediaFormats(OpalMediaFormatList&) const
    opal/modemep.cxx:953: error: no matching function for call to ‘OpalConnection::AdjustMediaFormats(bool, OpalMediaFormatList&, ModemConnection* const)’
    /home/manage/t38modem/opal-svn-3_7/include/opal/connection.h:878: note: candidates are: virtual void OpalConnection::AdjustMediaFormats(OpalMediaFormatList&) const
    make[1]: *** [obj_linux_x86_opal/modemep.o] Error 1
    make[1]: Leaving directory `/home/manage/t38modem/t38modem-cvs-last'
    make: *** [opt] Error 2
    

    I can't figure why yet.

     
  • Damir

    Damir - 2010-01-20

    Can you please write where from did you downloaded ptlib and opal ???

     
  • il davo

    il davo - 2010-01-20

    I downloaded ptlib and opal from svn using the following instructions:
    http://www.opalvoip.org/wiki/index.php?n=Main.Subversion

    Browsing the SVN repository I saw which was the last versions for both.

     
  • Tom J.P. Sun

    Tom J.P. Sun - 2010-01-28

    OK, here is the commands which I successfully make the t38modem from source:

    svn co http://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/trunk ptlib
    svn co http://opalvoip.svn.sourceforge.net/svnroot/opalvoip/opal/trunk opal
    cvs -z3 -d:pserver:anonymous@t38modem.cvs.sourceforge.net:/cvsroot/t38modem co -P t38modem
    cd /root/ptlib
    ./configure
    make; make install
    cd /root/opal
    ./configure
    make; make install
    ldconfig
    export OPALDIR=/root/opal
    export PTLIBDIR=/root/ptlib
    cd /root/t38modem
    make USE_OPAL=1 clean [ don't know why, I failed in the initial compilation too, after clean, we can compile w/o problems]
    make USE_OPAL=1
    
     
  • Vyacheslav Frolov

    It's not possible to compile t38modem cvs trunk with Lalande release (PTLib v2.6 & OPAL v3.6).

    The OpalVoip announced the stabilisation campaign of Sirius release (PTLib v2.8 & OPAL v3.8).
    This is the last step on this becoming a standard stable release, superceding the Lalande release.
    So if you have any errors with compiling, it's a goot time to report them to OpalVoip community right now.

     

Log in to post a comment.