Alhamdulillah selesai sudah minggu kemarin melakukan migrasi Asterisk PBX pada DomU xen baru, sekarang tinggal berbaginya. Untuk pengenalan Asterisk PBX, nanti akan penulis jelaskan pada Asterisk PBX fundamental. Pada dokumentasi ini, dijelaskan tahap-tahap untuk mingrasi maupun instalasi, karena yang penulis lakukan adalah:
1. Membuat host baru (DomU)
2. Menginstall Asterisk dan Dahdi
3. Memindahkan konfigurasi lama
Jadi bila kita akan melakukan fresh install bisa juga mengikuti penulis akan memberikan informasi hal yang tidak perlu dilakukan bila hanya melakukan fresh install.
1. Pada konfigurasi dom0, samakan mac address dari ethernet interface dom0 dengan xen domU, karena di server penulis menggunakan dua interface maka seperti berikut:
vif = [ 'mac=00:xx:xx:xx:xx:xx,bridge=intbr','mac=00:xx:xx:xx:xx:xx,bridge=extbr' ]
2. sekarang mari lihat Card-PRI kita pada dom0:
[root@unixhat ~]# lspci
0x:0x.x Ethernet controller: Digium, Inc. Wildcard TE121 single-span T1/E1/J1 card (PCI-Express) (rev 11)
3. Sembunyikan card-PRI-nya pada dom0, di file /etc/modprobe.conf dengan config sebagai berikut:
options pciback hide=(0000:xx:xx.0)
4. Assign card PRI kita, kedalam kedalam domU, dengan konfigurasi sebagai berikut:
name = "domU-unixhat-xen"
memory = "512"
pci = [ '0x:0x.0' ]
disk = ['tap:aio:/dev/vg0/domU-unixhat-xen,xvda,w',
'tap:aio:/dev/vg0/domU-unixhat-xen-swap,xvdb,w']
vif = [ 'mac=00:xx:xx:xx:xx:xx,bridge=intbr','mac=00:xx:xx:xx:xx:xx,bridge=extbr' ]
bootloader="/usr/bin/pygrub"
vcpus=2
on_reboot = 'restart'
on_crash = 'restart'
5. Edit domU kernel boot parameter, tambahkan swiotlb=force, karena jika tidak, system akan crash pada saat dahdi di start:
kernel /boot/vmlinuz-2.6.18-274.18.1.el5xen ro root=LABEL=/ console=xvc0 swiotlb=force
6. Sekarang kita bekerja pada domU, tambahkan repository Asterisk dan Digium:
[asterisk-current]
name=CentOS-$releasever - Asterisk - Current
baseurl=http://packages.asterisk.org/centos/$releasever/current/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.asterisk.org/RPM-GPG-KEY-Digium
[digium-current]
name=CentOS-$releasever - Digium - Current
baseurl=http://packages.digium.com/centos/$releasever/current/$basearch/
enabled=0
gpgcheck=0
#gpgkey=http://packages.digium.com/RPM-GPG-KEY-Digium
7. Install paket yang dibutuhkan oleh kernel dan xen :
yum --enablerepo=asterisk-current --enablerepo=digium-current install kmod-dahdi-linux kmod-dahdi-linux-fwload-vpmadt032-xen
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
kmod-dahdi-linux x86_64 2.5.0.2-1_centos5.2.6.18_274.18.1.el5 asterisk-current 3.6 M
kmod-dahdi-linux-fwload-vpmadt032-xen x86_64 2.5.0.2-1_centos5.2.6.18_274.18.1.el5 digium-current 127 k
Installing for dependencies:
kernel x86_64 2.6.18-274.18.1.el5 CentOS-updates 21 M
kernel-xen x86_64 2.6.18-274.18.1.el5 CentOS-updates 21 M
8. Install paket Asterisk:
yum --enablerepo=asterisk-current --enablerepo=digium-current install asterisk18 asterisk18-configs asterisk18-voicemail dahdi-linux dahdi-tools libpri asterisk-sounds-moh-opsound-ulaw.noarch
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
asterisk x86_64 1.8.9.2-1_centos5 asterisk-1.8 4.5 k
asterisk-configs x86_64 1.8.9.2-1_centos5 asterisk-1.8 189 k
asterisk-sounds-moh-opsound-ulaw noarch 0.0-4_centos5 asterisk-current 7.1 M
asterisk-voicemail x86_64 1.8.9.2-1_centos5 asterisk-1.8 249 k
dahdi-linux x86_64 2.5.0.2-1_centos5 asterisk-current 3.3 k
dahdi-tools x86_64 2.5.0.2-1_centos5 asterisk-current 341 k
libpri x86_64 1.4.11.5-1_centos5 asterisk-current 376 k
Installing for dependencies:
asterisk-dahdi x86_64 1.8.9.2-1_centos5 asterisk-1.8 1.3 M
libopenr2 x86_64 1.2.0-1_centos5 asterisk-current 169 k
9. Install paket untuk fax (penulis menggunakan Asterisk juga untuk manage fax, kita bisa skip bila tidak memanage fax) :
yum --enablerepo=asterisk-current --enablerepo=digium-current install asterisk18-res_fax_digium
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
asterisk-res_fax_digium x86_64 1:1.8.4_1.3.0-2_centos5 digium-1.8 7.1 M
yum install ghostscript mutt
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Installing:
ghostscript i386 8.70-6.el5_7.6 CentOS-updates 9.0 M
ghostscript x86_64 8.70-6.el5_7.6 CentOS-updates 8.9 M
mutt x86_64 5:1.4.2.2-3.0.2.el5 CentOS-base 1.1 M
Installing for dependencies:
chkfontpath x86_64 1.10.1-1.1 CentOS-base 15 k
ghostscript-fonts noarch 5.50-13.1.1 CentOS-base 801 k
libFS x86_64 1.0.0-3.1 CentOS-base 30 k
libICE i386 1.0.1-2.1 CentOS-base 54 k
libSM i386 1.0.1-3.1 CentOS-base 27 k
libXfont x86_64 1.2.2-1.0.4.el5_7 CentOS-updates 245 k
libXt i386 1.0.2-3.2.el5 CentOS-base 173 k
libXt x86_64 1.0.2-3.2.el5 CentOS-base 181 k
libfontenc x86_64 1.0.2-2.2.el5 CentOS-base 19 k
ttmkfdir x86_64 3.0.9-23.el5 CentOS-base 46 k
urw-fonts noarch 2.3-6.1.1 CentOS-base 4.5 M
xorg-x11-font-utils x86_64 1:7.1-3 CentOS-base 78 k
xorg-x11-xfs x86_64 1:1.0.2-5.el5_6.1 CentOS-base 73 k
10. Pastikan file grub.conf ditambahkan swiotlb=force:
title CentOS (2.6.18-274.18.1.el5xen)
root (hd0,0)
kernel /vmlinuz-2.6.18-274.18.1.el5xen ro root=LABEL=/ console=xvc0 audit=1 swiotlb=force
initrd /initrd-2.6.18-274.18.1.el5xen.img
11. Bila kita migrasi, copy kan file konfigurasi yang sebelumnya kita backup dibawah ini, bila fresh install kita tinggal mengkonfigurasi file-file konfigurasi dibawah ini:
a. Asterisk:
extensions.conf, voicemail.conf, meetme.conf, sip.conf, extensions.ael, chan_dahdi.conf, queues.conf, features.conf
b. Dahdi: modules, system.conf
12. Jika kita memiliki lisensi untuk fax maka copy kan dan set menjadi 640, jika fresh install maka sampai sini kita sudah selesai:
/var/lib/asterisk/licenses/lisensiku.lic
Ingat yang perlu kita ingat adalah bukan tahap-tahapnya, tapi bagaimana prosesnya. Jadi pada lain case kita bisa melakukan hal yang sama.