Elastix Installation for Proxmox 1.3 OpenVZ Dahdi

gl1176

Joined
Oct 5, 2009
Messages
55
Likes
0
Points
0
#1
It took me a while to get this to work.
Here are my notes, hopefully this will help someone else.
Remember to take out the space between http ://
I had to add the space because of forum reformatting it:

### INSTALL DAHDI ON PROXMOX SHELL
apt-get install gcc make pve-headers-2.6.24-7-pve
aptitude update
aptitude safe-upgrade

cd /usr/src
wget http ://downloads.asterisk.org/pub/telephony/dahdi-linux/dahdi-linux-current.tar.gz
tar -xzvf dahdi-linux-current.tar.gz
cd dahdi-linux-2*
make
make install

cd /usr/src
wget http ://downloads.asterisk.org/pub/telephony/dahdi-tools/dahdi-tools-current.tar.gz
tar -xzvf dahdi-tools-current.tar.gz
cd dahdi-tools-2*
./configure
make
make install
make config

apt-get install chkconfig
chkconfig dahdi on

echo 'DEVNODES="dahdi/channel:rw dahdi/ctl:rw dahdi/timer:rw dahdi/pseudo:rw null:rw "' >> /etc/vz/conf/ve-pve.auto.conf-sample

### DOWNLOAD CENTOS 5.3 x86_64 TEMPLATE FROM OPENVZ.ORG

cd /var/lib/vz/template/cache
wget http ://download.openvz.org/template/precreated/centos-5-x86_64.tar.gz

### ADD NEW OPENVZ MACHINE FROM TEMPLATE IN GUI

### START VM IN GUI AND PERFORM BELOW ON VM SHELL

echo '[elastix]
name=Elastix RPM Repository for CentOS
baseurl=http ://repo.elastix.org/elastix/1/base/$basearch/
gpgcheck=0
enabled=1' > /etc/yum.repos.d/elastix.repo

rpm -Uvh http ://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

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
yum clean all

edit /usr/sbin/safe_asterisk
#TTY=9

edit /etc/init.d/asterisk
#chown asterisk /dev/tty9

edit /var/lib/asterisk/bin/freepbx_engine
#chown $AMPASTERISKUSER /dev/tty9

edit /etc/rc.d/rc.sysinit
#/sbin/start_udev

chkconfig haldaemon off
chkconfig bluetooth off
chkconfig hidd off
chkconfig asterisk off
chkconfig dahdi off
chkconfig wanrouter off
rm -rf /etc/init.d/dahdi
rm -rf /etc/init.d/wanrouter

reboot
 

jpagarcia

Joined
Jun 20, 2009
Messages
17
Likes
0
Points
0
#2
Hello, I followed this procedure and I can access to Elastix though http://MyIP...
But I have a problem. When I go to PBX - Extensions there is no option "ADD EXTENSION". What's more, when I go to System - Network the Ethernet Interfaces List is empty. So the system doesn't detect my network card. At last, when I go to System - Hardware Detection I have this message: "No cards were detected on your system. Please press the "Detect New Hardware" button to detect new hardware."
The tool "Detect New Hardware" doesn't detect anything. If I access to the machine through ssh (putty) and I type the command system-config-network the system shows me the network card.

I'm working with proxmox - openvz, how can I detect or create my network card???

thanks!!

Juan Pablo
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#3
OpenVZ has special network interfaces, which won't work with the web gui (venet0:0 for example). You'll have to configure them manually. Or if you just run the container and not the server, maybe you can't configure network interfaces at all, and they come already preconfigured by the system administrator.
But if you have ssh access this is a good signal, you usually don't need to configure anything else.
Well, I'd really recommend you using some iptables script to protect your machine, if it is in a open network, as usually vps's are.
Read through OpenVZ networking documentation, as I think you won't get much help here about that. Ask in their forums for OpenVZ specific issues.

If you can't add a new extension, this is normally caused by a problem into asterisk/amportal configuration. Make sure that when you run 'amportal restart' from a console, asterisk starts without problems. Check the logs into /var/log/asterisk/full for problems with the startup process or loading modules.

EDIT: If you have followed the previous post, you will need to 'chkconfig asterisk on' or asterisk won't be started after a reboot. That's why you can't add extensions, asterisk is not running.

The hardware detection interface detects dahdi devices plugged into your system, but usually you won't have them in a OpenVZ container, as it is a virtual machine. You will need to configure trunks and extensions using sip or iax2. As you won't be able to use PCI devices, you might consider using sip gateways if you need to interact with the PSTN.
 

