Board logo

標題: 【Raspberry Pi】——Asterisk + Asterisk-GUI using tarball method [打印本頁]

作者: 角色    時間: 2013-9-16 22:36     標題: 【Raspberry Pi】——Asterisk + Asterisk-GUI using tarball method

本帖最後由 角色 於 2013-9-17 01:11 編輯

之前用过SVN method安装,现在今次用tarball方法。

raspbian image可以在这里下载:
http://www.raspberrypi.org/downloads
作者: 角色    時間: 2013-9-16 22:57

本帖最後由 角色 於 2013-9-16 23:01 編輯

正式官方Raspberry Pi + Asterisk 网站
http://www.raspberry-asterisk.org/

但是不是自己compile,然是用pre-compiled image。还有GUI是FreePBX而是我们熟悉的Asterisk-GUI。
作者: 角色    時間: 2013-9-16 23:17

The tarballs of each version is obtainable in the following website:

http://downloads.asterisk.org/pub/telephony/

1056.gif

圖片附件: 1056.gif (2013-9-16 23:17, 17.99 KB) / 下載次數 810
http://telecom-cafe.com/forum/attachment.php?aid=2778&k=4c61900bbe65ed9ddb344d08105dceb1&t=1744871323&sid=UOEwW6


作者: 角色    時間: 2013-9-17 01:13

安装于一张8G的SD Card Class 4

第一步骤就是boot up the image and set the program to make sure all the SD Card space
作者: 角色    時間: 2013-9-17 01:13

本帖最後由 角色 於 2013-10-5 21:41 編輯
  1. apt-get update
  2. apt-get upgrade

  3. apt-get install libncurses5-dev libsqlite3-dev libxml2-dev

  4. ## download and install asterisk 11
  5. mkdir /usr/src/asterisk
  6. cd /usr/src/asterisk

  7. wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11.5.1.tar.gz

  8. tar xvf ./asterisk-11.5.1.tar.gz

  9. cd asterisk-11.5.1

  10. ./configure

  11. configure: Menuselect build configuration successfully completed

  12.                .$$=..
  13.             .$7$7..          .7$7:.
  14.           .$:.                 ,$7.7
  15.         .$7.     7$           .$77
  16.      ..$.       $            .$7
  17.     ..7$   .?.   $   .?.       7$.
  18.    $.$.   .$7. $7 .7$.      .$.
  19. .777.   .$77$77$7.      $,
  20. $~      .7$$7.       .$.
  21. .$7          .7$7:          ?$.
  22. $          ?7$$I        .$7
  23. $       .7$$      :$.
  24. $       $7$$    .$.
  25. $        $   7$7  .$    .$.
  26. $             $7         .$.
  27. 7$7            7$        7$
  28. $                        $
  29.   $7.                       $  (TM)
  30.    $.           .7$  $
  31.      $$7$$.$
  32.        $$.

  33. configure: Package configured for:
  34. configure: OS type  : linux-gnueabihf
  35. configure: Host CPU : armv6l
  36. configure: build-cpu:vendor:os: armv6l : unknown : linux-gnueabihf :
  37. configure: host-cpu:vendor:os: armv6l : unknown : linux-gnueabihf :
  38. root@raspberrypi:/usr/src/asterisk/asterisk-11.5.1#


  39. make menuselect

  40. make

  41. +--------- Asterisk Build Complete ---------+
  42. + Asterisk has successfully been built, and +
  43. + can be installed by running:              +
  44. +                                           +
  45. +                make install               +
  46. +-------------------------------------------+
  47. root@raspberrypi:/usr/src/asterisk/asterisk-11.5.1#

  48. make install


  49. +---- Asterisk Installation Complete -------+
  50. +                                           +
  51. +    YOU MUST READ THE SECURITY DOCUMENT    +
  52. +                                           +
  53. + Asterisk has successfully been installed. +
  54. + If you would like to install the sample   +
  55. + configuration files (overwriting any      +
  56. + existing config files), run:              +
  57. +                                           +
  58. +                make samples               +
  59. +                                           +
  60. +-----------------  or ---------------------+
  61. +                                           +
  62. + You can go ahead and install the asterisk +
  63. + program documentation now or later run:   +
  64. +                                           +
  65. +               make progdocs               +
  66. +                                           +
  67. + **Note** This requires that you have      +
  68. + doxygen installed on your local system    +
  69. +-------------------------------------------+
  70. root@raspberrypi:/usr/src/asterisk/asterisk-11.5.1#

  71. make samples

  72. root@raspberrypi:/usr/src/asterisk/asterisk-11.5.1# /usr/sbin/asterisk
  73. root@raspberrypi:/usr/src/asterisk/asterisk-11.5.1# /usr/sbin/asterisk -rvvvvvvv
  74. Asterisk 11.5.1, Copyright (C) 1999 - 2012 Digium, Inc. and others.
  75. Created by Mark Spencer <[email]markster@digium.com[/email]>
  76. Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
  77. This is free software, with components licensed under the GNU General Public
  78. License version 2 and other licenses; you are welcome to redistribute it under
  79. certain conditions. Type 'core show license' for details.
  80. =========================================================================
  81. Connected to Asterisk 11.5.1 currently running on raspberrypi (pid = 32187)
  82. raspberrypi*CLI>
