Board logo

標題: QNAP TS-259 Pro + Asterisk 1.8 + Asterisk-GUI ipkg [打印本頁]

作者: 角色    時間: 2012-10-20 01:20     標題: QNAP TS-259 Pro + Asterisk 1.8 + Asterisk-GUI ipkg

本帖最後由 角色 於 2012-10-20 17:55 編輯

I am going to install Asterisk 1.8 using SVN method such that new version of Asterisk 1.8 could be very easily to install using "svn update". Asterisk-GUI will be installed using ipkg method.

QNAP TS-110 安装参考帖子 Link
Oreilly source Link

In the following context, we show how to install asterisk using SVN method but I have downloaded the asterisk tarball to install asterisk. The installation procedure is the same as the installation of QNAP TS-110 shown above.

Now the QNAP TS-259 Pro is installed with Asterisk 1.8.17.0 version. Since there is a new version of Asterisk-GUI which includes the Asterisk 1.8 interface, we do not need to download the Asterisk-GUI source code for compilation.

If you want to carry out interchange IAXs (Asterisk 1.8 and Asterisk 1.4) and Asterisk 1.4 as a PSTN-trunk to Asterisk 1.8, you may come across the following questions and their associated fixes.

1. Token issue and fixed by Link

2. Authentication issue and fixed by Link

3. Caller ID issue and fixed by Link
作者: 角色    時間: 2012-10-20 01:20

本帖最後由 角色 於 2012-10-20 15:52 編輯

Installation of Asterisk 1.8 using SVN method: Part One

1a. Using pttuy or similar software to enter the NAS admin mode

1b. Install ncurses newt packages which are required for "make menuselect" section

2. Install svn
  1. [~] # ipkg install svn
  2. Package svn (1.7.7-1) installed in root is up to date.
  3. Nothing to be done
  4. Successfully terminated.
複製代碼
It is lucky that svn has already been installed.

3. Install optware-devel package
  1. [~] # ipkg install optware-devel
  2. ...
  3. ...
  4. ...
  5. Configuring autoconf
  6. Configuring automake
  7. Configuring bison
  8. Configuring m4
  9. An error ocurred, return value: 22.
  10. Collected errors:
  11. ipkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp    -q -P /opt/ipkg-AwrJmn http://ipkg.nslu2-linux.org/feeds/optware/ts509/cross/unstable/bzip2_1.0.6-1_i686.ipk'
  12. Failed to download bzip2. Perhaps you need to run 'ipkg update'?
複製代碼
4. ipkg update

5. Re-install ipkg install optware-devel and got the following result
  1. Successfully terminated.
複製代碼
6. The next step is to downloand the trunk of Asterisk using svn method. First we create the following directories
  1. $ cd /opt
  2. $ mkdir source
  3. $ cd source
  4. $ mkdir asterisk
  5. $ cd asterisk
  6. $ svn co http://svn.asterisk.org/svn/asterisk/branches/1.8
複製代碼
7. Change directory into 1.8

8. Set the environment variables
  1. [/opt/source/asterisk/1.8] # export PATH=/opt/bin:$PATH
  2. [/opt/source/asterisk/1.8] # export LDFLAGS="-L/opt/lib"
  3. [/opt/source/asterisk/1.8] # export CFLAGS="-I/opt/include"
  4. [/opt/source/asterisk/1.8] # export LD_LIBRARY_PATH=/opt/lib
複製代碼
9. Configure --prefix=/opt
  1. [/opt/source/asterisk/1.8] # ./configure --prefix=/opt
複製代碼
10. If the above command is complete, you will have

0072.png

11. Make menuselect, we have

0073.png

12. make

13. make install

14. make samples

15. Execute the asterisk program
  1. [/opt/source/asterisk/asterisk-1.8.17.0] # /opt/sbin/asterisk -rvvvvvvvv
  2. Asterisk 1.8.17.0, Copyright (C) 1999 - 2012 Digium, Inc. and others.
  3. Created by Mark Spencer <markster@digium.com>
  4. Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
  5. This is free software, with components licensed under the GNU General Public
  6. License version 2 and other licenses; you are welcome to redistribute it under
  7. certain conditions. Type 'core show license' for details.
  8. =========================================================================
  9.   == Parsing '/opt/etc/asterisk/asterisk.conf':   == Found
  10.   == Parsing '/opt/etc/asterisk/extconfig.conf':   == Found
  11. Connected to Asterisk 1.8.17.0 currently running on NASC796B7 (pid = 18371)
  12. Verbosity is at least 38
  13. NASC796B7*CLI>
