3G asterisk MP4 video call 可视的 语
音交换1
这个应用支持了asterisk 3g, MP4, h324, FFMPEG,AMR. 安装起来比较绕。
在北京的公司里面测试了一下,利用现在的3g 网络,貌似还是可以的,3G->asterisk->app_mp4. 比较成功。
===============测试环境================
•Nokia n95 (SFR)
•LG Viewty KU 990 (Orange)
•Nokia E65 (Orange)
•
=============开始上菜,debian 的啊=============
======1) 下载libpir, zaptel, asterisk -1.4==============
cd /usr/src
wget downloads.digium/pub/asterisk/asterisk-1.4.
wget downloads.digium/pub/asterisk/asterisk-addons-1.4.
wget downloads.digium/pub/zaptel/zaptel-1.4.
wget downloads.digium/pub/telephony/libpri/libpri-1.4.
wget
downloads.digium/pub/telephony/sounds/asterisk-core-sounds-fr-wav-current.
wget downloads.digium/pub/telephony/sounds/ 解压:tar xfvz asterisk-1.4.
tar xfvz asterisk-addons-1.4.
tar xfvz libpri-1.4.
tar xfvz zaptel-1.4.
=======2) 编译安装libpri, zaptel, asterisk=====
cd libpri-1.4.2
make
make install
cd ..
cd zaptel-1.4.7
./configure
make
1 wwwasterisk
make install
make config
cd ..
cd asterisk-1.4.15
./configure
make
make install
make samples
make config
cd ..
cd asterisk-addons-1.4.5
.
/configure
make
make install
make samples
cd ..
=======3)主要部分:安装 3G asterisk 支持包=========
: sip.fontventa
======安装debian支持包=============
aptitude install subversion
aptitude install libpt-1.11.2-dev
cd /usr/src/
svn co sip.fontventa/svn/asterisk/ asterisk-video
cd asterisk-video
=====4)编译 H324M====================
注意 mISDN bri 卡的用户要修改代码H324m.cpp
注释掉 //TIFFReverseBits(buffer,len) ;
cd /usr/src/asterisk-video/libh324m
cp <endroit_de_votre_patch> .
打补丁:
patch -p0 < misdn_patch_h324m.diff
======4.1)编译 libh324===================
cd /usr/src/asterisk-video/libh324m
make
make install
cp libh324m.so /usr/lib/
cp /usr/src/asteriskvideo/libh324m/include/h324m.h /usr/src/asterisk-1.4.21.2/include/ mkdir /usr/include/libavcodec
mkdir /usr/include/libswscale
这里make install默认是copy 到了 /usr/local/lib 路径下面的,所以必须拷贝到/usr/lib 或者修改 /etc/f
=====================这里注意,看他的解释=====
the h324m library was not found by app_h324m.
Some library basic:
1. make sure you have installed (make; make install) libh324m
2. verify, usually it is located in /usr/local/lib
3. make sure that the OS will find the library: execute "ldconfig" to update the library cache execute "ldconfig -p" to see if h324m is in the library, e.g: # ldconfig -p|grep h324m libh324m.so (libc6) => /usr/lib/libh324m.so
=======5)安装 AMR编码支持库=====================
cd /usr/src/asterisk-1.4.15
patch -p0 < /usr/src/asterisk-video/
cd codecs
ln -s ../../asterisk-video/amr/amr_slin_ex.h .
ln -s ../../asterisk-video/amr/slin_amr_ex.h .
ln -s ../../asterisk-video/amr/codec_amr.c .
mkdir amr
cd amr
wget /ftp/Specs/archive/26_series/26.104/26104-700.zip
aptitude install unzip
unzip -j 26104-700.zip
unzip -j 26104-700_ANSI_C_source_code.zip
ln -s ../../asterisk-video/amr/Makefile .
=====5.1)编译 /usr/src/asterisk-1.4.15/codecs/Makefile========
修改:
$(LIBAMR):
@$(MAKE) -C amr
成为:
$(LIBAMR):
@$(MAKE) -C amr all
==========5.2)再次编译asterisk=========
cd /usr/src/asterisk-1.4.15/
./configure
make
make install
=======5.3)修改/etc/f===========
[amr]
octet-aligned=1
=======6)安装 H324 gateway ==================
cd /usr/src/asterisk-video/app_h324m
cat Makefile << EOF
---------- cut ------------
CFLAGS ?= -O2 -fPIC
Z_CFLAGS := $(CFLAGS) -D _GNU_SOURCE -Wall -Wmissing-prototypes -Wstrict-prototypes LIBS ?=
Z_LIBS := $(LIBS) -lpthread -lh324m
BINARY = app_h324m.so
OBJECTS = app_h324m.o
DESTDIR ?=
PREFIX ?= /usr
.PHONY: install clean
$(BINARY): $(OBJECTS)
$(CC) -shared -Xlinker -x -o $(BINARY) $(OBJECTS) $(Z_LIBS)
makefile phony%.o: %.c
$(CC) $(Z_CFLAGS) -c -o $@ $<
install: $(BINARY)
install -d $(DESTDIR)$(PREFIX)/lib/asterisk/modules
install -m 755 $(BINARY) $(DESTDIR)$(PREFIX)/lib/asterisk/modules
clean:
rm -f $(BINARY) $(OBJECTS)
---------- cut ---------
EOF
========6.1)修改 app_h324m.c 加=============
#define AST_MODULE "h324m application"
=======7)重要部分:安装 mpeg4ip 支持包======
cd /usr/src/
wget heanet.dl.sourceforge/sourceforge/mpeg4ip/mpeg4ip-1.5.0.
tar xfvz mpeg4ip-1.5.0.
cd mpeg4ip-1.5.0.1
aptitude install libtool
./bootstrap --enable-ffmpeg=/usr/src/asterisk/ffmpeg-0.5
./configure --disable-player --prefix=/usr
make
make install
===8)为asterisk 安装:app_mp4,app_rtsp,app_ transcoder==
====8.1)安装 app_mp4========================
修改 Makefile.
cd /usr/src/asterisk-video/app_mp4
cat Makefile << EOF
---------- cut ------------
CFLAGS ?= -O2 -fPIC
Z_CFLAGS := $(CFLAGS) -D _GNU_SOURCE -Wall -Wmissing-prototypes -Wstrict-prototypes LIBS ?=
Z_LIBS := $(LIBS) -lpthread -lmp4 -lmp4v2
BINARY = app_mp4.so
OBJECTS = app_mp4.o
DESTDIR ?=
PREFIX ?= /usr
.PHONY: install clean
$(BINARY): $(OBJECTS)
$(CC) -shared -Xlinker -x -o $(BINARY) $(OBJECTS) $(Z_LIBS)
%.o: %.c
$(CC) $(Z_CFLAGS) -c -o $@ $<
install: $(BINARY)
install -d $(DESTDIR)$(PREFIX)/lib/asterisk/modules
install -m 755 $(BINARY) $(DESTDIR)$(PREFIX)/lib/asterisk/modules
clean:
rm -f $(BINARY) $(OBJECTS)
---------- cut ---------
EOF
========8.2 ================
修改 app_mp4.c:
#define AST_MODULE "MP4 application"
make
make install
=========8.3 安装 app_rtsp===== ==
CFLAGS ?= -O2 -fPIC
Z_CFLAGS := $(CFLAGS) -D _GNU_SOURCE -Wall -Wmissing-prototypes -Wstrict-prototypes LIBS ?=
Z_LIBS := $(LIBS) -lpthread
BINARY = app_rtsp.so
OBJECTS = app_rtsp.o
DESTDIR ?=
PREFIX ?= /usr
.PHONY: install clean
$(BINARY): $(OBJECTS)
$(CC) -shared -Xlinker -x -o $(BINARY) $(OBJECTS) $(Z_LIBS)
%.o: %.c
$(CC) $(Z_CFLAGS) -c -o $@ $<
install: $(BINARY)
install -d $(DESTDIR)$(PREFIX)/lib/asterisk/modules
install -m 755 $(BINARY) $(DESTDIR)$(PREFIX)/lib/asterisk/modules
clean:
rm -f $(BINARY) $(OBJECTS)
==========================
修改 app_rtsp.c
#define AST_MODULE "Rtsp application" ; 添加一行
make
make install
======8.4) 在f 添加 视频电话支持====================
videosupport=yes
disable=all
allow=ulaw
allow=alaw
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论