複製代碼

作者: 角色    時間: 2013-9-17 20:24

本帖最後由 角色 於 2013-10-6 00:53 編輯

Installation of Asterisk-GUI

1. Change directory to /usr/src/asterisk
  1. cd /usr/src/asterisk
複製代碼
.
.
2. Get the source of Asterisk-GUI from the source code
  1. wget http://downloads.asterisk.org/pub/telephony/asterisk-gui/asterisk-gui-2.1.0-rc1.tar.gz
複製代碼
.
.
3. Unzip and untar
  1. tar xvf ./asterisk-gui-2.1.0-rc1.tar.gz
複製代碼
.
.
4. Change directory to asterisk-gui-2.1.0-rc1
  1. cd asterisk-gui-2.1.0-rc1/
複製代碼
.
.
5. Configure the Asteris-GUI
  1. ./configure
複製代碼
.
.
It gives
  1.                .$=..
  2.             .$7$7..          .7$7:.
  3.           .$:.                 ,$7.7
  4.         .$7.     7$           .$77
  5.      ..$.       $            .$7
  6.     ..7$   .?.   $   .?.       7$.
  7.    $.$.   .$7. $7 .7$.      .$.
  8. .777.   .$77$77$7.      $,
  9. $~      .7$7.       .$.
  10. .$7          .7$7:          ?$.
  11. $          ?7$I        .$7
  12. $       .7$      :$.
  13. $       $7$    .$.
  14. $        $   7$7  .$    .$.
  15. $             $7         .$.
  16. 7$7            7$        7$
  17. $                        $
  18.   $7.                       $  (TM)
  19.    $.           .7$  $
  20.      $7$.$
  21.        $.

  22. configure: Package configured for:
  23. configure: OS type  : linux-gnu
  24. configure: Host CPU : armv6l
  25. root@raspberrypi:/usr/src/asterisk/asterisk-gui-2.1.0-rc1#
複製代碼
.
.
6. Make
  1. make
複製代碼
.
.
It gives
  1. root@raspberrypi:/usr/src/asterisk/asterisk-gui-2.1.0-rc1# make
  2. +------- Asterisk-GUI Build Complete -------+
  3. + Asterisk-GUI has successfully been built, +
  4. + and can be installed by running:          +
  5. +                                           +
  6. +               make install                +
  7. +-------------------------------------------+
  8. root@raspberrypi:/usr/src/asterisk/asterisk-gui-2.1.0-rc1#
