« 2011第一帖 | (回到Blog入口) | CPAN主页面更换了 »

如何在VPS上安装asterisk(转)

以下内容为转载,出处忘记了,作者说是可以的,本人没测试是否可行,有需要的童鞋可以尝试一下。虽然使用的是老的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. 

引用通告

TrackBack URL for this entry:
如果您想引用这篇文章到您的Blog,
请复制下面的链接,并放置到您发表文章的相应界面中。
http://playcat.net/mt-tb.cgi/96

发表一个评论

(如果你此前从未在此 Blog 上发表过评论,则你的评论必须在 Blog 主人验证后才能显示,请你耐心等候。)

关于

此页面包含了发表于2011年1月27日 10:31的 Blog 上的单篇日记。

此 Blog 的前一篇日记是 2011第一帖

此 Blog 的后一篇日记是 CPAN主页面更换了

更多信息可在 主索引 页和 归档 页看到。

Creative Commons License
此 Blog 中的日记遵循以下授权 Creative Commons(创作共用)授权.
Powered by
Movable Type 6.3.2