ramoncio

Joined
May 12, 2010
Messages
1,663
Likes
0
Points
0
#4
By the way, very nice job, gl1176.
Thanks for sharing!!
 

joel1198

Joined
Nov 21, 2009
Messages
11
Likes
0
Points
0
#5
Ramoncio,

What about if I can't add Extensions or see my Network Preference after installation but found out Asterisk is running? What you suggest?

Thanks,
 

joel1198

Joined
Nov 21, 2009
Messages
11
Likes
0
Points
0
#6
Juan Pablo,

Did you solved the issue with the extensions??

How you do it??

Thanks,
 

jpagarcia

Joined
Jun 20, 2009
Messages
17
Likes
0
Points
0
#7
Hello,

I followed the adivse of ramoncio. Thanks!! I saw that Astirisk was not running, so I decided to start again from scratch and it worked. I think that I made something wrong the first time.

Now I got another problem, Elastix was correctly working and something happened (I don't konw what) I was talking with somebody and the system stopped. Now it doesn't work and ping is not responding... I can't access with ssh...

Please, what do you recommend to check in the VM?

Thanks!!

Juan Pablo
 

jpagarcia

Joined
Jun 20, 2009
Messages
17
Likes
0
Points
0
#8
In this log /var/log/asterisk/full I have this message: chan_iax2.c: Restricting registration for peer '7000' to 60 seconds (requested 300).

Thanks!!

Juan Pablo
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#9
Although I don't see what this has to do with this thread
try:

echo "maxregexpire=360" >> /etc/asterisk/iax_general_custom.conf && rasterisk -x 'iax2 reload'

(one line)
 

jpagarcia

Joined
Jun 20, 2009
Messages
17
Likes
0
Points
0
#10
Thanks dicko!

When I enter: rasterisk -x 'iax2 reload' I have this message: Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)

This file doesn't exist! what can I do? I'm new in this things...

Thank you!

Juan Pablo
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#11
It means asterisk is not running or you typed the command as a user that does not have access to asterisk, what is the output of

whoami
asterisk
exit
 

excale

Joined
Apr 28, 2009
Messages
6
Likes
0
Points
0
#12
Re:Elastix Installation for Proxmox 1.3 OpenVZ Dah

Hi I managed to migrate Elastix from a server with XenServer to a server with Proxmox. Everything is running fine except the following issue with DISA, that I posted today:
DISA problem 7 Hours, 55 Minutes ago Karma: 0
Hi have a problem with DISA. It has been working at the beginning but it is not a function we use very often.

The other day we realized a problem, that we can call in, get dial tone and call to an external number. Until here everything is fine but we can hear the person we are calling to but the other one can't hear us.

This happens only calling an external number, if it an internal extension it works fine.

All the communications are working fine it is only this problem with DISA. Any idea?

Thanks
I do not know if this could be related with proxmox or with something else.

Many thanks
 

galaxy

Joined
Jun 22, 2010
Messages
42
Likes
0
Points
0
#13
I've been trying to get this to work to allow my VM to access the TDM400P card.

I've followed the instructions and compiled/loaded the dahdi kernel module.

I've checked the dmesg logs from the original hardware host and found the relevant lines in /var/log/messages as:

Jun 14 20:09:45 elastix kernel: dahdi: Telephony Interface Registered on major 196
Jun 14 20:09:45 elastix kernel: dahdi: Version: 2.2.0.2
Jun 14 20:09:45 elastix kernel: GSI 20 sharing vector 0xC9 and IRQ 20
Jun 14 20:09:45 elastix kernel: ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 201
Jun 14 20:09:46 elastix kernel: Freshmaker version: 73
Jun 14 20:09:46 elastix kernel: Freshmaker passed register test
Jun 14 20:09:46 elastix kernel: Module 0: Installed -- AUTO FXO (FCC mode)
Jun 14 20:09:46 elastix kernel: Module 1: Installed -- AUTO FXO (FCC mode)
Jun 14 20:09:46 elastix kernel: Module 2: Installed -- AUTO FXO (FCC mode)
Jun 14 20:09:46 elastix kernel: Module 3: Installed -- AUTO FXO (FCC mode)
Jun 14 20:09:46 elastix kernel: Found a Wildcard TDM: Wildcard TDM400P REV I (4 modules)
Jun 14 20:09:46 elastix kernel: dahdi_transcode: Loaded.
Jun 14 20:09:47 elastix kernel: INFO-xpp: revision trunk-r6963 MAX_XPDS=64 (8*8)
Jun 14 20:09:47 elastix kernel: INFO-xpp: FEATURE: with BRISTUFF support
Jun 14 20:09:47 elastix kernel: INFO-xpp: FEATURE: with PROTOCOL_DEBUG
Jun 14 20:09:47 elastix kernel: INFO-xpp: FEATURE: with sync_tick() from DAHDI
Jun 14 20:09:47 elastix kernel: INFO-xpp_usb: revision trunk-r6963
Jun 14 20:09:47 elastix kernel: usbcore: registered new driver xpp_usb
Jun 14 20:09:47 elastix kernel: Unified AP4XX PCI Card Driver
Jun 14 20:09:47 elastix kernel: DAHDI Dynamic Span support LOADED
Jun 14 20:09:47 elastix kernel: rxt1: no version for "dahdi_hdlc_putbuf" found: kernel tainted.
Jun 14 20:09:47 elastix kernel: dahdi: Registered tone zone 0 (United States / North America)