複製代碼
.
.
7. make install
  1. make install
  2. [code].
  3. .
  4. It gives
  5. [code]
  6. +---- Asterisk GUI Installation Complete ---+
  7. +                                           +
  8. +    YOU MUST READ THE SECURITY DOCUMENT    +
  9. +                                           +
  10. + Asterisk-GUI has successfully been        +
  11. + installed.                                +
  12. +                                           +
  13. +-------------------------------------------+
  14. +                                           +
  15. +          BEFORE THE GUI WILL WORK         +
  16. +                                           +
  17. + Before the GUI will run, you must perform +
  18. + some modifications to the Asterisk        +
  19. + configuration files in accordance with    +
  20. + the README file.  When done, you can      +
  21. + check your changes by doing:              +
  22. +                                           +
  23. +               make checkconfig            +
  24. +                                           +
  25. +-------------------------------------------+
  26. root@raspberrypi:/usr/src/asterisk/asterisk-gui-2.1.0-rc1
複製代碼
.
.
8. Change directory
  1. cd /etc/asterisk
複製代碼
.
.
9. Edit /etc/asterisk/manager.conf
  1. [general]

  2. enabled = yes
  3. webenabled = yes
  4. port = 8088
  5. bindaddr = 0.0.0.0


  6. [admin]
  7. secret=admin
  8. read=system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
  9. write=system,call,agent,user,config,command,reporting,originate
複製代碼
.
.
10. Edit /etc/asterisk/http.conf
  1. [general]

  2. redirect = / /asterisk/static/config/index.html
  3. enabled=yes
  4. bindaddr=0.0.0.0
  5. prefix=asterisk
  6. enablestatic=yes
複製代碼
.
.
11. Change directory
  1. cd /usr/src/asterisk/asterisk-gui-2.1.0-rc1
複製代碼
.
.
12. Check whether the previous modification works
  1. root@raspberrypi:/usr/src/asterisk/asterisk-gui-2.1.0-rc1# make checkconfig
  2. --- Checking Asterisk configuration to see if it will support the GUI ---
  3. * Checking for http.conf: OK
  4. * Checking for manager.conf: OK
  5. * Checking if HTTP is enabled: OK
  6. * Checking if HTTP static support is enabled: OK
  7. * Checking if manager is enabled: OK
  8. * Checking if manager over HTTP is enabled: OK
  9. --- Everything looks good ---
  10. * GUI should be available at http://raspberrypi:8088/asterisk/static/config/index.html

  11. * Note: If you have bindaddr=127.0.0.1 in /etc/asterisk/http.conf
  12.    you will only be able to visit it from the local machine.

  13.    Example: http://localhost:8088/asterisk/static/config/index.html

  14. * The login and password should be an entry from /etc/asterisk/manager.conf
  15.    which has 'config' permission in read and write.  For example:

  16.     [admin]
  17.     secret = mysecret3152
  18.     read = system,call,log,verbose,command,agent,config
  19.     write = system,call,log,verbose,command,agent,config

  20. --- Good luck! ---
  21. root@raspberrypi:/usr/src/asterisk/asterisk-gui-2.1.0-rc1#
複製代碼

作者: 角色    時間: 2013-9-17 20:46

本帖最後由 角色 於 2013-9-17 20:47 編輯

Restart the Asterisk server

Using a browser with the following address

http://10.0.88.31:8088/asterisk/static/config/index.html

or

http://10.0.88.31:8088

user=admin, password=admin
1057a.gif


Follow the message box and restart the Asterisk server
1057b.gif


1057c.gif

圖片附件: 1057a.gif (2013-9-17 20:45, 22.63 KB) / 下載次數 882
http://telecom-cafe.com/forum/attachment.php?aid=2779&k=1e45c3cefaabb2077a7a5e15af125691&t=1744871323&sid=UOEwW6



圖片附件: 1057b.gif (2013-9-17 20:45, 13.62 KB) / 下載次數 843
http://telecom-cafe.com/forum/attachment.php?aid=2780&k=1e832137cc0fabfa424cce4bcfb6f1f7&t=1744871323&sid=UOEwW6



