Board logo

標題: 【角色茶桌】—— 我的Asterisk 1.8安装历程 —— make menuselect 选项是否有更改呢? [打印本頁]

作者: 角色    時間: 2011-9-13 16:29     標題: 【角色茶桌】—— 我的Asterisk 1.8安装历程 —— make menuselect 选项是否有更改呢?

本帖最後由 角色 於 2011-9-18 01:23 編輯

1)下载CentOS 5.6 ISO,然后安装,选Server Mode
- Firewall要disabled, SELINUX=disabled

2)下载asterisk tar ball,我用的asterisk-1.8.6.0.tar.gz
- save asterisk-1.8.6.0.tar.gz in /usr/src/asterisk
- 用tar xvf askterisk-1.8.6.0.tar.gz

3) Install the following packages
yum install gcc \
gcc-c++ \
libxml2-devel \
libtermcap-devel \
ncurses-devel \
newt-devel \

4) ./configure
(needs gcc, gcc-c++, limxml2-devel, libtermcap-devel)

5) make menuselect
(needs ncurses-devel and newt-devel. We need to re-run ./configure again in order to make "make menuselect" work)

6) make
+--------- Asterisk Build Complete ---------+
+ Asterisk has successfully been built, and +
+ can be installed by running:              +
+                                           +
+                make install               +
+-------------------------------------------+

7) make install
+---- Asterisk Installation Complete -------+
+                                           +
+    YOU MUST READ THE SECURITY DOCUMENT    +
+                                           +
+ Asterisk has successfully been installed. +
+ If you would like to install the sample   +
+ configuration files (overwriting any      +
+ existing config files), run:              +
+                                           +
+                make samples               +
+                                           +
+-----------------  or ---------------------+
+                                           +
+ You can go ahead and install the asterisk +
+ program documentation now or later run:   +
+                                           +
+               make progdocs               +
+                                           +
+ **Note** This requires that you have      +
+ doxygen installed on your local system    +
+-------------------------------------------+

8) make samples

9) yum install doxygen and then followed by make progdocs

10) make install

11)make config

12) make install-logrotate

13) chkconfig asterisk on

14) service asterisk start

15) asterisk -rv
Asterisk 1.8.6.0, Copyright (C) 1999 - 2011 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.6.0 currently running on shirley (pid = 14639)
Verbosity is at least 3
s


下面的网站可以提供参考:

https://wiki.asterisk.org/wiki/display/AST/Home



现在有D515和D525的电脑(其实感谢bubblestar兄让出他的D525MB),所以基本上设备都齐全,现在可以慢慢安装Asterisk 1.8了。

我特意另开这幅帖子,主要记录我安装Asterisk的历程,可以让大家参考。

角色
作者: 角色    時間: 2011-9-13 17:09

在最初只会Linksys SPA3000的ATA,对于Asterisk这样的东西实在太遥远,根本很难实验,但是如果有兴趣,可以参考本帖子,不明白的时候也可以跟帖讨论。

角色
作者: Skypeus    時間: 2011-9-13 17:33

Asterisk 对于普通用家来说主要用来作什么?家庭用户有必要用这个吗?
作者: bubblestar    時間: 2011-9-13 17:38

不用客氣,反正ckleea 兄及我也正以D525為本,運行Asterisk,而角色兄要裝Asterisk 1.8 又不能在市場上買到心儀底板,剛好有一塊簇新的MB,既可成人之美,也可以令角色兄加入Asterisk 1.8 家庭,一起討論、分享共同愛好的VoIP興趣,何樂而不為呢!
作者: ckleea    時間: 2011-9-13 18:09

就是那張gigabyte D525?

Asterisk 1.8 現在已經出到1.8.7 rc1
作者: bubblestar    時間: 2011-9-13 18:17

就是那張Gigabyte D525了。

Asterisk 1.8.6 剛update 一星期左右,Asterisk 1.8.7 rc1 又出來了,還是先等三兩天,看看有沒有小蟲蟲的報告,否則又要找 "殺它死" 對付了。
作者: 角色    時間: 2011-9-13 18:18

Asterisk 对于普通用家来说主要用来作什么?家庭用户有必要用这个吗?
Skypeus 發表於 2011-9-13 17:33


