Elastix 2.0 and OpenVZ / Proxmox template

gl1176

Joined
Oct 5, 2009
Messages
55
Likes
0
Points
0
#1
Here is a howto on installing Elastix 2.0 in a vm under OpenVZ / Proxmox:

#Download, compile, and install dahdi on hardware node

#Download a Centos 5.4 template for the same platform the hardware node is 32/64 bit
cd /var/lib/vz/template/cache
wget http://download.openvz.org/template/pre ... _64.tar.gz

#Start vm and give it access to the /dev folder
vzctl start $VID
vzctl set $VID --devnodes dahdi/channel:rw --save
vzctl set $VID --devnodes dahdi/ctl:rw --save
vzctl set $VID --devnodes dahdi/timer:rw --save
vzctl set $VID --devnodes dahdi/pseudo:rw --save
vzctl set $VID --devnodes null:rw --save

#Download Elastix 2.0, mount on hardware node, and copy the folder to the vm
cd /var/lib/vz/template/iso/
wget http://downloads.sourceforge.net/projec ... go2010.iso
mkdir /mnt/Elastix
mount -t iso9660 -o loop /var/lib/vz/template/iso/Elastix-2.0.1-x86_64-bin-07ago2010.iso /mnt/Elastix
cp -R /mnt/Elastix /var/lib/vz/private/$VID/usr/src

#Enter vm and configure below:
ifconfig eth0 192.168.128.12/24
route add default gw 192.168.128.1

yum -y install createrepo
createrepo /usr/src/Elastix

echo '
[local]
enabled = 1
name = Elastix
baseurl = file:///usr/src/Elastix
gpgcheck = 0
' > /etc/yum.repos.d/elastix.repo

yum -y update

yum -y install asterisk* elastix-* freeze fxload libmfcr2 lzop perl-HTML-TokeParser-Simple perl-WWW-Mechanize mod_ssl mlocate gcc gcc-c++ system-config-network-tui wget sox nano

mv -f /etc/yum.repos.d/elastix.repo.rpmnew /etc/yum.repos.d/elastix.repo

yum clean all

sed -i 's/TTY=9/#TTY=9/g' /usr/sbin/safe_asterisk
sed -i 's/chown asterisk \/dev\/tty9/#chown asterisk \/dev\/tty9/g' /etc/init.d/asterisk
sed -i 's/\/sbin\/start_udev/#\/sbin\/start_udev/g' /etc/rc.d/rc.sysinit
sed -i 's/\/usr\/sbin\/fxotune -s/#\/usr\/sbin\/fxotune -s/g' /etc/rc.local
sed -i 's/chown $AMPASTERISKUSER \/dev\/tty9/#chown $AMPASTERISKUSER \/dev\/tty9/g' /var/lib/asterisk/bin/freepbx_engine

chkconfig haldaemon off
chkconfig asterisk off
chkconfig dahdi off
chkconfig wanrouter off

rm -rf /etc/init.d/dahdi
rm -rf /etc/init.d/wanrouter
rm -rf /usr/src/Elastix

echo 'DEVICE=eth0' > /etc/sysconfig/network-scripts/ifcfg-eth0
system-config-network

service mysqld start
/etc/rc3.d/S66elastix-firstboot start

reboot

yum -y update

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

I also have a 64 built template for download:
https://docs.google.com/uc?id=0B8T1zyMj ... load&hl=en

You must run below and reboot on first boot:
/etc/rc3.d/S66elastix-firstboot start

Have fun,
Gil
 

aboferas

Joined
Aug 21, 2010
Messages
3
Likes
0
Points
0
#2
have you managed to get PCI passthrough working for your FXO cards?
 

gl1176

Joined
Oct 5, 2009
Messages
55
Likes
0
Points
0
#3
I have only got a redfone bridge to work with the dahdi drivers installed on the host server.