圖片附件: 1057c.gif (2013-9-17 20:45, 12.34 KB) / 下載次數 847
http://telecom-cafe.com/forum/attachment.php?aid=2781&k=fc707477857f8793cc9f67b17a0ca155&t=1744871323&sid=UOEwW6


作者: 角色    時間: 2013-9-22 18:17

安装基本上已经解决好!如果大家需要image,可以PM我。
作者: carw318    時間: 2013-9-29 21:05

經角色前輩給我的 image , 已成功安裝在 Raspberry Pi , 反應都幾快喎 , 非常多謝前輩的指導 !!
作者: 角色    時間: 2013-9-29 21:34

其实我弄这个image,都是像其他member一样,对于一些人不太熟悉怎样compile,所以弄了两个images,一个是斋Asterisk Server,另外一个是Asterisk Server + Asterisk GUI,简称Asterisk GUI。

大家有了这两个images,特别是Asterisk GUI,大家很快就能掌握Asterisk GUI的基本技术。
作者: 角色    時間: 2013-10-4 21:56

原来我的compiled image,没有chan_sip.so,所以sip没有功能。
作者: carw318    時間: 2013-10-5 17:26

您好前輩 , 今日有時間想加 NWT 去部asterisk 到做行 sip 試下 , 就看見這 post , 我應該要如何 update ? 謝 !
作者: 角色    時間: 2013-10-5 20:45

回復 12# carw318

就是libssl-dev package没有加上,如果你自己会compile,那么就可以,不然要等等。
作者: carw318    時間: 2013-10-5 21:04

好的,試下先 ,謝謝 ~ 
作者: 角色    時間: 2013-10-6 09:22

回復 14# carw318

还有其他问题,入RTP,http://www.telecom-cafe.com/foru ... =5892&pid=35461
作者: 角色    時間: 2013-10-9 10:43

现在image试过可以用,如果大家有需要,可以PM我。
作者: 角色    時間: 2013-10-14 18:17

如果你的Asterisk server只是内部用,而只是接外面的Trunk的话,那么你就不要做什么port forwarding工作,但是如果你的Asterisk server,能让外面SIP Client注册你的Asterisk SIP server的话,那么Asterisk server前面的router就要做适当的port forwarding。
作者: carw318    時間: 2013-10-14 18:54

角色前輩, 謝謝你的 image file , 但我發覺有一些問題 , 就是我用 android software client > linksys spa941, 就打不通 ! 反而由 linksys spa941 > android software client 就可以 , android software client 互打就沒問題 , 我也試了自己重新安裝都是這樣 , 什麼問題呢 ? thanks your help !!

== Using SIP RTP CoS mark 5
    -- Executing [6000@DLPN_DialPlan1:1] Gosub("SIP/6001-00000007", "6000,stdexten(SIP/6000)") in new stack
[Oct  6 17:22:02] NOTICE[3026][C-00000024]: pbx.c:4698 pbx_extension_helper: No such label 'stdexten' in extension '6000' in context 'DLPN_DialPlan1'
[Oct  6 17:22:02] WARNING[3026][C-00000024]: pbx.c:12075 pbx_parseable_goto: Priority 'stdexten' must be a number > 0, or valid label
[Oct  6 17:22:02] ERROR[3026][C-00000024]: app_stack.c:547 gosub_exec: Gosub address is invalid: '6000,stdexten(SIP/6000)'
  == Spawn extension (DLPN_DialPlan1, 6000, 1) exited non-zero on 'SIP/6001-00000007'
raspberrypi*CLI>
作者: 角色    時間: 2013-10-14 18:56

本帖最後由 角色 於 2013-10-14 19:01 編輯

1. 你是内部拨打吗?
2. 你用我最新的1.2a image吗?
作者: carw318    時間: 2013-10-14 19:04

是, 已用了你的 image 和另再自己 download 整都是一樣 , 現在只是整緊內部互打先 !
作者: carw318    時間: 2013-10-14 19:08

