vidéo 3G sur Elastix

paguira

Joined
Jan 17, 2008
Messages
127
Likes
0
Points
0
#1
Bonjour,
Comment installer le support de la vidéo 3G sur Elastix ?
Quand veux recompiler Asterisk j'ai le message d'erreur suivant :

Code:
[LD] app_mp3.o -> app_mp3.so
   [CC] app_mp4.c -> app_mp4.o
app_mp4.c: In function âmp4_saveâ:
app_mp4.c:757: attention : âaudioTrack.mp4â may be used uninitialized in this function
app_mp4.c:757: attention : âaudioTrack.trackâ may be used uninitialized in this function
app_mp4.c:757: attention : âaudioTrack.hintâ may be used uninitialized in this function
app_mp4.c:757: attention : âaudioTrack.sampleIdâ may be used uninitialized in this function
app_mp4.c:766: attention : âvideo_payloadâ may be used uninitialized in this function
app_mp4.c:766: attention : âaudio_payloadâ may be used uninitialized in this function
gcc -shared -o app_mp4.so  app_mp4.o  -lmp4 -lmp4v2
   [CC] app_nbscat.c -> app_nbscat.o
   [LD] app_nbscat.o -> app_nbscat.so
   [CC] app_osplookup.c -> app_osplookup.o