複製代碼
16. Please be noted that the above log is based on tarball rather than svn version because it is more easy to reference, maintenance, and comparison.

圖片附件: 0072.png (2012-10-20 02:35, 12.23 KB) / 下載次數 644
http://telecom-cafe.com/forum/attachment.php?aid=1617&k=eb68cc7b35c9bd9190c01cea3582c7bf&t=1732302788&sid=Sg6AYS



圖片附件: 0073.png (2012-10-20 02:42, 34.42 KB) / 下載次數 639
http://telecom-cafe.com/forum/attachment.php?aid=1618&k=0570a5fd418b782e5e3563391c112f00&t=1732302788&sid=Sg6AYS


作者: 角色    時間: 2012-10-20 01:20

本帖最後由 角色 於 2012-10-20 17:40 編輯

Installation of Asterisk-GUI

1. After the installation of Asterisk engine described in the previous is complete, you can start to install the Asterisk-GUI using the following command
  1. ipkg install asterisk-gui
複製代碼
Now the asterisk-gui in ipkg is capable to interface with Asterisk 1.8.

2. Change directory into /opt/etc/asterisk

3. Edit the manager.conf
  1. [general]
  2. enabled=yes
  3. webenabled=yes

  4. [admin]
  5. secret=admin
  6. read=system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
  7. write=system,call,agent,user,config,command,reporting,originate
複製代碼
4. Edit the http.conf
  1. [general]
  2. enabled=yes
  3. bindaddr=0.0.0.0
  4. prefix=asterisk
  5. enablestatic=yes
複製代碼
5. Using FireFox browser to

0079.png

6. Using the login name = admin and the password = admin, as shown previous in Step 4 to login in GUI

7. It takes some time to read the current configuration of the configuration files /opt/etc/asterisk. It would ask you to stop the asterisk program running by the folloiwng command and restart the asterisk again
  1. [/opt/etc/asterisk] # ps aux | grep asterisk
  2. admin     3112  0.0  0.0   4084  1048 pts/1    S+   17:21   0:00 grep asterisk
  3. admin    18371  0.7  0.9  41084 18724 ?        Ssl  10:13   3:02 /opt/sbin/asterisk
  4. [/opt/etc/asterisk] # kill 18371
  5. [/opt/etc/asterisk] # /opt/sbin/asterisk
  6. [/opt/etc/asterisk] #
複製代碼
8. The Asterisk-GUI system will be on the general login mode and waiting for you to enter the login name and password, it gives

0080.png

9. Now you are able to configure your Asterisk with the Asterisk-GUI.

圖片附件: 0079.png (2012-10-20 17:27, 64.26 KB) / 下載次數 648
http://telecom-cafe.com/forum/attachment.php?aid=1622&k=e90031082a90671dd275114e97b93d4e&t=1732302788&sid=Sg6AYS



圖片附件: 0080.png (2012-10-20 17:38, 156.77 KB) / 下載次數 639
http://telecom-cafe.com/forum/attachment.php?aid=1623&k=5f6ce4f0e83952594b219d3f1b5abf3c&t=1732302788&sid=Sg6AYS


作者: 角色    時間: 2012-10-20 01:20

Reserved................
作者: 角色    時間: 2012-10-20 01:21

Reserved................
作者: 角色    時間: 2012-10-20 01:22

Reserved................
作者: 角色    時間: 2012-10-20 01:23

Reserved................
作者: 角色    時間: 2012-10-20 01:24

Reserved................
作者: 角色    時間: 2012-10-20 01:24

Reserved................
作者: 角色    時間: 2012-10-20 01:24

Reserved................
作者: 角色    時間: 2012-10-20 01:25

Reserved................
作者: 角色    時間: 2012-10-20 01:25