我的 spa941 setting 是這樣 !

圖片附件: [spa941] 擷取.JPG (2013-10-14 19:07, 123.88 KB) / 下載次數 571
http://telecom-cafe.com/forum/attachment.php?aid=2833&k=af709f72500494f4c183f07337d28485&t=1744871323&sid=UOEwW6


作者: 角色    時間: 2013-10-14 19:14

你的setting好像有问题。

1. 192.168.2.70:5060, 改成192.168.2.70
2. Remove Outboard Proxy
3. Remove SIP Proxy-Require
作者: carw318    時間: 2013-10-14 20:02

好的, 我試試先 , 再謝 !
作者: carw318    時間: 2013-10-14 20:53

剛試了, 原來在 asterisk 個user setting 到, 唔用 voicemail , 就可以software android client > spa 941 內部互打了!
作者: 角色    時間: 2013-10-14 21:21

先暂时不用voicemail,因给我也没有用过。
作者: carw318    時間: 2013-10-14 21:56

好的, 謝謝 ~~
作者: mrandrewchan    時間: 2013-12-20 21:50

回復 7# 角色


角色 Ching,

多謝 Guide, 我已成功安裝並能 Internal 互打, 但如果想在Internet 互打應該怎set ?  謝謝
作者: 角色    時間: 2013-12-20 22:04

回復 27# mrandrewchan

你可以参考我以前写过的帖子。

http://www.telecom-cafe.com/foru ... =4714&pid=24708
作者: mrandrewchan    時間: 2013-12-20 23:34

本帖最後由 mrandrewchan 於 2013-12-21 00:02 編輯

回復 28# 角色

角色 Ching,

已set 好, Router OS 也做了 port forward (port 5229 & 10000-20000 to Internal Asterisk IP ), 但不能在手机上 register (Andriod use Zoiper software and change the host name ). I miss something ? Thanks
作者: 角色    時間: 2013-12-21 00:19

是否有按apply settings?

还有你注册的时候,putty里的Asterisk log是什么?

你Zopier里是hostname,是否有用hostname:5229?
作者: mrandrewchan    時間: 2013-12-21 20:28

回復 30# 角色


角色 Ching,

