Summary: | ASTERISK-10609: G729 Codec does not load | ||
Reporter: | Bruce McAlister (asgaroth) | Labels: | |
Date Opened: | 2007-10-24 04:34:55 | Date Closed: | 2007-10-24 08:11:31 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I am unable to use the G729 codec within a Solaris environment. The codec does not appear to initialize after purchasing a license the issue is still the same. The message on the Asterisk console is as follows: [Oct 24 09:06:41] NOTICE[7483]: codec_g729.c:403 load_module: G.729 transcoding module version 32, Copyright (C) 1999-2007 Digium, Inc. [Oct 24 09:06:41] NOTICE[7483]: codec_g729.c:407 load_module: This module is supplied under a commercial license granted by Digium, Inc. [Oct 24 09:06:41] NOTICE[7483]: codec_g729.c:408 load_module: Please see the full license text supplied by the accompanying [Oct 24 09:06:41] NOTICE[7483]: codec_g729.c:409 load_module: "register" utility, or ask for a copy from Digium. [Oct 24 09:06:41] NOTICE[7483]: codec_g729.c:410 load_module: This product includes software developed by the OpenSSL Project [Oct 24 09:06:41] NOTICE[7483]: codec_g729.c:411 load_module: for use in the OpenSSL Toolkit. (http://www.openssl.org/) [Oct 24 09:06:41] NOTICE[7483]: codec_g729.c:412 load_module: Copyright (C) 1998-2006 The OpenSSL Project [Oct 24 09:06:41] WARNING[7483]: codec_g729.c:420 load_module: Failed to initialize G.729 copy protection! codec_g729a.so => (Annex A/B (floating point) G.729 Codec (optimized for i386)) My license file is located in /opt/asterisk/var/licenses Asterisk does not see the codec cli additions: *CLI> show g729 No such command 'show g729' (type 'help' for help) Although the module does appear to be loaded: *CLI> module show like 72 Module Description Use Count codec_g726.so ITU G.726-32kbps G726 Transcoder 0 codec_g729a.so Annex A/B (floating point) G.729 Codec ( 0 format_g723.so G.723.1 Simple Timestamp File Format 0 format_g726.so Raw G.726 (16/24/32/40kbps) data 0 format_g729.so Raw G729 data 0 5 modules loaded ****** STEPS TO REPRODUCE ****** STEPS TO REPRODUCE [1] Install Solaris 10 Update 3 11/06 for x86 [2] Apply latest recommended patch set twice (2 kernel updates in 1 patchset) [3] Create a directory called "/opt/gnu" and create the gnu tools symlinks: As the root users mkdir -p /opt/gnu cd /opt/gnu ln -s /usr/sfw/bin/gar ar ln -s /usr/sfw/bin/gas as ln -s /usr/sfw/bin/gegrep egrep ln -s /usr/sfw/bin/gfgrep fgrep ln -s /usr/sfw/bin/ggrep grep ln -s /usr/sfw/bin/gld ld ln -s /usr/sfw/bin/gm4 m4 ln -s /usr/sfw/bin/gmake make ln -s /usr/sfw/bin/gnm nm ln -s /usr/sfw/bin/granlib ranlib ln -s /usr/sfw/bin/gstrings strings ln -s /usr/sfw/bin/gstrip strip ln -s /usr/sfw/bin/gtar tar [4] Install the following packeges from Solaris 10 Update 3 11/06 Companion CD As the root user SFWltool Libtools SFWcoreu Core Utils [5] Install the following packages from the Blastwave.org website As the root user: cd /var/tmp /usr/sfw/bin/wget http://www.blastwave.org/pkg_get.pkg [^] pkgadd -d ./pkg_get.pkg /opt/csw/bin/pkg-get -i unixodbc /opt/csw/bin/pkg-get -i libspeex /opt/csw/bin/pkg-get -i curl [6] Download and extract Asterisk version 1.4.13 As the user you will be building asterisk with cd /usr/sfw/bin/wget http://downloads.digium.com/pub/asterisk/asterisk-1.4.13.tar.gz /opt/gnu/tar zxf ./asterisk-1.4.13.tar.gz cd ./asterisk-1.4.13 [7] Make the following changes to the Makefile changed #DESTDIR?=/tmp/asterisk to DESTDIR=/var/tmp/asterisk changed ifeq ($(OSARCH),SunOS) ASTETCDIR=/var/etc/asterisk ASTLIBDIR=/opt/asterisk/lib ASTVARLIBDIR=/var/opt/asterisk ASTSPOOLDIR=/var/spool/asterisk ASTLOGDIR=/var/log/asterisk ASTHEADERDIR=/opt/asterisk/include ASTBINDIR=/opt/asterisk/bin ASTSBINDIR=/opt/asterisk/sbin ASTVARRUNDIR=/var/run/asterisk ASTMANDIR=/opt/asterisk/man else to ifeq ($(OSARCH),SunOS) ASTETCDIR=/opt/asterisk/etc ASTLIBDIR=/opt/asterisk/lib ASTVARLIBDIR=/opt/asterisk/var/lib ASTSPOOLDIR=/opt/asterisk/var/spool ASTLOGDIR=/opt/asterisk/var/log ASTHEADERDIR=/opt/asterisk/include ASTBINDIR=/opt/asterisk/bin ASTSBINDIR=/opt/asterisk/sbin ASTVARRUNDIR=/opt/asterisk/var/run ASTMANDIR=/opt/asterisk/man else changed ifeq ($(OSARCH),SunOS) ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/opt/ssl/include -I/usr/local/ssl/include endif to ifeq ($(OSARCH),SunOS) ASTCFLAGS+=-Wcast-align -DSOLARIS -I../include/solaris-compat -I/usr/sfw/include -I/opt/sfw/include -I/opt/csw/include endif changed ifeq ($(OSARCH),SunOS) SOLINK=-shared -fpic -L/usr/local/ssl/lib endif to ifeq ($(OSARCH),SunOS) SOLINK=-shared -fpic -L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib -R/opt/sfw/lib -L/opt/csw/lib -R/opt/csw/lib endif changed $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR) $(INSTALL) -m 644 include/asterisk.h $(DESTDIR)$(includedir) $(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR) to $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR) $(INSTALL) -d $(DESTDIR)$(ASTHEADERDIR)/asterisk $(INSTALL) -m 644 include/asterisk.h $(DESTDIR)$(ASTHEADERDIR) $(INSTALL) -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)/asterisk [7] Setup the environment As the root user backup the bourne shell and link the bash shell to /bin/sh. For some reason some of the scripts used in the build environment assume that /bin/sh is a BASH shell (Hmm). cd /sbin cp ./sh ./sh.original rm ./sh ln -s /bin/bash ./sh Edit /etc/passwd and modify root's shell to point to /sbin/sh.original or you may have problems if you system dies :) As the user you are to compile asterisk with, setup the following environment umask 022 export PATH=/usr/sfw/bin:/usr/ccs/bin:/opt/gnu:/opt/sfw/bin:/usr/bin:/usr/sbin export CC='/usr/sfw/bin/gcc' export CFLAGS='-I/usr/sfw/include -I/opt/sfw/include -I/opt/csw/include' export CXX='/usr/sfw/bin/g++' export CXXFLAGS='-I/usr/sfw/include -I/opt/sfw/include -I/opt/csw/include' export LDFLAGS='-L/usr/sfw/lib -R/usr/sfw/lib -L/opt/sfw/lib -R/opt/sfw/lib -L/opt/csw/lib -R/opt/csw/lib' [8] Compile/Build Asterisk As the user building asterisk cd $HOME/asterisk-1.4.13 ./configure gmake menuselect No changes made in the menuselect phase, it should have picked up all the libs/headers, so just save config and exit. gmake gmake install gmake samples [9] Download and install the G729 codec for Solaris wget http://www.digium.com/elqNow/elqRedir.htm?ref=http://downloads.digium.com/pub/telephony/codec_g729/unsupported/asterisk-1.4/Solaris-10/x86-32/codec_g729a_v32_i386.tar.gz /usr/sfw/bin/gtar zxf codec_g729a_v32_i386.tar.gz cp ./codec_g729a.so /var/tmp/asterisk/opt/asterisk/lib/modules/. wget http://www.digium.com/elqNow/elqRedir.htm?ref=http://downloads.digium.com/pub/register/unsupported/Solaris-10/x86-32/asthostid wget http://www.digium.com/elqNow/elqRedir.htm?ref=http://downloads.digium.com/pub/register/unsupported/Solaris-10/x86-32/register chmod +x ./register ./asthostid ./register [10] Start Asterisk and issue "show g729" CLI command As the root user cd /opt ln -s /var/tmp/asterisk/opt/asterisk cd asterisk/sbin ./asterisk -vvvdddgcp | ||
Comments: | By: Joshua C. Colp (jcolp) 2007-10-24 08:11:31 Please contact Digium technical support for this issue. Thanks. |