I wouldn't recommend a TDM card to be installed into a OpenVZ server with out the know how and testing to add the /proc/dahdi or /proc/zaptel file access to the server. I have also seen people reference the need access to the /dev folder, but I didn't need it using the redfone bridge.

You definitely need to give access to the /proc/dahdi or /proc/zaptel for accurate time source for the meetme app, which a lot of features use like call park.

I would recommend using a quality FXO gateway like Audiocodes for FXO termination. If you have a lot more lines to support, redfone bridge works for T1/E1 (still haven't tried a TDM card internally), or just use a really good SIP provider with a QoS/MPLS provisioned circuit designed for VoIP.
 

gl1176

Joined
Oct 5, 2009
Messages
55
Likes
0
Points
0
#4
I have only got a redfone bridge to work with the dahdi drivers installed on the host server.

I wouldn't recommend a TDM card to be installed into a OpenVZ server with out the know how and testing to add the /proc/dahdi or /proc/zaptel file access to the server. I have also seen people reference the need access to the /dev folder, but I didn't need it using the redfone bridge.

You definitely need to give access to the /proc/dahdi or /proc/zaptel for accurate time source for the meetme app, which a lot of features use like call park.

I would recommend using a quality FXO gateway like Audiocodes for FXO termination. If you have a lot more lines to support, redfone bridge works for T1/E1 (still haven't tried a TDM card internally), or just use a really good SIP provider with a QoS/MPLS provisioned circuit designed for VoIP.
 

johnyoung6966

Joined
Jul 17, 2010
Messages
2
Likes
0
Points
0
#5
Hi,

Just done:

I also have a 64 built template for download:
docs.google.com/uc?id=0B8T1zyMjIRDgMjBjM...t=download&hl=en

You must run below and reboot on first boot:
/etc/rc3.d/S66elastix-firstboot start

Installed on proxmox template and all is good - calls terminate through freepbx but when I implicate the a2billing outbound trunk I get the "all circuits are busy - please try your call again later"
take the a2billing back out of the equation and it all works
The problem is something to do with passing the call to a2billing.
I have even tried following steps listed here: http://sysadminman.net/blog/2010/create ... lling-1282 with the outbound route as Local/$OUTNUM$@a2billing/n but still no luck.

Any ideas ????

John
 

gl1176

Joined
Oct 5, 2009
Messages
55
Likes
0
Points
0
#6
I don't use a2billing, so I can't help you on that.

But, this template was based on 2.0.1 of Elastix, so you might want to update the system, along with search the forums for the same problem in the a2billing section for Elastix 2.0.1.
 

netizen

Joined
Mar 14, 2009
Messages
40
Likes
0
Points
0
#7
Is this supposed NOT to be using DAHDI?
I just followed the guide (thank you for putting there)..however it seems there is no DAHDI present or something else is wrong.
>>>
[Aug 13 15:51:33] VERBOSE[10075] config.c: == Parsing '/etc/asterisk/meetme_additional.conf': [Aug 13 15:51:33] VERBOSE[10075] config.c: == Found
[Aug 13 15:51:33] WARNING[10075] app_meetme.c: Unable to open DAHDI pseudo device

Also, I am getting complaints about TTY9... is this related anyhow?

Please advise!

Thank you
N



gl1176 said:
Here is a howto on installing Elastix 2.0 in a vm under OpenVZ / Proxmox:

#Download, compile, and install dahdi on hardware node

#Download a Centos 5.4 template for the same platform the hardware node is 32/64 bit
cd /var/lib/vz/template/cache
wget http://download.openvz.org/template/pre ... _64.tar.gz

#Start vm and give it access to the /dev folder
vzctl start $VID
vzctl set $VID --devnodes dahdi/channel:rw --save
vzctl set $VID --devnodes dahdi/ctl:rw --save
vzctl set $VID --devnodes dahdi/timer:rw --save
vzctl set $VID --devnodes dahdi/pseudo:rw --save
vzctl set $VID --devnodes null:rw --save

#Download Elastix 2.0, mount on hardware node, and copy the folder to the vm
cd /var/lib/vz/template/iso/
wget http://downloads.sourceforge.net/projec ... go2010.iso
mkdir /mnt/Elastix
mount -t iso9660 -o loop /var/lib/vz/template/iso/Elastix-2.0.1-x86_64-bin-07ago2010.iso /mnt/Elastix
cp -R /mnt/Elastix /var/lib/vz/private/$VID/usr/src

#Enter vm and configure below:
ifconfig eth0 192.168.128.12/24
route add default gw 192.168.128.1

yum -y install createrepo
createrepo /usr/src/Elastix

echo '
[local]
enabled = 1
name = Elastix
baseurl = file:///usr/src/Elastix
gpgcheck = 0
' > /etc/yum.repos.d/elastix.repo

yum -y update

yum -y install asterisk* elastix-* freeze fxload libmfcr2 lzop perl-HTML-TokeParser-Simple perl-WWW-Mechanize mod_ssl mlocate gcc gcc-c++ system-config-network-tui wget sox nano

mv -f /etc/yum.repos.d/elastix.repo.rpmnew /etc/yum.repos.d/elastix.repo

yum clean all

sed -i 's/TTY=9/#TTY=9/g' /usr/sbin/safe_asterisk
sed -i 's/chown asterisk \/dev\/tty9/#chown asterisk \/dev\/tty9/g' /etc/init.d/asterisk
sed -i 's/\/sbin\/start_udev/#\/sbin\/start_udev/g' /etc/rc.d/rc.sysinit
sed -i 's/\/usr\/sbin\/fxotune -s/#\/usr\/sbin\/fxotune -s/g' /etc/rc.local
sed -i 's/chown $AMPASTERISKUSER \/dev\/tty9/#chown $AMPASTERISKUSER \/dev\/tty9/g' /var/lib/asterisk/bin/freepbx_engine

chkconfig haldaemon off
chkconfig asterisk off
chkconfig dahdi off
chkconfig wanrouter off

rm -rf /etc/init.d/dahdi
rm -rf /etc/init.d/wanrouter
rm -rf /usr/src/Elastix

echo 'DEVICE=eth0' > /etc/sysconfig/network-scripts/ifcfg-eth0
system-config-network

service mysqld start
/etc/rc3.d/S66elastix-firstboot start

reboot

yum -y update

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

I also have a 64 built template for download:
https://docs.google.com/uc?id=0B8T1zyMj ... load&hl=en

You must run below and reboot on first boot:
/etc/rc3.d/S66elastix-firstboot start

Have fun,
Gil
 

woodpecker

Joined
Feb 16, 2013
Messages
8
Likes
0
Points
0
#8
Hi,

I'm interested in a template for OpenVZ with Elastix (preferrably version 2.4.

At the end of your post you mention a template on docs.google.com but I don't find it there. Any place where I could get it?

thanks
 

ictdude

Joined
Aug 12, 2009
Messages
23
Likes
0
Points
0
#9
This 2.0 and OpenVZ / Proxmox template looks really nice.

Just did install it. Will give it a try for testing. Do all the basic functions work fine ? Who also did test this OpenVZ template ? Can it be used for production ? Sombody did test it ? I will test it. And if i got time report it here :silly:
 

woodpecker

Joined
Feb 16, 2013
Messages
8
Likes
0
Points
0
#10
hello ictdude

From where did you download this template ? I would like to test is too !

tx
 

ictdude

Joined
Aug 12, 2009
Messages
23
Likes
0
Points
0
#11
woodpecker said:
hello ictdude

From where did you download this template ? I would like to test is too !

tx
From this location: This link Looks its not working !? :S Do you have a account where i can upload it ?
Its to big to mail haha :silly: Sent me your info or a ftp account ...
 

woodpecker

Joined
Feb 16, 2013
Messages
8
Likes
0
Points
0
#12
Sorry - I don't have a google account or ftp site at the moment.
Can I ftp it from your site ?

tx
 

remark

Joined
Jun 16, 2011
Messages
152
Likes
0
Points
18
#13
I have Elastix 2.4 (upgraded from 2.3) on Proxmox, but I didn't use template.
Just created new VM and install Elastix from ISO.
Installed on May, 2012, and it runs smoothly, but I have no any hardware cards on it, only SIP trunks and extensions.
 

woodpecker

Joined
Feb 16, 2013
Messages
8
Likes
0
Points
0
#14
aha, that's what I also did, but hoped to find a template to make additional virtual pbx installs easier. I guess I can create a template myself from what I have installed in the VM, so that next installs can be done in containers.


anyhow, with the ISO install I do have problems with the keyboard mapping. It seems that the Elastix distro supports only limited types of keyboards - none of them give a workable for my belgian (dutch) type keyboard on my laptop. The best match was be-latin, but some characters I jut do not find anywhere on the keyboard...

When trying us,uk,fr,de all of these give a lot of keys that give errors - so I wonder how I can fix this.
 

ictdude

Joined
Aug 12, 2009
Messages
23
Likes
0
Points
0
#15
woodpecker said:
Sorry - I don't have a google account or ftp site at the moment.
Can I ftp it from your site ?

tx
Sorry i have no ftp. You need to give me something to upload the OpenVz template B)
 

ictdude

Joined
Aug 12, 2009
Messages
23
Likes
0
Points
0
#16
remark said:
I have Elastix 2.4 (upgraded from 2.3) on Proxmox, but I didn't use template.
Just created new VM and install Elastix from ISO.
Installed on May, 2012, and it runs smoothly, but I have no any hardware cards on it, only SIP trunks and extensions.
I use a OpenVZ template because it uses 10 x less resources then a KVM iso :silly:
That is why. Just today tested inbound number and Outgoing trunk went perfect.

I use a venet network on Openvz. I do a Dnat (NAT)tot the IP adress. Until now i did
not change a settings concerning NAT on Asterisk. Seems to work. Portforwarding looks ok.
Calling audio is smooth ...
 

ictdude

Joined
Aug 12, 2009
Messages
23
Likes
0
Points
0
#17
woodpecker said:
aha, that's what I also did, but hoped to find a template to make additional virtual pbx installs easier. I guess I can create a template myself from what I have installed in the VM, so that next installs can be done in containers.


anyhow, with the ISO install I do have problems with the keyboard mapping. It seems that the Elastix distro supports only limited types of keyboards - none of them give a workable for my belgian (dutch) type keyboard on my laptop. The best match was be-latin, but some characters I jut do not find anywhere on the keyboard...

When trying us,uk,fr,de all of these give a lot of keys that give errors - so I wonder how I can fix this.
Change your keyboard setup in your Windows ? Or Linux. I have the template it was on this forum now its gone. So i run Elastix now in a container (OpenVZ) :p I would like to upload it somewhere if somebody give me a location :) Until now it really looks fine what the original poster did. Transform a iso in to a container. Saved me some work. Easy to install.Few minutes and ready :) Would be nice if Elastix also make Elastix containers (OpenVZ) to download ...
 

woodpecker

Joined
Feb 16, 2013
Messages
8
Likes
0
Points
0
#18

ictdude

Joined
Aug 12, 2009
Messages
23
Likes
0
Points
0
#19

woodpecker

Joined
Feb 16, 2013
Messages
8
Likes
0
Points
0
#20
You have indeed to make an account for Google drive (just click on "drive" item on the google start page and you can make a free account with 5 GB).

After that you can upload the template file from your PC into the link that I have set for public sharing. I never did it before - but should be possible...

I'm out now - so will notice only to-morrow if you mangaged to upload.

tx
 

Members online

Latest posts

Forum statistics

Threads
30,898
Messages
130,879
Members
17,560
Latest member
manuelc
Top