Reserved................
作者: 角色    時間: 2012-10-20 01:26

Reserved................
作者: 角色    時間: 2012-10-20 14:36

终于可以拨出和打入电话了!!!!!!!!!!!!!!!!
作者: 角色    時間: 2012-10-20 16:59

Incoming CallerID 显示New User,没有电话号码

问题出自Asterisk-GUI 的default settings
users.conf
[general]
fullname = New User
userbase = 6000

改为
[general]
;fullname = New User
;userbase = 6000

save,apply changes后,接入的电话就有正确的Username和CallerID via the trunk
作者: 角色    時間: 2012-10-20 17:02

Inter IAX: incoming trunk call from Asterisk 1.4 to Asterisk 1.8 Token problem

This could be resolved by adding "requirecalltoken=no" and "calltokenoptional = 0.0.0.0/0.0.0.0" under the context "generl" of iax.conf, as shown below:

iax.conf
[general]
requirecalltoken = no
calltokenoptional = 0.0.0.0/0.0.0.0
作者: 角色    時間: 2012-10-20 17:10

本帖最後由 角色 於 2012-10-20 17:17 編輯

Inter IAX: incoming trunk call from Asterisk 1.4 to Asterisk 1.8 Authentication problem

因为在起trunk的时候,context naming用了Asterisk-GUI,导致在users.conf里的context name是什么trunk等字句。当然Asterisk 1.4的incoming trunk进来的时候(如果在Asterisk开了5003做trunk),incoming的username=5003,但是在users.conf里属于5003的registration的context是那个trunk name,与是Asterisk找不到后,就说authentication problem。

0076.png

在设trunk的时候,context name要选用username,如下图:

0077.png

其他的设定就如一样那样set。

设好后,就save,apply changes,在用File Editor看看users.conf里是有5003的context,如果有,就代表设置完成。

0078.png

圖片附件: 0076.png (2012-10-20 17:11, 19.44 KB) / 下載次數 682
http://telecom-cafe.com/forum/attachment.php?aid=1619&k=13376589f28dbcee3028c29f24edfe66&t=1732302788&sid=Sg6AYS



圖片附件: 0077.png (2012-10-20 17:13, 21.57 KB) / 下載次數 669
http://telecom-cafe.com/forum/attachment.php?aid=1620&k=5f310451752dc494c7f19e74fdd86675&t=1732302788&sid=Sg6AYS



圖片附件: 0078.png (2012-10-20 17:17, 10.88 KB) / 下載次數 657
http://telecom-cafe.com/forum/attachment.php?aid=1621&k=01749fa7d52acc7a1abca932283441dc&t=1732302788&sid=Sg6AYS


作者: bubblestar    時間: 2012-10-20 22:33

回復 15# 角色


   
是否每一條 iax extension 的個別 caller ID 都能顯示? 抑或只顯示雙方SERVER 都只能顯示用作連接 iax 而建立的extension caller ID ?
作者: 角色    時間: 2012-10-20 22:42

可能我说的不清楚。就是Asterisk 1.4 + FXO,FXO接电讯的PSTN里,用手接打入这个PSTN线,我的手机号码转到Asterisk 1.4,然后通过Asterisk 1.4 一条 IAX Extension,连接到Asterisk 1.8的系统,再接Asterisk 1.8的extension,而这extensions被一个SIP Client注册。我的手机号码可以显示在SIP Client的display。
作者: 雯雯    時間: 2012-10-21 08:24

角色師兄, 我剛剛發現你幫我tar的Asterisk GUI比ipkg Asterisk GUI多了Google Talk一項:

Qnap Asterisk-GUI2.jpg

圖片附件: Qnap Asterisk-GUI2.jpg (2012-10-21 08:24, 174.51 KB) / 下載次數 686
http://telecom-cafe.com/forum/attachment.php?aid=1624&k=94dce8331a6a1dc93f6099dd4bdccc2f&t=1732302788&sid=Sg6AYS


作者: 角色    時間: 2012-10-21 08:42

回復 20# 雯雯

我都没有详细给你看,因为给你弄好系统的时候已经深夜3点几,眼花花!