In the new hardware node I see it finds the 4 modules, but there's differences in the INFO-xpp lines and Elastix can't find the trunks. Is there another kernel module required for elastix 1.6? Here's the same output on the hardware node:

Jun 22 20:42:47 sempy kernel: dahdi: Telephony Interface Registered on major 196
Jun 22 20:42:47 sempy kernel: dahdi: Version: 2.3.0.1
Jun 22 20:42:48 sempy kernel: GSI 20 sharing vector 0xC9 and IRQ 20
Jun 22 20:42:48 sempy kernel: ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 18 (level, low) -> IRQ 201
Jun 22 20:42:49 sempy kernel: Freshmaker version: 73
Jun 22 20:42:49 sempy kernel: Freshmaker passed register test
Jun 22 20:42:49 sempy kernel: Module 0: Installed -- AUTO FXO (FCC mode)
Jun 22 20:42:49 sempy kernel: Module 1: Installed -- AUTO FXO (FCC mode)
Jun 22 20:42:49 sempy kernel: Module 2: Installed -- AUTO FXO (FCC mode)
Jun 22 20:42:49 sempy kernel: Module 3: Installed -- AUTO FXO (FCC mode)
Jun 22 20:42:49 sempy kernel: Found a Wildcard TDM: Wildcard TDM400P REV I (4 modules)
Jun 22 20:42:49 sempy kernel: dahdi_transcode: Loaded.
Jun 22 20:42:49 sempy kernel: INFO-xpp: revision Unknown MAX_XPDS=64 (8*8)
Jun 22 20:42:49 sempy kernel: INFO-xpp: FEATURE: without BRISTUFF support
Jun 22 20:42:49 sempy kernel: INFO-xpp: FEATURE: with PROTOCOL_DEBUG
Jun 22 20:42:49 sempy kernel: INFO-xpp: FEATURE: with sync_tick() from DAHDI
Jun 22 20:42:49 sempy kernel: INFO-xpp_usb: revision Unknown
Jun 22 20:42:49 sempy kernel: usbcore: registered new driver xpp_usb
Jun 22 20:42:50 sempy kernel: dahdi: Registered tone zone 0 (United States / North America)

Do I need the zaptel module too? I was under the impression that dahdi was replacing that.
 

galaxy

Joined
Jun 22, 2010
Messages
42
Likes
0
Points
0
#14
Well I think I understand the problem with getting a TDM400P card recognized within a VE.

The tools within the VE do recognize the card is there and can access the devices, however the /proc file system in the hardware node contains the /proc/dahdi/1 entry where it can get/set status and is not accessible to the VE.

So until either OpenVZ allows you to map /proc/dahdi to a VE or the DAHDI developers restrict the tools to only use devices in the /dev tree to get/set status (and remove the /proc/dahdi nodes) I don't think it will be possible to delegate cards to VE's.

So you can only use a VE (or container if you prefer) if you do not rely on the PCI cards.
 

gl1176

Joined
Oct 5, 2009
Messages
55
Likes
0
Points
0
#15
You need to add access to the /dev folder like below:

vzctl set <VEID> --devnodes dahdi/channel:rw --save
vzctl set <VEID> --devnodes dahdi/ctl:rw --save
vzctl set <VEID> --devnodes dahdi/timer:rw --save
vzctl set <VEID> --devnodes dahdi/pseudo:rw --save
vzctl set <VEID> --devnodes null:rw --save