1) 如果你是米皇,那么直接拨打IDD就可以。

2) 如果你想对这方面进一步理解,那么你可以先购置ATCOM的IP-0X(如ATCOM IP-01),其本上是一个GUI-based的Asterisk Server,买回来用就可以,如果你想有其他功能,可以安装Switchfin。

3) 如果你想把所有资源都集中起来,那么用PC-based Asterisk Server就可以,基本上电讯商能做,你都能用,电讯商不提供的服务,你也用!PC-based的Asterisk Server是可以说“超超强大!!!”

选什么要看自己的能力,其实很多一般人可以去到上面的第二部,购买ATCOM IP-01 + FXO口。如果你热爱VoIP,那么非常自己起Asterisk Server不可,但是这需要的知识非常多,如果你对Unix不太熟悉,在自己compile Asterisk source code会比较困难。但是你在这方面没有困难的,那么自己起一台Asterisk server是非常重要。当然你可以用很多方法起Asterisk Server,但是最好是用PC,特别是Intel ATOM-based的PC。而我打算用是Intel ATOM D515 PC,而bubblestar兄让给我的D525 MB,主要做学习机和文书机用。

角色
作者: 角色    時間: 2011-9-13 18:20

就是那張gigabyte D525?

Asterisk 1.8 現在已經出到1.8.7 rc1
ckleea 發表於 2011-9-13 18:09


是的,现在成为我的学习机,谢谢bubblestar的承让,不然可能又要在淘宝买回来。

角色
作者: 角色    時間: 2011-9-13 18:34

make menuselect 里面是否更改的default settings?

角色
作者: bubblestar    時間: 2011-9-13 18:47

基本上用default settings 可以了,sound packages也視自己需要而增加吧。另外,這三幅圖是我的選擇。

ms1.png
2011-9-13 18:46



ms2.png
2011-9-13 18:46



ms3.png
2011-9-13 18:46


圖片附件: ms1.png (2011-9-13 18:46, 22.46 KB) / 下載次數 673
http://www.telecom-cafe.com/forum/attachment.php?aid=879&k=69a51bf21adb1c6f0b889ebbe1f2fab7&t=1711726397&sid=ZGI1ZO



圖片附件: ms2.png (2011-9-13 18:46, 32.16 KB) / 下載次數 629
http://www.telecom-cafe.com/forum/attachment.php?aid=880&k=b7dce814eb33f5e19439e90fc101c84d&t=1711726397&sid=ZGI1ZO



圖片附件: ms3.png (2011-9-13 18:46, 26.22 KB) / 下載次數 667
http://www.telecom-cafe.com/forum/attachment.php?aid=881&k=5a0deedd8398dad1ad5a57ad56f0303b&t=1711726397&sid=ZGI1ZO


作者: 角色    時間: 2011-9-13 19:04

整副图,都不知道你你选了什么,不选了什么呢,是否用文字说明一下呢?

角色
作者: bubblestar    時間: 2011-9-13 20:10

Click 1 click 幅圖,自動會放大, 不是可以看清楚嗎?
作者: bubblestar    時間: 2011-9-13 20:16

本帖最後由 bubblestar 於 2011-9-13 20:18 編輯

如果你第一次安裝,就什麼也不需要,全用default settings 好了。我圖裡99%都是default的設定,根本它已是自動剔選了的,所以用文字真的不知從何說起。附上圖片,只是方便大家預先有一個初步印象罷了。
作者: 角色    時間: 2011-9-13 20:17

本帖最後由 角色 於 2011-9-13 20:39 編輯

如果大家都没有default的,那么就不知道应该选哪一个,不要紧,等我有时间可以用文字作补充。

我的core show translation结果是

2011-9-13 20-07-37.png
2011-9-13 20:17


你的是什么呢?

角色

圖片附件: 2011-9-13 20-07-37.png (2011-9-13 20:17, 15.76 KB) / 下載次數 671
http://www.telecom-cafe.com/forum/attachment.php?aid=882&k=153f58ead93c4b0bc58c0484d7ce9288&t=1711726397&sid=ZGI1ZO


作者: bubblestar    時間: 2011-9-13 20:28