app_osplookup.c: In function âosp_create_providerâ:
app_osplookup.c:153: erreur: âOSPTCERTâ undeclared (first use in this function)
app_osplookup.c:153: erreur: (Each undeclared identifier is reported only once
PS : methode d'installation ( http://www.elastix.org/index.php?option=com_fireboard&Itemid=55&func=view&catid=27&id=31315#31690 )
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#2
Salut Paguira.

Je ne comprend pas trop.
Dans le post que tu fais référence, tu mets ta méthode, et là tu dis qu'elle ne fonctionne pas. c'est çà?

Perso j'avais commencé à essayer de faire un truc de ce genre en y faisant référence ici

Le problème était, d'après de ce que je me rappelle, la compilation des pilotes mp4. Depuis j'ai abandonné.

Si ce lien peut d'aider! :huh:

Qu'utilises-tu comme version Asterisk?
 

paguira

Joined
Jan 17, 2008
Messages
127
Likes
0
Points
0
#3
C'est exactement ça, néanmoins je bloque sur la compilation d'asterisk.
OSP me demande une clé de certificat à l'aide de "./enroll.sh", mais il m'est impossible de générer la clé avec OSPToolkit.
De plus je n'arrive pas à compiler asterisk sans osptk l'option --without-opstk est sans effet. Pour info ma version d'asterisk est la 1.4.24-1 (asterisk-1.4.24-1.src.rpm u dépôt elastix)
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#4
Comment ce fait-il qu'il te demande une clef de certificat?
Lors d'installation d'Asterisk, je n'ai jamais eu à entrer quoique ce soit. :huh:
 

paguira

Joined
Jan 17, 2008
Messages
127
Likes
0
Points
0
#5

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#6
Non, pas du tout.
J'ai téléchargé la même version d'asterisk qu'il y avait dans Elastix, puis je l'ai mise dans le répertoire /usr/src/. Puis c'est tout.

Je suis entrain d'installer le script sur Elastix 1.6.5 Beta.
C'est long :)
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#7
Erreur dans l'installation de FFMPEG
Il n'a pas trouver ./install.sh svn et ./Configure
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#8
Code:
+------------------------------------+
|        Installation app_mp4        |
+------------------------------------+

./install.sh: line 565: svn: command not found
cp: ne peut
 

paguira

Joined
Jan 17, 2008
Messages
127
Likes
0
Points
0
#9
je poste le dernier de mes scripts.
Pour rappel je suis sur Elastix 1.5.2 donc dans le script il est fait référence à : http://repo.elastix.org/elastix/1/base/SRPMS/asterisk-1.4.24-1.src.rpm

Code:
#!/bin/sh

echo "+--------------------------------------------------------+"
echo "|  Install Streaming Video  for Elastix                  |"
echo "|                                                        |"
echo "|  By paguira                                            |"
echo "|                                                        |"
echo "+--------------------------------------------------------+"


echo " "
echo "+------------------------------------+"
echo "|         Creation dur rep tar       |"
echo "+------------------------------------+"
echo " "

cd /usr/src
mkdir tar

echo " "
echo "+------------------------------------+"
echo "|         Installation des dep       |"
echo "+------------------------------------+"
echo " "

yum -y install subversion openssl openssl-devel gettext-devel expat-devel curl-devel libtool SDL SDL-devel


echo " "
echo "+------------------------------------+"
echo "|         Installation de yasm       |"
echo "+------------------------------------+"
echo " "

YASM_RPM="http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/yasm-0.6.2-1.el5.rf.i386.rpm"
wget $YASM_RPM
rpm -ivh yasm-0.6.2-1.el5.rf.i386.rpm

echo "+----------------------------------------+"
echo "|    Appuyer sur <Enter> Inst yasm       |"
echo "+----------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|         Installation de GIT        |"
echo "+------------------------------------+"
echo " "

GIT_VERSION="1.6.3.3"
GIT_SRC="http://kernel.org/pub/software/scm/git/git-$GIT_VERSION.tar.gz"

cd /usr/src/tar
wget $GIT_SRC
tar xvfz git-$GIT_VERSION.tar.gz
cd /usr/src/tar/git-$GIT_VERSION
make clean
make && make install

echo "+----------------------------------------------------------------+"
echo "|       Appuyer sur <Enter> Inst GIT                             |"
echo "+----------------------------------------------------------------+"
echo " "
read


echo " "
echo "+------------------------------------+"
echo "|         Installation mpeg2dec      |"
echo "+------------------------------------+"
echo " "

MPEG2DEC_VERSION="0.4.1"
MPEG2DEC_SRC="http://libmpeg2.sourceforge.net/files/mpeg2dec-$MPEG2DEC_VERSION.tar.gz"

cd /usr/src/tar
wget $MPEG2DEC_SRC
tar -xvzf mpeg2dec-$MPEG2DEC_VERSION.tar.gz
mv /usr/src/tar/mpeg2dec-$MPEG2DEC_VERSION /usr/src/mpeg2dec
cd /usr/src/mpeg2dec
./configure
make clean
make && make install
ldconfig

echo "+----------------------------------------------------------------+"
echo "|       Appuyer sur <Enter> Inst mpeg2dec                        |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo "+----------------------------------------+"
echo "|         Installation opencore-amr      |"
echo "+----------------------------------------+"
echo " "

cd /usr/src
git clone --depth=1 git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr 
cd /usr/src/opencore-amr
make clean
make
make install

echo "+----------------------------------------------------------------+"
echo "|            Appuyer sur <Enter> Inst opencore-amr               |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|           Installation LAME        |"
echo "+------------------------------------+"
echo " "

LAME_VERSION="3.97"
LAME_SRC="http://ovh.dl.sourceforge.net/sourceforge/lame/lame-$LAME_VERSION.tar.gz"

cd /usr/src/tar
wget $LAME_SRC
tar -xvzf lame-$LAME_VERSION.tar.gz
mv /usr/src/tar/lame-$LAME_VERSION /usr/src/lame
cd /usr/src/lame
./configure
make clean
make && make install
ldconfig

echo "+----------------------------------------------------------------+"
echo "|           Appuyer sur <Enter> Inst Lame                        |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|         Installation LIBOGG        |"
echo "+------------------------------------+"
echo " "

LIBOGG_VERSION="1.1.3"
LIBOGG_SRC="http://downloads.xiph.org/releases/ogg/libogg-$LIBOGG_VERSION.tar.gz"

cd /usr/src/tar
wget $LIBOGG_SRC
tar -xvzf libogg-$LIBOGG_VERSION.tar.gz
mv /usr/src/tar/libogg-$LIBOGG_VERSION /usr/src/libogg
cd /usr/src/libogg
./configure
make clean
make && make install
ldconfig

echo "+----------------------------------------------------------------+"
echo "|             Appuyer sur <Enter> Inst Libogg                    |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|      Installation LIBVORBIS        |"
echo "+------------------------------------+"
echo " "

LIBVORBIS_VERSION="1.2.0"
LIBVORBIS_SRC="http://downloads.xiph.org/releases/vorbis/libvorbis-$LIBVORBIS_VERSION.tar.gz"

cd /usr/src/tar
wget $LIBVORBIS_SRC
tar -xvzf libvorbis-$LIBVORBIS_VERSION.tar.gz
mv /usr/src/tar/libvorbis-$LIBVORBIS_VERSION /usr/src/libvorbis
cd /usr/src/libvorbis
./configure --with-ogg-libraries=/usr/local/lib
make clean
make && make install
ldconfig

echo "+----------------------------------------------------------------+"
echo "|          Appuyer sur <Enter> Inst Libvorbis                    |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|          Installation FAAC         |"
echo "+------------------------------------+"
echo " "

FAAC_VERSION="1.25"
FAAC_SRC="http://heanet.dl.sourceforge.net/sourceforge/faac/faac-$FAAC_VERSION.tar.gz"

cd /usr/src/tar
wget $FAAC_SRC
tar -xvzf faac-$FAAC_VERSION.tar.gz
mv /usr/src/tar/faac /usr/src/faac
cd /usr/src/faac
sed -i '/[2de].M/d' configure.in
echo "AC_OUTPUT(common/Makefile common/mp4v2/Makefile libfaac/Makefile frontend/Makefile include/Makefile Makefile)" >> configure.in
autoreconf -vif 
./configure --enable-shared --with-mp4v2=no
make clean
make && make install
ldconfig

echo "+----------------------------------------------------------------+"
echo "|                 Appuyer sur <Enter> Inst Faac                  |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|          Installation x264         |"
echo "+------------------------------------+"
echo " "

cd /usr/src

git clone git://git.videolan.org/x264.git

cd /usr/src/x264
./configure --prefix=/usr
make clean
make && make install
ldconfig

echo "+----------------------------------------------------------------+"
echo "|              Appuyer sur <Enter> Inst x264                     |"
echo "+----------------------------------------------------------------+"
read

echo " "
echo "+------------------------------------+"
echo "|          Installation SRTP         |"
echo "+------------------------------------+"
echo " "

SRTP_VERSION="1.4.4"
SRTP_SRC="http://switch.dl.sourceforge.net/sourceforge/srtp/srtp-$SRTP_VERSION.tgz"

cd /usr/src/tar
wget $SRTP_SRC
tar -xvzf srtp-$SRTP_VERSION.tgz
mv /usr/src/tar/srtp /usr/src/srtp
cd /usr/src/srtp
./configure
make clean
make && make install

echo "+----------------------------------------------------------------+"
echo "|                Appuyer sur <Enter> Inst SRTP                   |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|          Installation XVID         |"
echo "+------------------------------------+"
echo " "

XVID_VERSION="1.1.3"
XVID_SRC="http://downloads.xvid.org/downloads/xvidcore-$XVID_VERSION.tar.gz"

cd /usr/src/tar
wget $XVID_SRC
tar -xvzf xvidcore-$XVID_VERSION.tar.gz
mv /usr/src/tar/xvidcore-$XVID_VERSION /usr/src/xvidcore
cd /usr/src/xvidcore/build/generic
./configure
make clean
make && make install
ldconfig

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst XVID                    |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|        Installation TWOLAME        |"
echo "+------------------------------------+"
echo " "

TWOLAME_VERSION="0.3.9"
TWOLAME_SRC="http://hivelocity.dl.sourceforge.net/project/twolame/twolame/0.3.9/twolame-$TWOLAME_VERSION.tar.gz"

cd /usr/src/tar
wget $TWOLAME_SRC
tar -xzvf twolame-$TWOLAME_VERSION.tar.gz
mv /usr/src/tar/twolame-$TWOLAME_VERSION /usr/src/twolame
cd /usr/src/twolame
./configure
make clean
make && make install
ldconfig

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst Twolame                 |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|         Installation FFMPEG        |"
echo "+------------------------------------+"
echo " "

cd /usr/src
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-libmp3lame --enable-libfaac --enable-libx264 --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb  --enable-shared --enable-pthreads --enable-gpl  --enable-encoder=h263 --enable-demuxer=mpegps --enable-decoder=mpegvideo --enable-nonfree --enable-version3
make clean
make && make install
ldconfig

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst FFMPEG                  |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|        Installation MPEG4IP        |"
echo "+------------------------------------+"
echo " "

MPEG4IP_VERSION="1.6"
MPEG4IP_SRC="http://ufpr.dl.sourceforge.net/sourceforge/mpeg4ip/mpeg4ip-$MPEG4IP_VERSION.tar.gz"

cd /usr/src/tar
wget $MPEG4IP_SRC
tar -xzvf mpeg4ip-$MPEG4IP_VERSION.tar.gz
mv /usr/src/tar/mpeg4ip-$MPEG4IP_VERSION /usr/src/mpeg4ip
cd /usr/src/mpeg4ip
./bootstrap --disable-player --prefix=/usr --enable-ffmpeg
make clean
make && make install

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst Mpeg4ip                 |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|          Installation FAAD         |"
echo "+------------------------------------+"
echo " "
# APRES MPG4IP

FAAD_VERSION="2.5"
FAAD_SRC="http://kent.dl.sourceforge.net/sourceforge/faac/faad2-$FAAD_VERSION.tar.gz"

cd /usr/src/tar
wget $FAAD_SRC
tar -xvzf faad2-$FAAD_VERSION.tar.gz
mv /usr/src/tar/faad2 /usr/src/faad2
cd /usr/src/faad2

echo > plugins/Makefile.am
echo > plugins/xmms/src/Makefile.am
sed -i '/E_B/d' configure.in
autoreconf -vif

./configure
make clean && make && make install

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst Faad                    |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|          Installation PWLIB        |"
echo "+------------------------------------+"
echo " "

PWLIB_VERSION="v1_10_3"
PWLIB_SRC="http://downloads.sourceforge.net/openh323/pwlib-$PWLIB_VERSION-src-tar.gz"

cd /usr/src/tar
wget $PWLIB_SRC
tar -xzvf pwlib-$PWLIB_VERSION-src-tar.gz
mv /usr/src/tar/pwlib_$PWLIB_VERSION /usr/src/pwlib
cd /usr/src/pwlib
./configure --prefix=/usr
make clean
make && make install

echo "+----------------------------------------------------------------+"
echo "|                Appuyer sur <Enter> Inst Pwlib                  |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|       Installation LIBH324M        |"
echo "+------------------------------------+"
echo " "

cd /usr/src
svn co https://asteriskvideo.svn.sourceforge.net/svnroot/asteriskvideo/libh324m libh324m
cd /usr/src/libh324m

sed -i "s|TIFFReverseBits(buffer,len);|// TIFFReverseBits(buffer,len);|" h324m.cpp
make clean
make
cp libh324m.so /usr/lib/libh324m.so
cp include/h324m.h /usr/include/h324m.h

echo "+----------------------------------------------------------------+"
echo "|              Appuyer sur <Enter> Inst LibH324M                 |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|      Installation d ASTERISK       |"
echo "+------------------------------------+"
echo " "

ASTERISK_VERSION="1.4.24"
ASTERISK_SUBVERSION="-1"
ASTERISK_RPM="http://repo.elastix.org/elastix/1/base/SRPMS/asterisk-$ASTERISK_VERSION$ASTERISK_SUBVERSION.src.rpm"

cd /usr/src/
mkdir redhat
wget $ASTERISK_RPM
rpm -ivh asterisk-$ASTERISK_VERSION$ASTERISK_SUBVERSION.src.rpm
cp /usr/src/redhat/SOURCES/asterisk-$ASTERISK_VERSION.tar.gz /usr/src/asterisk-$ASTERISK_VERSION.tar.gz
tar -xvzf asterisk-$ASTERISK_VERSION.tar.gz
mv /usr/src/asterisk-$ASTERISK_VERSION /usr/src/asterisk


echo " "
echo "+------------------------------------+"
echo "|        Installation app_mp4        |"
echo "+------------------------------------+"
echo " "

cd /usr/src
svn co https://asteriskvideo.svn.sourceforge.net/svnroot/asteriskvideo/app_mp4/ app_mp4
cp /usr/src/app_mp4/app_mp4.c /usr/src/asterisk/apps/app_mp4.c

echo "app_mp4.so: app_mp4.o" >> /usr/src/asterisk/apps/Makefile
echo "	\$(CC) \$(SOLINK) -o \$@ \${CYGSOLINK} \$< \${CYGSOLIB} -lmp4 -lmp4v2" >> /usr/src/asterisk/apps/Makefile

echo " "
echo "+------------------------------------+"
echo "|         Installation tools         |"
echo "+------------------------------------+"
echo " "

cd /usr/src
svn co https://asteriskvideo.svn.sourceforge.net/svnroot/asteriskvideo/tools/ tools
cd tools
make clean
make

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst tools                   |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|        Installation app_rtsp       |"
echo "+------------------------------------+"
echo " "

cd /usr/src
svn co https://asteriskvideo.svn.sourceforge.net/svnroot/asteriskvideo/app_rtsp/ app_rtsp
cp /usr/src/app_rtsp/app_rtsp.c /usr/src/asterisk/apps/app_rtsp.c

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst app_rtsp   	       |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|     Installation app_transcoder    |"
echo "+------------------------------------+"
echo " "

cd /usr/src
svn co https://asteriskvideo.svn.sourceforge.net/svnroot/asteriskvideo/app_transcoder/ app_transcoder
cp /usr/src/app_transcoder/app_transcoder.c /usr/src/asterisk/apps/app_transcoder.c

echo "app_transcoder.so: app_transcoder.o" >> /usr/src/asterisk/apps/Makefile
echo "	\$(CC) \$(SOLINK) -o \$@ \${CYGSOLINK} \$< \${CYGSOLIB} -lavcodec" >> /usr/src/asterisk/apps/Makefile

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst app_transcoder  	       |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|       Installation app_h324m       |"
echo "+------------------------------------+"
echo " "

cd /usr/src
svn co https://asteriskvideo.svn.sourceforge.net/svnroot/asteriskvideo/app_h324m/ app_h324m
# Modification ?
cp /usr/src/app_h324m/app_h324m.c /usr/src/asterisk/apps/app_h324m.c

echo "app_h324m.so: app_h324m.o" >> /usr/src/asterisk/apps/Makefile
echo "	\$(CC) \$(SOLINK) -o \$@ \${CYGSOLINK} \$< \${CYGSOLIB} -lh324m" >> /usr/src/asterisk/apps/Makefile


echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst app_h324m  	       |"
echo "+----------------------------------------------------------------+"
echo " "
read

echo " "
echo "+------------------------------------+"
echo "|       Installation OSPToolkit      |"
echo "+------------------------------------+"
echo " "


cd /usr/src/tar
wget http://hivelocity.dl.sourceforge.net/project/osp-toolkit/osp-toolkit/OSPToolkit%203.5.2/OSPToolkit-3.5.2.tar.gz
tar -xvzf OSPToolkit-3.5.2.tar.gz
mv /usr/src/tar/TK-3_5_2-20090702 /usr/src/TK
cd /usr/src/TK/src
make clean
make build
make install

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst OSPToolkit 	       |"
echo "+----------------------------------------------------------------+"
echo " "
read


#############################################

cd /usr/src/asterisk/apps
cp /usr/src/redhat/SOURCES/app_rxfax.c /usr/src/asterisk/apps/app_rxfax.c
cp /usr/src/redhat/SOURCES/app_txfax.c /usr/src/asterisk/apps/app_txfax.c
cp /usr/src/redhat/SOURCES/asterisk-1.4-spandsp.patch /usr/src/asterisk/apps/asterisk-1.4-spandsp.patch

echo " "
echo "+----------------------------------------------------------------------+"
echo "|       Installation du patch manuel < asterisk-1.4-spandsp.patch>     |"
echo "+----------------------------------------------------------------------+"
echo " "

# Path de pour spanDSP Manuel
cp /usr/src/asterisk/build_tools/menuselect-deps.in /usr/src/asterisk/build_tools/menuselect-deps.in.orig
cp /usr/src/asterisk/configure.ac /usr/src/asterisk/configure.ac.orig
cp /usr/src/asterisk/makeopts.in /usr/src/asterisk/makeopts.in.orig

sed -i "s|RADIUS=@PBX_RADIUS@|RADIUS=@PBX_RADIUS@\nSPANDSP=@PBX_SPANDSP@|" /usr/src/asterisk/build_tools/menuselect-deps.in
sed -i "s|AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])|AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])\nAST_EXT_LIB_SETUP([SPANDSP], [spandsp Library], [spandsp])|" /usr/src/asterisk/configure.ac
sed -i "s|AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])|AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])\nAST_EXT_LIB_CHECK([SPANDSP], [spandsp], [fax_init], [spandsp.h], [-ltiff])|" /usr/src/asterisk/configure.ac
sed -i "s|RADIUS_LIB=@RADIUS_LIB@|RADIUS_LIB=@RADIUS_LIB@\nSPANDSP_INCLUDE=@SPANDSP_INCLUDE@\nSPANDSP_LIB=@SPANDSP_LIB@|" /usr/src/asterisk/makeopts.in
# Path Manuel fin

echo "+--------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst patch 	       |"
echo "+--------------------------------------------------------+"
echo " "
read

#echo " "
#echo "+---------------------------------------------------------------------------+"
#echo "|       Installation du patch automatique < asterisk-1.4-spandsp.patch>     |"
#echo "+---------------------------------------------------------------------------+"
#echo " "

# Path de pour spanDSP Automatique
#cd /usr/src/asterisk

#patch -p0 < asterisk-1.4-spandsp.patch
# Path Automatique fin

#echo "+--------------------------------------------------------+"
#echo "|               Appuyer sur <Enter> Inst patch 	       |"
#echo "+--------------------------------------------------------+"
#echo " "
#read

echo "app_rxfax.so : app_rxfax.o" >> /usr/src/asterisk/apps/Makefile
echo "	\$(CC) \$(SOLINK) -o \$@ \$< -lspandsp -ltiff" >> /usr/src/asterisk/apps/Makefile

echo "app_txfax.so : app_txfax.o" >> /usr/src/asterisk/apps/Makefile
echo "	\$(CC) \$(SOLINK) -o \$@ \$< -lspandsp -ltiff" >> /usr/src/asterisk/apps/Makefile


echo "+----------------------------------------------------------------+"
echo "| ATTENTION !!! Verifier que le patch a bien fonctionner pour les|"
echo "| fichier \"menuselect-deps.in\" , \"configure.ac\"              |"
echo "| et \"makeopts.in\" puis appuyer sur enter                      |"
echo "+----------------------------------------------------------------+"
read

echo " "
echo "+---------------------------------------------------+"
echo "|       Installation du patch < 13892_2.patch >     |"
echo "+---------------------------------------------------+"
echo " "

# Patch 13892_2.patch
cd /usr/src/asterisk
cp /usr/src/redhat/SOURCES/13892_2.patch /usr/src/asterisk/13892_2.patch
patch -p0 < 13892_2.patch
# Patch fin

echo "+--------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst 13892_2.patch   |"
echo "+--------------------------------------------------------+"
echo " "
read

cd /usr/src/asterisk

#./configure --with-netsnmp --with-ssl --with-spandsp
./configure  --with-ssl --with-spandsp --without-osptk
#make menuselect
make clean
make && make install && make samples && make config

echo "+----------------------------------------------------------------+"
echo "|               Appuyer sur <Enter> Inst Asterisk                |"
echo "+----------------------------------------------------------------+"
echo " "
read
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#10
Dans ton nouveau script:

Code:
+----------------------------------------+
|         Installation opencore-amr      |
+----------------------------------------+

./install.sh: line 99: git: command not found
./install.sh: line 100: cd: /usr/src/opencore-amr: Aucun fichier ou r
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#11
Ha au fait, Elastix 1.5.2 en y faisant un yum update, Asterisk est en version 1.4.25 et non 24
 

paguira

Joined
Jan 17, 2008
Messages
127
Likes
0
Points
0
#12
Attention de nombreux problèmes viennent des "\\n".
J'ai de nouveau utiliser ce script sur VirtualBox et avec Elastix sans mise à jour et j'ai toujours le même problème.
Je poste le script en fichier joint pour éviter les problèmes de "\\n" et de tabulation causé par le forum.
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#13
Pour avoir fait un script, as-tu réussi à installer manuellement le tout sans problème ?

En fait, le script m'intéresse du fait que j'ai une camera Trendnet TV-IP 312.
Je souhaiterai consulter le flux 3G depuis Xlite par exemple.
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#14
Il est ou ton fichier joint Paguira ?
 

paguira

Joined
Jan 17, 2008
Messages
127
Likes
0
Points
0
#15
Ma configuration :
- VirtualBox
- Elastix-1.5.2-stable-i386-bin-31mar2009.iso
- Pas de mise à jour
- asterisk-1.4.24-1.src.rpm

Le script : elastix_3g.sh

Faire un chmod +x elastix_3g.sh puis sh ./elastix_3g.sh http://forum.elastix.org/old_files/elastix_3g.zip
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#16
Cool. Je vais tester.

Dans ton script, si je remplace la version d'Asterisk, ça na pas beaucoup d'importance sur l'issue de l'installation non?

As tu essayé de télécharger la version 1.4.24 sur le site de Digium et de faire la compilation, au lieu de récupérer les sources RPM Elastix?
 

paguira

Joined
Jan 17, 2008
Messages
127
Likes
0
Points
0
#17
Bonne idée je test avec la version 1.4.24 du site de Digium.

Rappel "app_h324m" est supporté par asterisk 1.4 pour la 1.6 je ne sais pas
Note: Currently only Asterisk 1.4 is supported.
Source : http://sip.fontventa.com/content/view/23/49/

Pour la version d'asterisk il faudra modifier cette partie :

Code:
echo " "
echo "+------------------------------------+"
echo "|      Installation d ASTERISK       |"
echo "+------------------------------------+"
echo " "

ASTERISK_VERSION="1.4.24"
ASTERISK_SUBVERSION="-1"
ASTERISK_RPM="http://repo.elastix.org/elastix/1/base/SRPMS/asterisk-$ASTERISK_VERSION$ASTERISK_SUBVERSION.src.rpm"

cd /usr/src/
mkdir redhat
wget $ASTERISK_RPM
rpm -ivh asterisk-$ASTERISK_VERSION$ASTERISK_SUBVERSION.src.rpm
cp /usr/src/redhat/SOURCES/asterisk-$ASTERISK_VERSION.tar.gz /usr/src/asterisk-$ASTERISK_VERSION.tar.gz
tar -xvzf asterisk-$ASTERISK_VERSION.tar.gz
mv /usr/src/asterisk-$ASTERISK_VERSION /usr/src/asterisk
par : exemple pour un RPM

Code:
echo " "
echo "+------------------------------------+"
echo "|      Installation d ASTERISK       |"
echo "+------------------------------------+"
echo " "

ASTERISK_VERSION="{VERSION}"
ASTERISK_SUBVERSION="{SOUS_VERSION}"
ASTERISK_RPM="{URL DU SITE}/asterisk-$ASTERISK_VERSION$ASTERISK_SUBVERSION.src.rpm"

cd /usr/src/
mkdir redhat
wget $ASTERISK_RPM
rpm -ivh asterisk-$ASTERISK_VERSION$ASTERISK_SUBVERSION.src.rpm
cp /usr/src/redhat/SOURCES/asterisk-$ASTERISK_VERSION.tar.gz /usr/src/asterisk-$ASTERISK_VERSION.tar.gz
tar -xvzf asterisk-$ASTERISK_VERSION.tar.gz
mv /usr/src/asterisk-$ASTERISK_VERSION /usr/src/asterisk
pour un fichier source (TAR)

Code:
echo " "
echo "+------------------------------------+"
echo "|      Installation d ASTERISK       |"
echo "+------------------------------------+"
echo " "

ASTERISK_VERSION="{VERSION}"
ASTERISK_SUBVERSION="{SOUS_VERSION}"
ASTERISK_SRC="{URL DU SITE}/asterisk-$ASTERISK_VERSION$ASTERISK_SUBVERSION.tar.gz"

cd /usr/src/
wget $ASTERISK_SRC
tar -xvzf asterisk-$ASTERISK_VERSION.tar.gz
mv /usr/src/asterisk-$ASTERISK_VERSION /usr/src/asterisk
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#18
C'est mieux.
Tout ce passe bien jusqu'à:

Code:
Checked out revision 19557.
Unknown option "--enable-swscale".
See ./configure --help for available options.
Makefile:1: config.mak: No such file or directory
libavdevice/Makefile:1: libavdevice/../config.mak: No such file or directory
libavformat/Makefile:1: libavformat/../config.mak: No such file or directory
libavcodec/Makefile:1: libavcodec/../config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libswscale/Makefile:1: libswscale/../config.mak: No such file or directory
make: *** No rule to make target `libswscale/../config.mak'.  Stop.
Makefile:1: config.mak: No such file or directory
libavdevice/Makefile:1: libavdevice/../config.mak: No such file or directory
libavformat/Makefile:1: libavformat/../config.mak: No such file or directory
libavcodec/Makefile:1: libavcodec/../config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libswscale/Makefile:1: libswscale/../config.mak: No such file or directory
make: *** No rule to make target `libswscale/../config.mak'.  Stop.
Makefile:1: config.mak: No such file or directory
libavdevice/Makefile:1: libavdevice/../config.mak: No such file or directory
libavformat/Makefile:1: libavformat/../config.mak: No such file or directory
libavcodec/Makefile:1: libavcodec/../config.mak: No such file or directory
libavutil/Makefile:1: libavutil/../config.mak: No such file or directory
libswscale/Makefile:1: libswscale/../config.mak: No such file or directory
make: *** No rule to make target `libswscale/../config.mak'.  Stop.
+----------------------------------------------------------------+
|               Appuyer sur <Enter> Inst FFMPEG                  |
+----------------------------------------------------------------+
Je poursuis l'installation... car c'est pas fini.
 

paguira

Joined
Jan 17, 2008
Messages
127
Likes
0
Points
0
#19
J'ai un autre bug dans le script, la patch SPANSDSP n'est pas bien appliqué (à ce niveau) :

Code:
echo " "
echo "+----------------------------------------------------------------------+"
echo "|       Installation du patch manuel < asterisk-1.4-spandsp.patch>     |"
echo "+----------------------------------------------------------------------+"
echo " "

# Path de pour spanDSP Manuel
cp /usr/src/asterisk/build_tools/menuselect-deps.in /usr/src/asterisk/build_tools/menuselect-deps.in.orig
cp /usr/src/asterisk/configure.ac /usr/src/asterisk/configure.ac.orig
cp /usr/src/asterisk/makeopts.in /usr/src/asterisk/makeopts.in.orig


sed -i "s|RADIUS=@PBX_RADIUS@|RADIUS=@PBX_RADIUS@\\nSPANDSP=1|" /usr/src/asterisk/build_tools/menuselect-deps.in

# PROBLEME ICI
sed -i "s|AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])|AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])\\nAST_EXT_LIB_SETUP([SPANDSP], [spandsp Library], [spandsp])|" /usr/src/asterisk/configure.ac
sed -i "s|AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])|AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])\\nAST_EXT_LIB_CHECK([SPANDSP], [spandsp], [fax_init], [spandsp.h], [-ltiff])\\n|" /usr/src/asterisk/configure.ac
# FIN DE PROBLEME ICI

sed -i "s|RADIUS_LIB=@RADIUS_LIB@|RADIUS_LIB=@RADIUS_LIB@\\nSPANDSP_INCLUDE=\\nSPANDSP_LIB=-lspandsp|" /usr/src/asterisk/makeopts.in
# Path Manuel fin
Dans le fichier asterisk-1.4-spandsp.patch, il a les modifications suivantes dans "/usr/src/asterisk/configure.ac" :

AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
+AST_EXT_LIB_SETUP([SPANDSP], [spandsp Library], [spandsp])
AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
Et

AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])

+AST_EXT_LIB_CHECK([SPANDSP], [spandsp], [fax_init], [spandsp.h], [-ltiff])

+
AST_EXT_LIB_CHECK([SPEEX], [speex], [speex_encode], [speex/speex.h], [-lm])
Pour le moment la seul solution que j'ai trouvée, c'est de modifier manuelement avec "nano" ou "vi"

PS: attention au "\\n"
 

danardf

Joined
Dec 3, 2007
Messages
8,069
Likes
10
Points
88
#20
Bon je laisse la poursuite du script.
ça fait presque 50mn que ça tourne, et toujours pas terminé.

Une fois au point, il faudrait peut être le faire intégrer par l'équipe de dev Elastix afin qu'il soit mis dans les prochaines version.
Ou peut-être en faire des RPMs.

Car ton script est sert top, mais que ce passe t-il lors d'une mise à jour Asterisk via Elastix)?
Je crains le pire. :unsure:

Si ça fonctionne, ça sera déjà bien. ;)
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,913
Messages
130,917
Members
17,589
Latest member
cristian.saiz
Top