返回列表 發帖

【Raspberry Pi】——Additional libraries needed on Raspbian for Asterisk Installation

本帖最後由 角色 於 2013-10-8 21:23 編輯

libraries needed in order to have the correct operation of the Asterisk 11 on Raspberry Pi box
----------------------------------------------------------------------------------------
apt-get install libncurses5-dev libxml2-dev libsqlite3-dev libssl-dev uuid-dev

check: chan_sip.o, res_rtp_asterisk.so in menuselect
------------------------------------------------------------------------------------------
因为发现sip不能工作,所以知道自己的toolchain对Asterisk on Raspbian package没有complete。

Raspbian = Debian + Raspberry Pi

SD images for reference:

Asterisk server images:
V1: Raspberry + Asterisk-11.5.1 V1 2013-10-05.img Link

Asterisk server + Asterisk-GUI images:
V1: Raspberry + Asterisk-GUI-11.5.1 V1 2013-10-06.img Link
V1.1: Raspberry + Asterisk-GUI-11.5.1 V1.1 2013-10-06.img Link
V1.2: Raspberry + Asterisk-GUI-11.5.1 V1.2 2013-10-06.img Link

In【2】,apt-get build-dep asterisk

References:
[1] http://www.asteriskguru.com/tuto ... ilation_debian.html
[2] http://www.debianhelp.co.uk/asterisk.htm
[3] http://linuxmoz.com/debian-asterisk-10-source-install-guide/
[4] http://letitknow.wordpress.com/2 ... -4-on-debian-6-0-1/
[5] http://blog.keer.info/install-as ... on-debian-wheezy-7/
[6] http://the-asterisk-book.com/1.6/installation-1.4-debian-4.0.html
[7] http://www.howtoforge.com/instal ... me-config-on-debian
[8] http://blogs.digium.com/2012/11/ ... on-ubuntu-12-4-lts/
[9] http://clauseriksen.net/2012/03/ ... e-on-debian-wheezy/
[10] http://nil.uniza.sk/sip/asterisk ... odules-debian-lenny
[11] http://maydian.wordpress.com/201 ... -on-debian-squezze/
[12] http://www.oneunified.net/blog/O ... Asterisk/index.blog
[13] http://blog.philippklaus.de/2011 ... debian-from-source/

Auto-start of Asterisk on Debian
http://blog.jerodsanto.net/2008/ ... -on-boot-in-debian/

Other member's contributions:
http://www.telecom-cafe.com/foru ... &extra=page%3D3

Clean Distribution
make dist-clean

Debian—How to search a package
apt-cache search {package-name}

本帖最後由 角色 於 2013-10-6 07:55 編輯

Raspberry + Asterisk-11.5.1 V1 2013-10-05.img

In order to get rid of the configuration errors, please install the following libraries and the installation steps are also summarised
  1. apt-get install libncurses5-dev libxml2-dev libsqlite3-dev libssl-dev

  2. ./configure

  3. make menuselect

  4. make

  5. make install
複製代碼
The following example shows the installation steps in details except the libraries which are needed installed in advance.
  1. Raspberry + Asterisk11-V1-2013-10-05.img

  2. asterisk-11.5.1 source

  3. 1. Go to check the new version of the Asterisk system

  4. 2. mkdir /usr/src/asterisk

  5. 3. cd /usr/src/asterisk

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

  7. 5. tar xvf ./asterisk-11.5.1.tar.gz

  8. 6.  cd asterisk-11.5.1

  9. 7. ./configure

  10. Error message:
  11. configure: error: *** termcap support not found (on modern systems, this typically means the ncurses development package is missing)


  12. 8. apt-get install libncurses5-dev


  13. 9. ./configure

  14. Error message:

  15. configure: *** XML documentation will not be available because the 'libxml2' development package is missing.
  16. configure: *** Please run the 'configure' script with the '--disable-xmldoc' parameter option
  17. configure: *** or install the 'libxml2' development package.

  18. 10. apt-get install libxml2-dev

  19. 11. ./configure

  20. Error message:
  21. configure: WARNING: *** Asterisk now uses SQLite3 for the internal Asterisk database.
  22. configure: WARNING: *** Please install the SQLite3 development package.

  23. 12. apt-get install libsqlite3-dev

  24. 13. ./configure

  25. Finally it gives

  26. configure: Menuselect build configuration successfully completed

  27.                .$=..
  28.             .$7$7..          .7$7:.
  29.           .$:.                 ,$7.7
  30.         .$7.     7$           .$77
  31.      ..$.       $            .$7
  32.     ..7$   .?.   $   .?.       7$.
  33.    $.$.   .$7. $7 .7$.      .$.
  34. .777.   .$77$77$7.      $,
  35. $~      .7$7.       .$.
  36. .$7          .7$7:          ?$.
  37. $          ?7$I        .$7
  38. $       .7$      :$.
  39. $       $7$    .$.
  40. $        $   7$7  .$    .$.
  41. $             $7         .$.
  42. 7$7            7$        7$
  43. $                        $
  44.   $7.                       $  (TM)
  45.    $.           .7$  $
  46.      $7$.$
  47.        $.

  48. configure: Package configured for:
  49. configure: OS type  : linux-gnueabihf
  50. configure: Host CPU : armv6l
  51. configure: build-cpu:vendor:os: armv6l : unknown : linux-gnueabihf :
  52. configure: host-cpu:vendor:os: armv6l : unknown : linux-gnueabihf :
  53. root@raspberrypi:/usr/src/asterisk/asterisk-11.5.1#

  54. 14. make menuselect

  55. Channel Drivers -> XXX chan_sip (not selected due to lack of other libraries.)

  56. 15. apt-get install libssl-dev

  57. 16. ./configure

  58. 17. make menuselect

  59. 18. Check [*] chan_sip

  60. 19. make  (at 22:19 start) (stopped at 23:41)

  61. It gives

  62. Building Documentation For: channels pbx apps codecs formats cdr cel bridges funcs tests main res addons
  63. +--------- Asterisk Build Complete ---------+
  64. + Asterisk has successfully been built, and +
  65. + can be installed by running:              +
  66. +                                           +
  67. +                make install               +
  68. +-------------------------------------------+


  69. 20. make install

  70. it gives

  71. +---- Asterisk Installation Complete -------+
  72. +                                           +
  73. +    YOU MUST READ THE SECURITY DOCUMENT    +
  74. +                                           +
  75. + Asterisk has successfully been installed. +
  76. + If you would like to install the sample   +
  77. + configuration files (overwriting any      +
  78. + existing config files), run:              +
  79. +                                           +
  80. +                make samples               +
  81. +                                           +
  82. +-----------------  or ---------------------+
  83. +                                           +
  84. + You can go ahead and install the asterisk +
  85. + program documentation now or later run:   +
  86. +                                           +
  87. +               make progdocs               +
  88. +                                           +
  89. + **Note** This requires that you have      +
  90. + doxygen installed on your local system    +
  91. +-------------------------------------------+


  92. 21. make samples


  93. 22. /usr/sbin/asterisk

  94. 23. /usr/sbin/asterisk -rvvv

  95. it gives

  96. Asterisk 11.5.1, Copyright (C) 1999 - 2012 Digium, Inc. and others.
  97. Created by Mark Spencer <markster@digium.com>
  98. Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
  99. This is free software, with components licensed under the GNU General Public
  100. License version 2 and other licenses; you are welcome to redistribute it under
  101. certain conditions. Type 'core show license' for details.
  102. =========================================================================
  103. Connected to Asterisk 11.5.1 currently running on raspberrypi (pid = 2180)
  104. raspberrypi*CLI>