我重看我之前发的帖子(第5楼最后的图片)有Google Talk字样!不过应该用不到!要之前安装其他package,然后在make menuselect再选,选好后加入Google Voice账号就可以。不过Asterisk 1.8的Google Support不是太好!打出是没有问题,但是Asterisk 1.8的接入是有问题。估计这个问题在Asterisk 11才能解决好!因为Asterisk 11用比较标准的XMPP。
作者: 雯雯    時間: 2012-10-21 08:47

回復 21# 角色

你真係厲害! 幫我弄到深夜3點幾早上8點幾就打電話給我了! 謝謝你!
作者: 角色    時間: 2012-10-21 09:13

回想最初学习的Asterisk的时候,我都徘回学习Asterisk Engine or Asterisk-GUI (Asterisk Engine + GUI)的十字路口里,最后我选择先学习Asterisk Engine。在那个时候要学习Asterisk-GUI只能用QNAP的Asterisk QPKG package,但是可能自己的基本功不太好,太不会用,而且很多功能都用不上。

现在的角色已经跟最初学习Asterisk不一样了,有了Asterisk基本功,可以自己compile source code,现在的Asterisk 1.8 and Asterisk-GUi也相当成熟。

同时你也发现我最近写东西有所改变,就是一般的用家怎样可以使用Asterisk-GUI,而架设自己的电话系统。所以我也帮助scottlio (QNAP TS-110)架设Asterisk-GUI,那么他现在自己都可以有自己的电话系统了。

眼看了同时学习VPN和VoIP的雯雯,VPN已经对你已经没有难度了,但是VoIP也只是停留于ATA或者买来的IP PBX (如IP-01,IP-04)里,根本进入不了我们讨论的话题,由于Synology出Asterisk 1.8的package,更加激起我对QNAP安装Asterisk-GUI的情趣,所以我都尽量帮助其他member,把安装过程全记录下来,让大家分享!如果有问题都可以自己解决。

也希望你在使用上遇到有什么问题和解决方法后,再上载上来,那么其他member的学习速度就更上一层楼。

雯雯小师妹!加油!!!
作者: 雯雯    時間: 2012-10-21 09:24

回復 23# 角色

其實我現在才開始進入Asterisk也好, 因為我之前沒有linux底子, 最近才開始有點linux底子, 這對學習Asterisk有幫助!
作者: 角色    時間: 2012-10-21 09:40

我忘了提示你一句,在NAS里用Linux commands真的非常小心,特别是rm (remove)这个commands,一打错就没有回头!!!!removed了的文件就很难找回来。

如果在linux shell里,遇到有什么问题,先看看书,不明白就在论坛提出,CK,bubblestar和我都乐意帮助你的。
作者: bubblestar    時間: 2012-10-24 22:28

ipkg install newt ncurses ncurses-dev packages have been done successfully, however, error still come out when execute make menuselect.
作者: 角色    時間: 2012-10-24 22:41

What was the error message?
作者: bubblestar    時間: 2012-10-25 18:21

回復 20# 雯雯


   
Google Talk 並不是使用了 tar 便可以有,要安裝另外兩個package,然後再compile Asterisk 一次就可以在GUI 版面見到的。

# ipkg install iksemel
# ipkg install openssl openssl-dev
作者: bubblestar    時間: 2012-10-25 18:23

回復 27# 角色


   
再沒有error 了,多謝幫忙。

我已經把所有東西重新裝一次,一切正常。
作者: bubblestar    時間: 2012-10-25 18:24

回復 27# 角色


   
角色兄,你的 TS-269 PRO 是使用了哪一個版本的 codec_g723 和 codec_g729 呢?
作者: 角色    時間: 2012-10-25 20:29

回復 28# bubblestar

谢谢你的信息,可能雯雯之前安装过也不知道。
作者: 雯雯    時間: 2012-10-25 20:45

回復 31# 角色

我明晚有事回港, 下星期抽點時間試試!
作者: 角色    時間: 2012-10-25 20:54

回復 32# 雯雯

你有什么大搞作!!!!!!!
作者: 雯雯    時間: 2012-10-25 20:57

回復 33# 角色

私事, 順便大整香港家裏的VoIP.




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