OpenVZ Conference Bridging and Zaptel

KUMARULLAL

Guru
Joined
Feb 20, 2008
Messages
257
Reaction score
28
Hi I am using the pbiaf on openvz. Things seem to work fine with other features but when in comes to conference bridging, it is not working.
For example, followme, or transferring an external inbound call to an external phone number does not work. The call is made, but then there is no music on hold for the 1st caller, and as soon as the call is bridged between the 2 external numbers, no one can hear anything.
How do we solve this issue?
Next thing is that, the Zaptel module is not loaded on the pbiaf VM.
As far as the Zaptel is concerned, since I know that the guest os shares the kernal with the host OS, is it required to install just the zaptel module on the host system (openvz server) ?
The openvz server runs on Debian Lenny.
How is this solved?
Please help!!!!
 
Hi

The issue, as you have properly identified is that zaptel/dahdi is not installed on the virtual machine.

This is required as a timing source, so that conferencing can happen.

There are a few threads around on this, but no definitive step by step that I can find, either that, or I am not following instructions properly.

I do understand that Ward has access to the answer however:-

http://pbxinaflash.com/forum/showpost.php?p=27605&postcount=45

Joe
 
Thanks for the reply Joe.
As I suspected, it is the zaptel issue.
As Joe pointed out, According to Ward
32-bit Asterisk runs fine with OpenVZ. Zaptel needs to be installed on the server (properly) and then mapped to the VMs. We'll publish the solution used by a major VM provider soon.
Installing zaptel on openvz server "seems" straightforward. I am hoping that it automatically maps with the VMs ( I will try it and post my feedback), unless there is a process of mapping with the VMs.

HN configuration
Finally you need to make sure that on HN ztdummy kernel module is loaded and the access to /dev/zap/pseudo device file is granted to the container:
modprobe ztdummy
vzctl set 240 --devnodes zap/pseudo:rw --save
This will create /dev/zap/pseudo and /lib/udev/devices/zap/pseudo in your container. The group/owner will be root/root and the permissions will be 644. If you're running Asterisk under the asterisk user in your container, you will need to set the proper ownership for these devices in your VE. The /dev/zap devices are recreated whenever the container is restarted. The /lib/udev/devices/zap files are persistent. The key to only doing this once is to make sure you change the ownership in the VE of the /lib/udev/devices/zap files in addition to the /dev/zap files.
To set the necessary ownership in the VE:
vzctl exec 240 chown -R asterisk /dev/zap /lib/udev/devices/zap
vzctl exec 240 chgrp -R asterisk /dev/zap /lib/udev/devices/zap
The source link is here http://wiki.openvz.org/Asterisk_from_source
A bit confused on what to do.
 
Our stumbling block has been locating the kernel source for proxmox. :rolleyes:
 
Sucsessfully installed Zaptel on proxmox server !!!

I could successfully install the zaptel module in proxmox server.
This is a step by step instructions for it.

Installing zaptel module in proxmox server.
1)apt-get update
2)apt-get install pve-headers-2.6.24-7-pve (This is very important)

This can take a while. You can grab yourself a cup of tea or coffee.

Next change to cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/zaptel/zaptel-1.4.12.1.tar.gz
Then
tar xvzf zaptel-1.4.12.1.tar.gz

Then
wget http://downloads.asterisk.org/pub/telephony/zaptel/zaptel-1.4-current.tar.gz

tar xvzf zaptel-1.4-current.tar.gz
Then
Cd / zaptel-1.4.12.1

Then run ./configure
You will get gcc error and some other error.
You need to install gcc by typing
apt-get install gcc

Then
apt-get install make

And then finally….
./configure
will work
Then
Run the command “make”
Will work.
And lastly
Run the command “make install”

And then run
“make config”


Zaptel is now installed on proxmox server
Now at command prompt rum "modprobe ztdummy"
Then run

echo "ztdummy" >> /etc/modules
Finally you need to make sure that on HN ztdummy kernel module is loaded and the access to /dev/zap/pseudo device file is granted to the container:
modprobe ztdummyvzctl set 250 --devnodes zap/pseudo:rw --save This will create /dev/zap/pseudo and /lib/udev/devices/zap/pseudo in your container. The group/owner will be root/root and the permissions will be 644. If you're running Asterisk under the asterisk user in your container, you will need to set the proper ownership for these devices in your VE. The /dev/zap devices are recreated whenever the container is restarted. The /lib/udev/devices/zap files are persistent. The key to only doing this once is to make sure you change the ownership in the VE of the /lib/udev/devices/zap files in addition to the /dev/zap files.
To set the necessary ownership in the VE:
vzctl exec 250 chown -R asterisk /dev/zap /lib/udev/devices/zap
vzctl exec 250 chgrp -R asterisk /dev/zap /lib/udev/devices/zap


