以下内容为转载,出处忘记了,作者说是可以的,本人没测试是否可行,有需要的童鞋可以尝试一下。虽然使用的是老的zaptel,不过dahdi应该也可行的
In my knowledge there are two
main groups of VPS virtualization:
- Software. Your VPS shares kernel with host OS. The problem could potentially occurs with this type of virtualization when you need to load custom kernel module (such as Zaptel) on the VPS
- Hardware. Host OS emulates hardware devices for VPS. This is lake having physical server, you can install any OS, rebuild kernel, etc.
There shouldn't be any problem run any kernel module on hardware-virtualized VSP, so let's focusing how to deal with software-based one.
Zaptel module is one of the optional Asterisk packages. It supposed to be used with Digium hardware, but because i don't have any, I thought i don't need Zaptel at all. But quickly I realize several Asterisk features (at least conference calling and music on hold) doesn't work. After quick google search I find out what these features relied on Zaptel software module (you don't have to have any Digium hardware!). Seems like it uses this module for some kind of timing intervals (not sure why you need to have timer in the kernel, but this functionality is by design). First, lets verify does Zaptel module loaded on host OS (sounds unlikely unless you specifically requested it or you using special "VoIP - Friendly" VPS). It's easy to check, just verify you have /dev/zap folder. In my case this folder exists, because Zaptel module installed on host server.
I compiled Asterisk 1.4 with
Zaptel support on CentOS VPS.
Download corresponding version of Zaptel:
wget http://downloads.digium.com/pub/zaptel/zaptel-1.4.12.1.tar.gz
Unpack files to /usr/src
folder using your favorite method (I personally prefer mc). Now we have to
compile and install libtonezone.so (only!) from Zaptel package, don't compile
whole package. In Zaptel source folder:
make
libtonezone.so
install -D -m 755 libtonezone.so
/usr/lib/libtonezone.so
Also asterisk needs
several header files in certain locations to detect zaptel installation. In
Zaptel source folder:
install -D -m 644
kernel/zaptel.h /usr/include/zaptel/zaptel.h
install -D -m 644 tonezone.h
/usr/include/zaptel/tonezone.h
Finally let's rebuild
shared library:
ldconfig
Recompile asterisk and be sure it detects Zaptel. In Asterisk source folder:
./configure
make
menuselect
Check app_meetme in applications menu. Now we have to compile and install Asterisk. In Asterisk source folder:
make
make
install
Now you can try meetme application, it should work.
There is some confusion
with latest Asterisk 1.6; for some reasons Zaptel was renamed and distributed
with Asterisk v1.6 under DAHDI name. Asterisk v1.4 still supports both packages:
Zaptel and DAHDI. Сonfiguring DAHDI should be similar to above, but I have no
experience with it.