Or you can edit the config file for you machine and add the below and restart.

DEVNODES="dahdi/channel:rw dahdi/ctl:rw dahdi/timer:rw dahdi/pseudo:rw null:rw"
 

galaxy

Joined
Jun 22, 2010
Messages
42
Likes
0
Points
0
#16
I have all that. But that's not the problem. Those give you access to the /dev tree devices that are required, however they don't give you access to /proc/dahdi.

So there needs to be a way to delegate /proc entries to a VE like there is for /dev.
I don't believe OpenVZ has anything in place like that.

An alternative would be for the dahdi driver or tools developers to not use the linux specific /proc interface, and leave everything in the /dev tree.
 

gl1176

Joined
Oct 5, 2009
Messages
55
Likes
0
Points
0
#17
Oh, sorry, I read that too fast.

Well I have a T1 card working just fine on my vm. You shouldn't be trying to run dahdi on the vm if thats what you're refering to. All the tools should work in the vm, if the dev stuff is accessible, and the dahdi service is no running.

What kind of problems are you seeing?
 

galaxy

Joined
Jun 22, 2010
Messages
42
Likes
0
Points
0
#18
I'm not sure who the consumer of the /proc/dahdi/1 (or all the cards listed under /proc/dahdi), of whether its the tools or its Elastix or Asterisk. But when I look and do the hardware detect, it shows no devices present (in the VM).

If I run the following on the HW I get:

[root@sempy]# cat /proc/dahdi/1
Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER)

1 WCTDM/4/0 FXSKS RED
2 WCTDM/4/1 FXSKS RED
3 WCTDM/4/2 FXSKS RED
4 WCTDM/4/3 FXSKS

(and sure enough, I only have a phone trunk plugged into port 4).

And in the dahdi README file:

PROCFS Interface: /proc/dahdi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A simple way to get the current list of spans and channels each span contains
is the files under /proc/dahdi . /proc/dahdi is generated by DAHDI as it
loads. As each span registers to DAHDI, a file under /proc/dahdi is created
for it. The name of that file is the number of that span.

Each file has a 1-line title for the span followed by a few optional
general counter lines, an empty line and then a line for each channel of
the span.

The title line shows the number of the span, its name and title, and
(potentially) the alarms in which it is.

The title shows the span number and name, followed by any alarms the
span may have: For example, here is the first span in my system (with no
alarms):

Span 1: XBUS-00/XPD-00 "Xorcom XPD #0/0: FXS"

There are several extra optional keywords that may be added there:

(Master)::
This span is the master span. See <<_dahdi_timing,DAHDI Timing>>.
ClockSource::
The clock source among several spans that belong to a single E1/J1/T1
card.
RED/YELLOW/RED/NOTOPEN/LOOP/RECOVERING::
The span is in alarm

Following that line there may be some optional lines about IRQ misses,
timing slips and such, if there are any.

The channel line for each channel shows its channel number, name and the
actual signalling assigned to it through dahdi_cfg. Before being configured by
dahdi_cfg: This is DAHDI channel 2, whose name is 'XPP_FXS/0/0/1'.

2 XPP_FXS/0/0/1

After being configured by dahdi_cfg: the signalling 'FXOLS' was added. FXS
channels have FXO signalling and vice versa:

2 XPP_FXS/0/0/1 FXOLS

If the channel is in use (typically opened by Asterisk) then you will
see an extra '(In use)':

2 XPP_FXS/0/0/1 FXOLS (In use)
 

gl1176

Joined
Oct 5, 2009
Messages
55
Likes
0
Points
0
#19
It should be known that this type of installation is outside the Elastix support model, and as such, you will not be able to configure the hardware using the GUI.

For my installation, I configured dahdi on the hardware node using the /etc/dahdi/ config files.

Then on the vm, configure for asterisk using the /etc/asterisk/chan_dahdi.conf.
 

galaxy

Joined
Jun 22, 2010
Messages
42
Likes
0
Points
0
#20
Well I literally just began a fresh installation of CentOS 5.5 on the disk...
I was hoping to put 1.6 in one VM, 2.0 in another and swap back and forth between them.

As for a support model, I'm not looking for elastix to do the support of it, but was hoping it would see that its there.

I'll try a vanilla installation again with 2.0, keep copies of /etc/dahdi/ files and the /etc/asterisk/chan_dahdi.conf file and try again.

Thanks...
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,901
Messages
130,885
Members
17,561
Latest member
marouen
Top