返回列表 發帖

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 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.

TOP

本帖最後由 角色 於 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.

TOP

Reserved................

TOP

Reserved................

TOP

Reserved................

TOP

Reserved................

TOP

Reserved................

TOP

Reserved................

TOP

Reserved................

TOP

Reserved................

TOP

Reserved................

TOP

Reserved................

TOP

终于可以拨出和打入电话了!!!!!!!!!!!!!!!!

TOP

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

TOP

返回列表