1. Yes, with press apply setting.
2. Check log just said, don't understand as follow :
[[Dec 21 19:12:45] NOTICE[2903] pbx_ael.c: Starting AEL load process.
[Dec 21 19:12:45] WARNING[2211] chan_sip.c: Invalid tos_audio value at line 277, refer to QoS documentation
[Dec 21 19:12:45] WARNING[2211] chan_sip.c: Invalid tos_sip value at line 278, refer to QoS documentation
[Dec 21 19:12:45] WARNING[2211] chan_sip.c: Invalid tos_video value at line 279, refer to QoS documentation
[Dec 21 19:12:45] NOTICE[2903] pbx_ael.c: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.
[Dec 21 19:12:45] NOTICE[2903] pbx_ael.c: AEL load process: checked config file name '/etc/asterisk/extensions.ael'.
[Dec 21 19:12:45] NOTICE[2903] pbx_ael.c: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'.
[Dec 21 19:12:45] NOTICE[2903] pbx_ael.c: AEL load process: merged config file name '/etc/asterisk/extensions.ael'.
[Dec 21 19:12:45] NOTICE[2903] pbx_ael.c: AEL load process: verified config file name '/etc/asterisk/extensions.ael'.
[Dec 21 19:12:45] WARNING[2211] sip/config_parser.c: nat=yes is deprecated, use nat=force_rport,comedia instead
[Dec 21 19:12:45] WARNING[2211] chan_sip.c: Invalid address for externaddr keyword:
[Dec 21 19:12:45] WARNING[2211] frame.c: Cannot allow unknown format ''
[Dec 21 19:12:45] WARNING[2211] chan_sip.c: Codec configuration errors found in line 298 : allow =
[Dec 21 19:12:45] WARNING[2211] sip/config_parser.c: nat=yes is deprecated, use nat=force_rport,comedia instead
[Dec 21 19:12:45] WARNING[2211] sip/config_parser.c: nat=yes is deprecated, use nat=force_rport,comedia instead
[Dec 21 19:12:45] WARNING[2211] sip/config_parser.c: nat=yes is deprecated, use nat=force_rport,comedia instead
[Dec 21 19:17:24] NOTICE[2211] chan_sip.c: Registration from '<sip:6002@xxx.xxx.net:5229;transport=UDP>' failed for 'myrouterip:15099'
- Wrong password
[Dec 21 19:27:15] WARNING[3053][C-0000003c] app_system.c: Unable to execute 'dahdi_scan > /etc/asterisk/dahdi_scan.conf'
root@raspberrypi:/var/log/asterisk# date

3. Yes, add hostname:522 in zoiper

Thanks
作者: 角色    時間: 2013-12-21 21:09

根据“<sip:6002@xxx.xxx.net:5229;transport=UDP>' failed for 'myrouterip:15099'
- Wrong password”,说password有吴。
作者: mrandrewchan    時間: 2013-12-22 23:53

回復 32# 角色

角色 Ching,

Thanks support, fix it as follow.

vi /etc/asterisk/logger.conf
[general]
dateformat=%F %T
作者: orangelau    時間: 2014-1-6 00:00

我打完下面呢句,出現呢個問題,係咩事?

root@raspberrypi:/usr/src/asterisk# wget http://downloads.asterisk.org/pu ... erisk-11.5.1.tar.gz

--2014-01-04 18:23:32--  http://downloads.asterisk.org/pu ... erisk-11.5.1.tar.gz

Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee

Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected.

HTTP request sent, awaiting response... 404 Not Found

2014-01-04 18:23:34 ERROR 404: Not Found.



root@raspberrypi:/usr/src/asterisk# wget http://downloads.asterisk.org/pu ... erisk-11.5.1.tar.gz

--2014-01-04 18:23:50--  http://downloads.asterisk.org/pu ... erisk-11.5.1.tar.gz

Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee

Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected.

HTTP request sent, awaiting response... 404 Not Found

2014-01-04 18:23:50 ERROR 404: Not Found.



root@raspberrypi:/usr/src/asterisk# wget http://downloads.asterisk.org/pu ... erisk-11.5.1.tar.gz

--2014-01-04 18:24:12--  http://downloads.asterisk.org/pu ... erisk-11.5.1.tar.gz

Resolving downloads.asterisk.org (downloads.asterisk.org)... 76.164.171.238, 2001:470:e0d4::ee

Connecting to downloads.asterisk.org (downloads.asterisk.org)|76.164.171.238|:80... connected.

HTTP request sent, awaiting response... 404 Not Found

2014-01-04 18:24:13 ERROR 404: Not Found.
作者: orangelau    時間: 2014-1-6 01:40

我將呢句“wget http://downloads.asterisk.org/pu ... erisk-11.5.1.tar.gz
改成
wget http://downloads.asterisk.org/pu ... erisk-12.0.0.tar.gz
就可以進行下一步
作者: orangelau    時間: 2014-1-6 01:42

之後呢句“tar xvf ./asterisk-11.5.1.tar.gz“同埋“cd asterisk-11.5.1“ 改成12.0.0
作者: orangelau    時間: 2014-1-6 01:45

./configure
跟住就出現呢個error

“configure: error: *** uuid support not found (this typically means the uuid development package is missing)“
作者: orangelau    時間: 2014-1-7 10:37

成功搞掂,但要將全部asterisk-11.5.1改asterisk-11.7.0就可以
作者: 角色    時間: 2014-1-9 21:35

那就好。
作者: Qnewbie    時間: 2014-3-7 06:50

回復 5# 角色

Don't forget to install libssl-dev! Otherwise you lose chan_sip!
  1. apt-get install libssl-dev
複製代碼





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