複製代碼

TOP

本帖最後由 角色 於 2013-10-6 07:55 編輯

Raspberry + Asterisk-GUI-11.5.1 V1 2013-10-06.img

Based on the image "Raspberry + Asterisk-11.5.1 V1 2013-10-05.img" with Astersik-GUI, it forms another image of Asterisk with GUI function.
  1. How to install Asterisk-GUI

  2. 1. cd /usr/src/asterisk

  3. 2. wget http://downloads.asterisk.org/pub/telephony/asterisk-gui/asterisk-gui-2.1.0-rc1.tar.gz

  4. 3. tar xvf ./asterisk-gui-2.1.0-rc1.tar.gz

  5. 4. cd asterisk-gui-2.1.0-rc1

  6. 5. ./configure

  7. 6. make

  8. 7. make install

  9. 8. edit /etc/asterisk/manager.conf

  10. [general]

  11. enabled = yes
  12. webenabled = yes
  13. port = 8088
  14. bindaddr = 0.0.0.0


  15. [admin]
  16. secret=admin
  17. read=system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
  18. write=system,call,agent,user,config,command,reporting,originate

  19. 9. edit /etc/asterisk/http.conf

  20. [general]

  21. redirect = / /asterisk/static/config/index.html
  22. enabled=yes
  23. bindaddr=0.0.0.0
  24. prefix=asterisk
  25. enablestatic=yes

  26. 10. restart asterisk

  27. 11. Using a browser to enter an ip address 192.168.88.252:8088

  28. 12. Username=admin, Password=admin
複製代碼

TOP

本帖最後由 角色 於 2013-10-6 07:37 編輯

Raspberry + Asterisk-GUI-11.5.1 V1.1 2013-10-06.img

based on Raspberry + Asterisk-GUI-11.5.1 V1 2013-10-06.img

added
1. Correct time zone for GMT+8 (for Hong Kong)
2. Autostart /usr/sbin/asterisk

Details.

1a. With reference to http://www.telecom-cafe.com/foru ... &extra=page%3D1

1b.
  1. /usr/bin/tzselect
複製代碼
1c. edit .profile to add
  1. # ~/.profile: executed by Bourne-compatible login shells.

  2. if [ "$BASH" ]; then
  3.   if [ -f ~/.bashrc ]; then
  4.     . ~/.bashrc
  5.   fi
  6. fi

  7. TZ='Asia/Hong_Kong'; export TZ

  8. mesg n
複製代碼
Asterisk Autostart

2a. Change directory
  1. cd /usr/src/asterisk/asterisk-11.5.1/contrib/init.d
複製代碼
2b. Copy
  1. cp rc.debian.asterisk /etc/init.d/asterisk
複製代碼
3c. Edit /etc/init.d/asterisk as below:
  1. # Full path to asterisk binary
  2. ## DAEMON=__ASTERISK_SBIN_DIR__/asterisk
  3. DAEMON=/usr/sbin/asterisk
  4. ## ASTVARRUNDIR=__ASTERISK_VARRUN_DIR__
  5. ASTVARRUNDIR=/var/run/asterisk/
  6. ## ASTETCDIR=__ASTERISK_ETC_DIR__
  7. ASTETCDIR=/etc/asterisk/
複製代碼
3d. Test the new script
  1. /etc/init.d/asterisk start
  2. Starting Asterisk PBX: asterisk.
  3. /etc/init.d/asterisk stop
  4. Stopping Asterisk PBX: asterisk.
複製代碼
3e. Make the sysstem run this script during the boot process
  1. update-rc.d asterisk defaults
複製代碼

TOP

备用帖子。

TOP

本帖最後由 角色 於 2013-10-5 00:55 編輯

For chan_sip.so, we need to install package "openssl-devel" (no this package) but libssl-dev

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

返回列表