1. ทำการติดตั้ง ubuntu 11.10 และแก้ไขไฟล์โดยใช้คำสั่ง nano /etc/apt/sources,list
เพิ่ม sources เข้าไปในบรรทัดล่าง ดังนี้
deb http://debian.pop-sc.rnp.br/debian/ squeeze main contrib non-free
deb-src http://debian.pop-sc.rnp.br/debian/
squeeze main
deb http://security.debian.org/ squeeze/updates
main
deb-src http://security.debian.org/
squeeze/updates main
# squeeze-updates, previously known as 'volatile'
deb http://debian.pop-sc.rnp.br/debian/
squeeze-updates main contrib non-free
deb-src http://debian.pop-sc.rnp.br/debian/
squeeze-updates main
2. ติดตั้ง package ที่จำเป็น
apt-get install gcc make libncurses5-dev yasm g++
sun-java6-jdk checkinstall libtheora-dev
libvorbis-dev libssl-dev vim libgsm1-dev g++ make libtool yasm subversion git
automake subversion yasm autoconf
pkg-config libxml2-dev libcurl4-openssl-dev
3.ทำการ download
sailfin
cd /usr/local
wget
http://download.java.net/javaee5/sailfin/v2_branch/promoted/Linux/sailfin-installer-v2-b31g-linux.jar
java -Xmx256m -jar
sailfin-installer-v2-b31g-linux.jar
cd sailfin
chmod -R +x lib/ant/bin
lib/ant/bin/ant -f setup.xml
4.สร้างเพื่อให้ mcuWeb รันทุกครั้งที่เปิดเครื่อง
nano /etc/init.d/mcuWeb
#! /bin/sh
### BEGIN INIT INFO
# Provides: mcuWeb
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mcuWeb startup script
# Description: mcuWeb startup script
### END INIT INFO
# Author: Sergio Garcia Murillo
“sergio.garcia@fontventa.com”
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Start Sailfin domian domain1"
NAME="asadmin"
DAEMON=/usr/local/sailfin/bin/$NAME
START_ARGS="start-domain domain1"
STOP_ARGS="stop-domain domain1"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is
present
[ -r /etc/default/$NAME ] && .
/etc/default/$NAME
#
# Function that starts the daemon/service
#
do_start()
{
#
Return
# 0 if daemon has been started
# 1 if daemon was already
running
# 2 if daemon could not be
started
$DAEMON $START_ARGS || return 2
}
#
# Function that stops the daemon/service
#
do_stop()
{
#
Return
# 0 if daemon has been stopped
# 1 if daemon was already
stopped
# 2 if daemon could not be
stopped
$DAEMON $STOP_ARGS || return 2
}
case "$1" in
start)
[
"$VERBOSE" != no ] && echo "Starting $DESC"
"$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && echo "Done" ;;
2) [ "$VERBOSE" != no ] && echo "Failed" ;;
esac
;;
stop)
[
"$VERBOSE" != no ] && echo "Stopping $DESC"
"$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && echo "Done" ;;
2) [ "$VERBOSE" != no ] && echo "Failed" ;;
esac
;;
restart|force-reload)
#
#
If the "reload" option is implemented then remove the
#
'force-reload' alias
#
echo "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) echo
"Done" ;;
1) echo "Old
process is still running" ;; # Old process is still running
*) echo "Failed to
start" ;; # Failed to start
esac
;;
*)
# Failed to stop
echo "Failed"
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME
{start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}"
>&2
exit 3
;;
esac
สั่ง run
chmod +x /etc/init.d/mcuWeb
update-rc.d mcuWeb defaults
/etc/init.d/mcuWeb start
5.การเข้าใช้งาน
GlassFish
http://[IP_DO_SERVIDOR]:4848
User: admin
password: adminadmin
Config HTTP
Configuration -> HTTP Service ->
http-listener-1
โดยใช้ port 8090 และทำการ save
Confs สำหรับ SIP
Configuration -> SIP Container ให้เปลี่ยนเป็น 5060
และ 5061
Configuration -> SIP Service -> SIP
Listener ->
SIP Listener-1 เป็น 5060
SIP
Listener-2 เป็น 5061
Install MCU
http://sourceforge.net/projects/mcumediaserver/files/mcumediaserver/
โดย
install ไฟล์ mcuWeb.sar
การ
Config
http://[IP_DO_SERVIDOR]:8090/mcuWeb
Install MediaMixer
mkdir -p /usr/local/src
cd /usr/local/src
http://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c%20Super%20Stable/
http://sourceforge.net/projects/xmlrpc-c/files/
tar -xzvf xmlrpc-c-1.16.41.tgz
Speex
Speex é um codec de audio suportado pela
aplicação, eu cheguei a implementar sem ele, mas vamos seguir as instruções do
desenvolvedor
tar -xzvf speex-1.2rc1.tar.gz
mcumediaserver
mp4v2
ffmpeg
x264
Install & compile
x264
cd /usr/local/src/x264
./configure --enable-debug --enable-shared
--enable-pic --disable-asm
make
make install
checkinstall --pkgname=x264
--pkgversion="0.2245-svn~checkinstall" --default
ffmpeg
cd /usr/local/src/ffmpeg
./configure --enable-shared --enable-gpl
--enable-nonfree --disable-stripping
make
make install
checkinstall --pkgname=ffmpeg
--pkgversion="4:0.10.1-svn~checkinstall" --default
xmlrpc-c
cd /usr/local/src/xmlrpc-c-1.25.23
./configure
make
make install
checkinstall --pkgname=xmlrpc-c
--pkgversion="1.25.23-svn~checkinstall" --default
mp4v2
cd /usr/local/src/mp4v2/
autoreconf -fiv
./configure
checkinstall --pkgname=mp4v2
--pkgversion="1.9.1-svn~checkinstall" --default
speex
cd /usr/local/src/speex-1.2rc1
./configure
make
make install
checkinstall --pkgname=speex
--pkgversion="1.2.1rc1~checkinstall" --default
cd /usr/local/
wget
http://www.apache.org/dist//ws/xmlrpc/binaries/apache-xmlrpc-3.1.3-bin.tar.bz2
tar -xvf apache-xmlrpc-3.1.3-bin.tar.bz2
เปลี่ยนที่อยู่ apache-xmlrpc
nano /usr/local/src/mcu/XmlRpcMcuClient/nbproject/project.properties
file.reference.commons-logging-1.1.jar=/usr/local/apache-xmlrpc-3.1.3/lib/commons-logging-1.1.jar
file.reference.ws-commons-util-1.0.2.jar=/usr/local/apache-xmlrpc-3.1.3/lib/ws-commons-util-1.0.2.jar
file.reference.xmlrpc-client-3.1.3.jar=/usr/local/apache-xmlrpc-3.1.3/lib/xmlrpc-client-3.1.3.jar
file.reference.xmlrpc-common-3.1.3.jar=/usr/local/apache-xmlrpc-3.1.3/lib/xmlrpc-common-3.1.3.jar
nano /usr/local/src/mcu/mcuWeb/nbproject/project.properties
file.reference.commons-logging-1.1.jar=/usr/local/apache-xmlrpc-3.1.3/lib/commons-logging-1.1.jar
file.reference.ssa-api.jar=/usr/local/sailfin/lib/ssa-api.jar
file.reference.ws-commons-util-1.0.2.jar=/usr/local/apache-xmlrpc-3.1.3/lib/ws-commons-util-1.0.2.jar
file.reference.xmlrpc-client-3.1.3.jar=/usr/local/apache-xmlrpc-3.1.3/lib/xmlrpc-client-3.1.3.jar
file.reference.xmlrpc-common-3.1.3.jar=/usr/local/apache-xmlrpc-3.1.3/lib/xmlrpc-common-3.1.3.jar
file.reference.XmlRpcMcuClient.jar=../XmlRpcMcuClient/dist/XmlRpcMcuClient.jar
ทำการ
build
cd /usr/local/src/mcu/XmlRpcMcuClient
ant
cd /usr/local/src/mcu/mcuWeb
ant -Dj2ee.server.home=/usr/local/sailfin
-Dlibs.CopyLibs.classpath=/usr/share/netbeans/java4/ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar
MCU MediaMixer
cd /usr/local/src/mcu
make
make install
cd /usr/local/
ln -s /usr/local/mcu/
สร้าง ไฟล์ run
mediamixer
nano /etc/init.d/mediamixer
#! /bin/sh
### BEGIN INIT INFO
# Provides: mcu
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: MCU Videomixer
# Description: Starts and stops mcu Video Mixer
### END INIT INFO
# Do NOT "set -e"
# Media Mixer installation directory
MCU="/usr/local/mcu/bin/debug"
# Username to run application server
USER="root"
# PATH should only include /usr/* if it runs
after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="MCU Video Media Mixing Server"
DAEMON="${MCU}/mcu"
DAEMONPARAMS=""
SCRIPTNAME="mcu"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
#
# Function that starts the daemon/service
#
do_start()
{
echo -n "Starting $DESC:"
cd
$MCU && nohup $DAEMON $DAEMONPARAMS > /var/log/mcu 2>&1 &
echo "Done"
}
#
# Function that stops the daemon/service
#
do_stop()
{
echo -n "Stopping $DESC:"
killall -9 mcu
echo "Done"
}
case "$1" in
start)
do_start
;;
stop)
do_stop
;;
restart|force-reload)
echo -n "Restarting $DESC"
do_stop
do_start
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}"
>&2
exit 3
;;
esac
:
Run ตอน boot เครื่อง
chmod +x /etc/init.d/mediamixer
update-rc.d mediamixer defaults
/etc/init.d/mediamixer start
mcuWeb
http://[IP_DO_SERVIDOR]:8090/mcuWeb
Name: Qualquer coisa
Url: http://127.0.0.1:8080/mcu
Media IP: [IP_DO_SERVIDOR
Public IP: [IP_DO_SERVIDOR]
Config asterisk
nano
/etc/asterisk/sip.conf
[mcuWeb]
videosupport=yes
type=peer
host=127.0.0.1
port=5070
canreinvite=no
qualify=no
disallow=all
nat=no
allow=ulaw
allow=alaw
allow=speex
allow=h263
allow=h263p
allow=h264
Usuario com Video
[USUARIO]
type=friend
secret=SENHA
qualify=yes
port=5060
nat=yes
allow=h264
allow=h263
host=dynamic
dtmfmode=rfc2833
dial=SIP/114
context=videoconferencia
canreinvite=no
nano /etc/asterisk/extensions.conf
[videoconferencia]
exten => _3XX,1,Dial(SIP/mcuWeb/${EXTEN})
Reload no asterisk
asterisk -rx "core reload"
Referencias
http://www.medooze.com
http://www.medooze.com/products/media-mixer-server/installation.aspx
http://sourceforge.net/projects/mcumediaserver/forums/forum/853498/topic/4760021
http://tesliuk.com/wiki/index.php/Video_Conferencia_com_Asterisk_e_MCU_Media_Server
ไม่มีความคิดเห็น:
แสดงความคิดเห็น