I have done all this. But still meetme problem persists.
What am I missing.
I read somewhere to uninstall zaptel module from the VM.
I tried to uninstall zaptel but was unsuccessful.
How do I uninstall zaptel from the VM?
 
I think it is not required to uninstall zaptel from pbxiaf image.
In any case, in-spite of giving access of zap/pseudo to container by running
vzctl set 250 --devnodes zap/pseudo:rw --save
I am getting error.
When I run
tail /var/log/asterisk/full
I get "app_meetme.c: Unable to open pseudo device"
Please help..................
 
I am almost certain, in order to support conferencing and zaptel/dahd, the template must be built from a 64 bit OS.
It wont work with a 32 bit system.
Once you fire up the vm, you may need to do this.
mkdir /var/lib/vz/private/$VID/lib/modules/2.6.24-7-pve
Next
cp -r /lib/modules/2.6.24-7-pve/* /var/lib/vz/private/$VID/lib/modules/2.6.24-7-pve
 
Hi

I've spent quite a few hours on this, and had never considered the fact that Proxmox was 64bit, and the virtual image was 32bit, this maybe why I failed.

So logically, your suggestion that the HN and the image must both be 64bit sounds as if it has potential.

I'm off to go and see if I can make it work.

Joe
 
Could the answer really be that obvious?

Would love to get this working on a vps online host.
I remember thinking a while back ... hell if Joe cannot get it working what chance do i have .... zero ... and shelved the whole idea. ...

been reading your posts with interest KUMARULLAL.

looking forward to seeing how this all works out.

merlyn
 
Hi

Merlyn, Your faith in me is touching ;-) although possibly misplaced.

It seems that using a 64bit image to build asterisk on, and doing some relatively simple steps on the HN seems to have cracked the problem of meetme conferencing.

Install and start zaptel or Dahdi on the HN

Install and build asterisk / freepbx blah blah on the VE.

Copy /usr/include/zaptel/zaptel.h on the HN to the same location on the VE.

If using dahdi, that should read /usr/include/dahdi/user.h

on the HN, run

Code:
vzctl set 103 --devnodes zap/pseudo:rw --save

Where 103 is the number of your VE instance

or
Code:
vzctl set 103 --devnodes dahdi/pseudo:rw --save

for Dahdi.

Then run the following on the HN

Code:
vzctl exec 103 chown -R asterisk /dev/zap /lib/udev/devices/zap
vzctl exec 103 chgrp -R asterisk /dev/zap /lib/udev/devices/zap

or

Code:
vzctl exec 103 chown -R asterisk /dev/dahdi /lib/udev/devices/dahdi
vzctl exec 103 chgrp -R asterisk /dev/dahdi /lib/udev/devices/dahdi

Then go to /usr/src/asterisk on the VE

make menuselect, and make sure that app_meetme is enabled under applications. If it is not, then select it, make and make install.

Finally amportal kill, then amportal start.

Testing is still taking place, but not looking bad so far.


Joe
 
It worked straight away, I've just got to see how I can break it, reboots, etc.

Joe
 
Just got a big hint from the Proxmox development team. Rename the OpenVZ image to centos-5-PIAF15_i386.tar.gz and try creating a new VM. If you don't use their standard naming convention, Proxmox applies defaults that may not be correct. So this may be related to the mish mash between the 64-bit OS and a 32-bit VM. Proxmox also has the smarts to apply specific settings for CentOS builds... if it knows the OpenVZ image is CentOS. ;)
 
Just a note about iptables, fail2ban and NTPD to work.

Just a note about iptables, fail2ban and NTPD to work.
In order for the Iptables and fail2ban to work on the proxmox, 2 changes need to be made.
Here is a Step-by-Step instructions.
This will work with the venet interface (venet0:0)
On the proxmox server make the following changes on the /etc/vz/vz.conf file.
Look for IPTABLES parameter on the file.
The original parameters will be IPTABLES=”"ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length"

Replace the Original parametes with this

IPTABLES="ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp"
  • [FONT=&quot]Next on the VM [/FONT]edit /etc/sysconfig/iptables-config and change
IPTABLES_MODULES="ip_conntrack_netbios_ns" IPTABLES_MODULES_UNLOAD="yes"
  • to say
IPTABLES_MODULES=""
IPTABLES_MODULES_UNLOAD="no"

After that is done, shutdown all the VM running on your proxmox server.

Once the VMs are shutdown, run the following command on the proxmox server
/etc/init.d/vz restart

Now turn back ON all your VM along with PBIF container.

Now on PBIF container on the console, type “service iptables restart”
The service will restart without a problem.
Check by typing command “iptables –L”
Also try this at the command prompt “/etc/init.d/iptables status”
I don’t know how iptables rules work, (Thanks to Bucasia and mspieker instructions on this thread here )
However, the status script still shows iptables offline. That may be because the Message-of-the-day script is looking for eth0 interface, where as the interface in this case is venet0:0

TO verify if fail2ban is working, You could just try registering an extension on your PIAF server using the wrong password. After so many attempts your IP address should get blocked (which you can check with iptables -L or /etc/init.d/iptables status, looking for your IP address)
Once you put in the correct password for the extension, it the PBIF server will accept and register that extension in about 30 minutes.

For the NTPD server to work, point your SIP phones (for time server settings) to the ip address of the proxmox server, rather than the ip address of the PBXIAF server.
That is it. Everything will work.
Cheers!!!
 
Last edited by a moderator:
Help with menuselect on 64 bit os

Hi Joe,
How did you built your 64 bit PBXIAF template?
I used an openvz centos 5-x86_64 image, and started from there. I eventually installed PBXIAF on it.
Everything installed just fine. When it came to zaptel, it would obviously not install on the VE.
I have installed zaptel on HN and all did the necessary steps to give access to the VE.
On the VE in, when I run "make menuselect", the option for app_meetme is disabled (xxx) with the comment, "Depends on zaptel." That is also understandable.
Therefore everything works except meetme!!!!
How do I enable app_meetme on the VE?
 
Hi

It's copy the user.h file, then recompile asterisk, and check meetme is included, then to make life easy,

copy and paste these commands into Proxmox shell.

Code:
touch /usr/local/sbin/pabx-enable-conference.sh
echo '
clear
echo "This script enables call conferencing in the VE"
echo  "please enter the VE number"
read VENUMBER
vzctl set $VENUMBER --devnodes dahdi/pseudo:rw --save
vzctl exec $VENUMBER chown -R asterisk /dev/dahdi /lib/udev/devices/dahdi
vzctl exec $VENUMBER chgrp -R asterisk /dev/dahdi /lib/udev/devices/dahdi

echo "Job Done - Now reload asterisk in VE-"$VENUMBER
' > /usr/local/sbin/pabx-enable-conference.sh
chmod +x /usr/local/sbin/pabx-enable-conference.sh

so when you build a new VE and you want meetme working on it, just type pabx-enable-conference.sh on the proxmox command line, and type in the number of the ve - e.g.101

I've built a script to do the rest of the job, which is just being evaluated.

Joe
 
Hi

While i'm on a roll, and you have created your 64 bit version of PBX in a Flash, with Meetme support, you can easily create a template of it.

Copy and paste the following into the Proxmox command line

Code:
touch /usr/local/sbin/pabx-create-template
echo '
#!/bin/bash
#Create Template script - Joe Roper 2009
clear
echo "Creates a template"
echo  "please enter the VE number"
read VENUMBER
vzctl stop $VENUMBER
vzctl set $VENUMBER --ipdel all --save 
echo "Create a name for your template"
echo "This must be in form $OS-$ARCH-ASINGLEWORD"
echo "eg CentOS5-x86_64-piaf or CentOS5-i386-piaf"
read TEMPLATENAME
cd /var/lib/vz/private/$VENUMBER
echo > "" /etc/resolv.conf
tar czfv /var/lib/vz/template/cache/$TEMPLATENAME.tar.gz *
echo "Job Done - Now install from the GUI"
' > /usr/local/sbin/pabx-create-template
chmod +x /usr/local/sbin/pabx-create-template
Then any time you want to create a template just run the command "pabx-create-template" from the Proxmox command line. fill in the VE number, the name of the template in the correct format, and when complete, install it via the Proxmox GUI

Joe
 
finally meetme working!!! but......

Hi Joe,
finally meetme is working fine.
The conference is working fine.
But have you tried followme? or or transferring an external inbound call to an external phone number? Does it work?
Not in my case.
I will post the log in my next post.
 
Hi

I cannot imagine that these features will be affected in any way by virtue of the fact that is a virtual server.

Joe
 

Members online

No members online now.

Forum statistics

Threads
26,687
Messages
174,411
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top