iLBC doesn't work with Elastix 2.0

Discussion in 'General' started by sunshinenetworks, Aug 10, 2010.

  1. sunshinenetworks

    Joined:
    Aug 10, 2010
    Messages:
    12
    Likes Received:
    0
    Hi guys,

    Got a problem compiling ilbc. I have compiled ILBC before on Elastix 1.6 ( Asterisk 1.4 ) without problems, but now with the new Elastix 2.0 I get errors. This is what happens :

    I compile the ilbc codec ( see my installation instructions in the bottom of this mail to recreate the problem, if you so wish ). That works fine, no problems.

    I then copy the codec_ilbc.so to /usr/lib64/asterisk/modules ( 64-bit ) and try to load the module, that's where I get this error :

    [Aug 10 11:36:21] WARNING[20077] loader.c: Module 'codec_ilbc.so' was not compiled with the same compile-time options as this version of Asterisk.
    [Aug 10 11:36:21] WARNING[20077] loader.c: Module 'codec_ilbc.so' will not be initialized as it may cause instability.
    [Aug 10 11:36:21] WARNING[20077] loader.c: Module 'codec_ilbc.so' could not be loaded.

    Can anyone tell me what the compile-time options are that I need to compile the ilbc codec with ?

    Here is my iLBC installation document so far :

    HowTo install iLBC codec on Elastix 2.0 by Sunshine Networks
    ============================================================
    # asterisk -r
    shows "Connected to Asterisk 1.6.2.10" or something similar. Download this version
    # cd /usr/src/
    # wget http://downloads.asterisk.org/pub/telep ... .10.tar.gz
    # tar xvzf asterisk-1.6.2.10.tar.gz
    # cd asterisk-1.6.2.10
    # yum install libxml2 -y
    # yum install libxml2-devel -y
    # yum install ncurses-devel -y
    # ./contrib/scripts/get_ilbc_source.sh
    --> I tried this in my second try, didn't help. First try was done without this
    # cp /usr/include/asterisk/*.* /usr/src/asterisk/include/asterisk/
    --> end of second try
    # ./configure
    # make menuconfig
    Make sure you select :
    Codec Translators -> codec_ilbc
    Click Save and Exit
    # make
    This will build the iLBC codec on your system.
    This will take anywhere from a few minutes on very fast systems to over 15 minutes on slower systems.
    This would be a good moment to grab a cuppa.
    Once it's done ( you see a root prompt ), you need to copy ./codecs/codec_ilbc.so to /usr/lib/asterisk/modules.
    # cd codecs
    # cp ./codec_ilbc.so /usr/lib/asterisk/modules/
    Now tell Elastix ( asterisk ) to load the iLBC codec :
    # asterisk -r
    *CLI> module load codec_ilbc.so
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    This is where I get the error
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    I think that perhaps

    .
    .
    cp /usr/include/asterisk/*.* /usr/src/asterisk/include/asterisk/
    .
    .

    might have been a small problem, that would have overwritten the headers from your existing system , (possibly not the same) to the source you got from the tarball you downloaded, the proper ones were surely there already?.

    regards

    dicko
     
  3. sunshinenetworks

    Joined:
    Aug 10, 2010
    Messages:
    12
    Likes Received:
    0
    Hi Dicko,

    Thanks for the reply. Yes I tried that only after everything else failed :

    --> I tried this in my second try, didn't help. First try was done without this
    # cp /usr/include/asterisk/*.* /usr/src/asterisk/include/asterisk/
    --> end of second try

    The first time, I tried without that step. I hope anyone else can try the HowTo and come to the same conclusion, someone who knows what the compile-time options were :)
     
  4. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Don't know what to say, I used

    http://www.voip-info.org/wiki/view/iLBC

    and apart from the obvious typos and such, it worked like a charm (true on a 32 bit VM)

    does

    rasterisk -x 'core show version' truly identify a 64 bit asterisk?

    you could always finish with a

    make install&& service asterisk restart

    to eliminate any possible undocumented palosanto optimization mismatch thingies ;)

    regards

    dicko
     
  5. sunshinenetworks

    Joined:
    Aug 10, 2010
    Messages:
    12
    Likes Received:
    0
    Hi Dicko :

    Elastix*CLI> core show version
    Asterisk 1.6.2.10 built by root @ rpmbuild64-2.elastix.palosanto.com on a x86_64 running Linux on 2010-07-29 18:47:03 UTC

    I haven't replaced the asterisk version after compiling it, I just copied the codec_ilbc.so file ( see the howto where I documented each step ).

    I'm running 64-bit, could that be a reason ?

    I'd rather not run a make install, since the Asterisk is already stating that it was compiled differently, this could potentially lead to instability on the Elastix 2.0 system. I'd rather use the default Elastix Asterisk version than recompiling asterisk. There has to be a way.
     
  6. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Nothing ventured, nothing gained :)

    don't tell PaloSanto but, I've been doing that on a regular basis for many years also dahdi and libpri, It really isn't brain surgery and it will get your xorcom, redfones and sangoma working way more quicker ( sorry openvox, but nothing can help you but yourselves :) ), if you're still tentative do it on a VM or "crash test dummy" hardware first (use mondoarchive to save yourself a WHOLE bunch of time).

    dicko
     
  7. sunshinenetworks

    Joined:
    Aug 10, 2010
    Messages:
    12
    Likes Received:
    0
    aaah you've just persuaded me. I'm "make install"-ing as we speak. I'll let you know after it's compiled. The system running Elastix 2.0 is a testmachine, nothing lost if things break.

    I also just downloaded Elastix 32-bit 2.0.1 ( my 64-bit was 2.0.0 ) and ready to burn that on CD and install that after I break this 64-bit install.

    I'll report back with my findings once I have reinstalled with 32-bit 2.0.1.
     
  8. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    technically you have already compiled it when you did the make thing:)
     
  9. sunshinenetworks

    Joined:
    Aug 10, 2010
    Messages:
    12
    Likes Received:
    0
    ye I know I rm -R -f /usr/src/asterisk* so I had to rebuild.

    Ok this is what happened :

    asterisk rebuilt good, but it installed into /usr/lib/ instead of /usr/lib64
    It also SEEMED to compile as a 32-bit application, which is perhaps why my codec_ilbc.so didn't want to get loaded. When I "asterisk -r" I couldn't see if it was 32 or 64 bit, but the codec_ilbc.so did load on the recompiled asterisk version.

    I'm installing the 32bit version now, I'll post the results shortly
     
  10. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    does uname -a return a 64 bit kernel?

    did you remember to

    ./configure ?

    does rasterisk -x 'core show version' return a 64 bit version?

    after a make clean&&make&&make install&&service asterisk restart ?

    all the above have be "in-sync"

    dicko
     
  11. sunshinenetworks

    Joined:
    Aug 10, 2010
    Messages:
    12
    Likes Received:
    0
    does uname -a return a 64 bit kernel?
    ** yes
    did you remember to ./configure ?
    ** yes
    does rasterisk -x 'core show version' return a 64 bit version?
    after a make clean&&make&&make install&&service asterisk restart ?
    ** didn't try that , sorry.


    SUCCESS !

    I did exactly the same steps as on the 64-bit system, and guess what, on the 32-bit system it works straight away...

    elastix201*CLI> module load codec_ilbc.so
    Loaded codec_ilbc.so
    == Registered translator 'ilbctolin' from format ilbc to slin, cost 6999
    == Registered translator 'lintoilbc' from format slin to ilbc, cost 34995
    Loaded codec_ilbc.so => (iLBC Coder/Decoder)
    elastix201*CLI>


    Ahwell, at least we know what to answer to that question "32-bit or 64-bit, is there a difference?" :D

    Thanks dicko, 32-bit was the way to go ( for easy-mode anyway, until some Elastix dev replies here with the compile-specific options for ilbc on 64-bit )
     
  12. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Glad you got it working, but dream on about the dev's, you will always need to recompiled from scratch if you want ilbc which is no longer supported for licensing reasons (and why would you want that crap anyway :) ),

    rasterisk -x 'core show version'

    no longer says anything about PaloSanto, right?

    there is no way they can help you now.

    dicko
     
  13. sunshinenetworks

    Joined:
    Aug 10, 2010
    Messages:
    12
    Likes Received:
    0
    [root@elastix201 ~]# rasterisk -x "core show version"
    Asterisk 1.6.2.10 built by root @ rpmbuild32-2.elastix.palosanto.com on a i686 running Linux on 2010-07-29 08:45:42 UTC
    [root@elastix201 ~]# rasterisk -x "core show translation"
    Translation times between formats (in microseconds) for one second of data
    Source Format (Rows) Destination Format (Columns)

    g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 siren7 siren14 slin16
    g723 - - - - - - - - - - - - - - - -
    gsm - - 3000 3000 8998 3000 2999 11997 - 55991 37994 9998 4998 - - 8998
    ulaw - 7000 - 1 6000 2 1 8999 - 52993 34996 7000 2000 - - 6000
    alaw - 7000 1 - 6000 2 1 8999 - 52993 34996 7000 2000 - - 6000
    g726aal2 - 10998 4000 4000 - 4000 3999 12997 - 56991 38994 10998 5998 - - 9998
    adpcm - 7000 2 2 6000 - 1 8999 - 52993 34996 7000 2000 - - 6000
    slin - 6999 1 1 5999 1 - 8998 - 52992 34995 6999 1999 - - 5999
    lpc10 - 11999 5001 5001 10999 5001 5000 - - 57992 39995 11999 6999 - - 10999
    g729 - - - - - - - - - - - - - - - -
    speex - 13998 7000 7000 12998 7000 6999 15997 - - 41994 13998 8998 - - 12998
    ilbc - 13998 7000 7000 12998 7000 6999 15997 - 59991 - 13998 8998 - - 12998
    g726 - 10998 4000 4000 9998 4000 3999 12997 - 56991 38994 - 5998 - - 9998
    g722 - 10999 4001 4001 9999 4001 4000 12998 - 56992 38995 10999 - - - 4000
    siren7 - - - - - - - - - - - - - - - -
    siren14 - - - - - - - - - - - - - - - -
    slin16 - 14999 8001 8001 13999 8001 8000 16998 - 60992 42995 14999 4000 - - -
    [root@elastix201 ~]#


    works perfectly, Original Elastix 2.0 with iLBC support :)
    I only build asterisk to get the ilbc.so file, I only copy that file to the /usr/lib/asterisk/modules, nothing else gets copied and the /usr/src/asterisk gets binned after compiling.
     
  14. kinglyr

    Joined:
    May 19, 2009
    Messages:
    39
    Likes Received:
    0
    iLBC doesn't work with Elastix 2.0.2 on x86_64

    Hi guys,

    I have the same problem trying to compile and install codec_ilbc on elastix64 v.1.6.2.10 on an x86_64 system (atom d945gclf2).

    when i do:
    asterisk -r
    module load codec_ilbc i get the following:

    coyote*CLI> module load codec_ilbc
    Unable to load module codec_ilbc
    Command 'module load codec_ilbc' failed.
    [Oct 6 18:29:23] WARNING[26517]: loader.c:724 inspect_module: Module 'codec_ilbc.so' was not compiled with the same compile-time options as this version of Asterisk.
    [Oct 6 18:29:23] WARNING[26517]: loader.c:725 inspect_module: Module 'codec_ilbc.so' will not be initialized as it may cause instability.
    [Oct 6 18:29:23] WARNING[26517]: loader.c:808 load_resource: Module 'codec_ilbc' could not be loaded.
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
    coyote*CLI>

    DOES ANYONE HAS COMPILED iLBC for elastix 2.0.2 (asterisk 1.6.2.10) for x86_64 systems?
    IN ORDER TO UPLOAD IT HERE?
     
  15. lexmooze

    Joined:
    Nov 11, 2010
    Messages:
    5
    Likes Received:
    0
    I cant make ILBC work on Asterisk 1.6.10 x64 too...
    Any solution?
     
  16. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
  17. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
  18. lexmooze

    Joined:
    Nov 11, 2010
    Messages:
    5
    Likes Received:
    0
    Hi, thanks by the help, but i did all that and no sucess.
    The file was compiled and is in the /usr/lib64/asterisk/modules folder

    Then...

    Asterisk -rvvvv
    load codec_ilbc.so (like the instructions in your link)
    response = no such command

    reload codec_ilbc.so
    response = no such module 'codec_ilbc.so'

    Can you tell me whats is wrong???
     
  19. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Not really you will have to examine your compile log to find out what you did wrong.

    I assume you imported the appropriate config* file from the /boot/directory into the build directory to ensure the build matches as close as possible the Elastix kernel you use

    I notice also that the post only does a make , you will need to do a make install also, to actually install it. Also be aware that your system will no longer be able to use the Elastix update processes.
     
  20. sunshinenetworks

    Joined:
    Aug 10, 2010
    Messages:
    12
    Likes Received:
    0
    If you don't need 64-bit version, go to the 32-bit. It has many less bugs than the 64-bit. Some things simply don't work in the 64-bit version, while they work perfectly in 32-bit. I'm sure with a lot of tinkering, the 64-bit version works, but I never got the time ( or courage ) to fix all the small little bugs in 64-bit. Like Dicko suggested in another post, it might be a better solution to recompile the whole Asterisk including ilbc. It's not that hard, and at least you'll have ilbc.

    But if you want my advice : install Elastix 32-bit, unless you absolutely need 64-bit ( like when you have more than 4 gb ram ). Be prepared to get loads of small "hm.. this doesn't work..." on 64-bit though.
     

Share This Page