我所指的default settings,就是打開make menuselect版面後,它的系統已自動給你選好了的設定。如果是自己額外加選的,我本人會用custom settings 來形容,不知角色所說的default settings 跟我所說的是否有分別,又或這是我誤會了你的意思。


我的 core show translation 結果如下圖:


ms4.png
2011-9-13 20:28


圖片附件: ms4.png (2011-9-13 20:28, 18.43 KB) / 下載次數 641
http://www.telecom-cafe.com/forum/attachment.php?aid=883&k=9b819548f7797697d0106198ea2ff3f6&t=1711726397&sid=ZGI1ZO


作者: 角色    時間: 2011-9-13 20:43

我执行了make menuselect,只是看看,什么都没有动,所以所有的settings都是defaults,但是你说你选了一些options(之前不是default有的)。

说道codecs,之前的729,iLBC,Speex在Asterisk 1.4都安装过,现在都不是太记得,不知道是否有hints呢?(如果要再安装的时候,可能要再去找找

角色
作者: 角色    時間: 2011-9-13 20:58

回復 15# bubblestar

你这幅图是否用Intel ATOM D525系统出来呢?因为我发现你的ulaw与alaw互换要200us,而我的是1us。不知道是我的有错,还是你的CPU不一样呢?

角色
作者: bubblestar    時間: 2011-9-13 21:08

回復 17# 角色


   
我的是Intel ATOM-based D525MW 1.8Ghz,我猜想,Gigabyte是優化了它的產品,它叫D525TUD。
作者: ckleea    時間: 2011-9-13 21:25

回復 18# bubblestar

Mine is like this - 1 microsecond

screenshot.13-09-2011 21.18.21.png
2011-9-13 21:25


圖片附件: screenshot.13-09-2011 21.18.21.png (2011-9-13 21:25, 6.77 KB) / 下載次數 470
http://www.telecom-cafe.com/forum/attachment.php?aid=884&k=bb84a37bef9d87ef309ff301a84899b2&t=1711726397&sid=ZGI1ZO


作者: bubblestar    時間: 2011-9-13 21:26

本帖最後由 bubblestar 於 2011-9-13 21:31 編輯

SPEEX 在compile Asterisk 之前安裝如下,Asterisk 裝好後就會有的:

# Codec Translators > codec_speex
cd /usr/src/asterisk-complete
wget http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz
tar xvzf speex-1.2rc1.tar.gz
cd speex-1.2rc1
./configure && make && make install

iLBC 是在make menuselect 之前加上去如下:

cd asterisk-1.8
./configure
#this is only for format MP3 - SVN required
contrib/scripts/get_mp3_source.sh
contrib/scripts/get_ilbc_source.sh
make menuselect
make && make install
make samples
make progdocs
make config
make install-logrotate

chkconfig asterisk on
service dahdi start
service asterisk start

codec_g723-ast18-gcc4-glibc-atom.so 及 codec_g729-ast18-gcc4-glibc-atom.so 可以到 http://asterisk.hosting.lv/ 下載,然後,直接把它複制到以下位置即可。

/usr/lib/asterisk/modules


接著,Restart asterisk

/etc/init.d/asterisk restart
作者: bubblestar    時間: 2011-9-13 21:41

Reboot server 之後,快了一microsecond,仍然比兩位的慢 1 microsecond。不過,大家應該不容易於通話中察覺出來,可能是你們的網速也比我優質,所以我的沒有你兩位的好。

ms5.png
2011-9-13 21:41


圖片附件: ms5.png (2011-9-13 21:41, 14.66 KB) / 下載次數 456
http://www.telecom-cafe.com/forum/attachment.php?aid=885&k=ee9ee4bbb405edf05952027bc0b3a9b7&t=1711726397&sid=ZGI1ZO


作者: bubblestar    時間: 2011-9-16 20:45

角色兄:

Asterisk 1.8.6 的安裝進度如何? 完成了可以試行了嗎?
作者: 角色    時間: 2011-9-16 21:08

哈哈已经安装,但是安装了D525电脑。如果长期运作,就换放在D515电脑,还有买一条2G的RAM,加起来有3G,那么应该足够一般用途。

角色
作者: bubblestar    時間: 2011-9-16 21:24

其實,因為你是使用APL運作,只要把sip.conf、extensions.conf 等幾個files 直接copy 過去,便可以馬上使用D525 作日常的Server,並即時有 4 GB RAM 可用,沒有難度,幾分鐘攪掂。

D515 只得一條 1 GB RAM,留作練習吧。
作者: 角色    時間: 2011-9-16 21:26

因为我的Analogue Card再D515已经动了小手术,不想再在D525再动,所以都是购入一条2G的RAM,因为Asterisk和其他的apps都是很慢的devices,所以D515 + 3GRAM,估计应该没有问题。


角色
作者: bubblestar    時間: 2011-9-16 21:35

明白了。
作者: 角色    時間: 2011-9-16 22:07

那么不知道ckleea和bubblestar安装CentOS时,用什么mode呢?用 Server mode吗?还是有GUI mode?

角色
作者: bubblestar    時間: 2011-9-16 22:10

我用Server mode,也有安裝X-windows
作者: ckleea    時間: 2011-9-16 22:11

I use server mode and then add afterwards. Yum groupinstall
作者: 角色    時間: 2011-9-16 22:24

回復 28# bubblestar

怎样安装呢?Server mode没有X-Windows吗?

角色
作者: 角色    時間: 2011-9-16 22:24

回復 29# ckleea

“Yum groupinstall”是什么呢?

角色
作者: bubblestar    時間: 2011-9-16 22:37

本帖最後由 bubblestar 於 2011-9-16 22:41 編輯

以我所知,server mode 一般安了最基本的packages,yum groupinstall command 可以另外裝一些額外功能的單一軟件或功能,例如 yum groupinstall chinese、yum groupinstall development tools、yum groupinstall gcc 、yum groupinstall gnome 等等。

鍵入 yum grouplist 可以看到很多,自己選就可以。
作者: 角色    時間: 2011-9-16 22:39

那么具体是要安装哪一些呢?

角色
作者: bubblestar    時間: 2011-9-16 22:41

鍵入 yum grouplist 可以看到很多,自己選就可以。
作者: bubblestar    時間: 2011-9-16 22:43

上面提到的,我都有裝。
作者: 角色    時間: 2011-9-16 22:45

谢谢,明白。

角色
作者: bubblestar    時間: 2011-9-16 22:49

我installed 了的packages 及未裝的 packages。

yum grouplist



grouplist.png
2011-9-16 22:48


圖片附件: grouplist.png (2011-9-16 22:48, 17.01 KB) / 下載次數 421
http://www.telecom-cafe.com/forum/attachment.php?aid=887&k=259552fd4840fa6bf1dbedbf1840491a&t=1711726397&sid=ZGI1ZO


作者: ckleea    時間: 2011-9-16 22:56

回復 37# bubblestar


    Why you install in Chinese? Normally I install English and then add Chinese support. This may be the problem that your putty has wrong code. Normal putty uses ascii characters set.
作者: bubblestar    時間: 2011-9-16 23:04

I did install English and added Chinese support like what you did.  What makes the difference may be that I choose UTF-8 in Windows translation of Putty and just change LANG="zh_TW.UTF-8" in /etc/sysconfig/i18n for testing Chinese Displaying effect.

In daily operation, I use all command in English.  No Chinese involved.  So far, no problem.
作者: bubblestar    時間: 2011-9-16 23:08

For information, Putty has built-in support remote character set in multi-language.
作者: ckleea    時間: 2011-9-17 09:58

Can you display Chinese properly?
作者: bubblestar    時間: 2011-9-17 16:40

I cannot but Putty does

Putty displays all Chinese properly in its own command line environment but not in Asterisk CLI.
作者: 角色    時間: 2011-9-17 23:15

安装iLBC又出事呢?在make的时候,发现没有下面的library,不知道在哪里可以找到。

ilbc/iLBC_encode.h: No such file or directory


角色
作者: bubblestar    時間: 2011-9-17 23:44

有沒有一開始就做晒以下YUM 呢?

yum -y install gcc gcc-c++ libxml2-devel ncurses-devel openssl-devel mysql-devel sqlite-devel unixODBC-devel libtool-ltdl-devel freetds-devel libvorbis-devel alsa-lib-devel bluez-libs-devel curl-devel libtiff-devel  libssl-dev speex speex-devel libusb-devel CIG-devel openldap-devel gmime-devel net-snmp-devel flex bison lua-devel subversion make gnutls-devel gnutls-utils kernel-devel newt-devel mlocate lynx tar wget nmap bzip2 mod_ssl crontabs vixie-cron libxml2 texinfo neon neon-devel


make menuselect 之前要行這一句。

contrib/scripts/get_ilbc_source.sh

這樣就可以裝好的了。
作者: 角色    時間: 2011-9-18 00:08

回復 37# bubblestar

我的全英文,而你是中文?

角色
作者: 角色    時間: 2011-9-18 00:08

回復 44# bubblestar

都是出下面的errors。
  1. codec_ilbc.c:41:30: error: ilbc/iLBC_encode.h: No such file or directory
  2. codec_ilbc.c:42:30: error: ilbc/iLBC_decode.h: No such file or directory
  3. codec_ilbc.c:57: error: expected specifier-qualifier-list before ‘iLBC_Enc_Inst_t’
  4. codec_ilbc.c: In function ‘lintoilbc_new’:
  5. codec_ilbc.c:67: warning: implicit declaration of function ‘initEncode’
  6. codec_ilbc.c:67: error: ‘struct ilbc_coder_pvt’ has no member named ‘enc’
  7. codec_ilbc.c: In function ‘ilbctolin_new’:
  8. codec_ilbc.c:76: warning: implicit declaration of function ‘initDecode’
  9. codec_ilbc.c:76: error: ‘struct ilbc_coder_pvt’ has no member named ‘dec’
  10. codec_ilbc.c: In function ‘ilbctolin_framein’:
  11. codec_ilbc.c:114: warning: implicit declaration of function ‘iLBC_decode’
  12. codec_ilbc.c:114: error: ‘struct ilbc_coder_pvt’ has no member named ‘dec’
  13. codec_ilbc.c: In function ‘lintoilbc_framein’:
  14. codec_ilbc.c:132: error: ‘struct ilbc_coder_pvt’ has no member named ‘buf’
  15. codec_ilbc.c: In function ‘lintoilbc_frameout’:
  16. codec_ilbc.c:153: error: ‘struct ilbc_coder_pvt’ has no member named ‘buf’
  17. codec_ilbc.c:154: warning: implicit declaration of function ‘iLBC_encode’
  18. codec_ilbc.c:154: error: ‘struct ilbc_coder_pvt’ has no member named ‘enc’
  19. codec_ilbc.c:163: error: ‘struct ilbc_coder_pvt’ has no member named ‘buf’
  20. codec_ilbc.c:163: error: ‘struct ilbc_coder_pvt’ has no member named ‘buf’
  21. make[1]: *** [codec_ilbc.o] Error 1
  22. make: *** [codecs] Error 2
  23. [root@leo asterisk-1.8.6.0]#
複製代碼

作者: bubblestar    時間: 2011-9-18 00:38

中英文顯示沒有關係,不需介意。

在make menuselect 版面入面有兩個項目,一個是Format Interpreters,另一個是Codec Translators,請在這兩項入面,看看 iLBC 是否已剔選,沒有的話,請剔選 ilbc
作者: bubblestar    時間: 2011-9-18 00:43

回復 46# 角色


照下面圖示剔選

iLBC.png
2011-9-18 00:42



iLBC2.png
2011-9-18 00:42


圖片附件: iLBC.png (2011-9-18 00:42, 21.54 KB) / 下載次數 479
http://www.telecom-cafe.com/forum/attachment.php?aid=894&k=fa06a4ed68b3b7b78b8647b29469cf34&t=1711726397&sid=ZGI1ZO



圖片附件: iLBC2.png (2011-9-18 00:42, 22.5 KB) / 下載次數 461
http://www.telecom-cafe.com/forum/attachment.php?aid=895&k=55a08173e9aa5e759dd6cf4547b1715c&t=1711726397&sid=ZGI1ZO


作者: 角色    時間: 2011-9-18 00:54

有按照选择,但是就没有files,我在网站找过,其他人都出现这样的问题,好像iLBC的files有所作出更改。不能再自动下载。

角色




歡迎光臨 電訊茶室 (http://www.telecom-cafe.com/forum/) Powered by Discuz! 7.2