返回列表 發帖

怎样自己upgrade Elastix的Asterisk?(现在还没有成功,安装后所有extensions不见了!)

本帖最後由 角色 於 2013-4-25 01:15 編輯

因为有的时候需要修改Elsatix里面的source code,例如ET263等问题。如果可以的话就非常方便了。

1. 下载最新Asterisk asterisk-1.8.21.0.tar.gz。

2. cd /root

3. mkdir source

4. change directory to /root/source

5. copy asterisk-1.8.21.0.tar.gz to /root/source (using ftp external ftp server)

6. tar xvf ./asterisk-1.8.21.0.tar.gz

7. cd ./asterisk-1.8.21.0

8. ./configure (because we need to install the Asterisk to standard directory and path)

Error message 1:
  1. configure: error: *** termcap support not found (on modern systems, this typically means the ncurses development package is missing)
  2. [root@localhost asterisk-1.8.21.0]#
複製代碼
Solution:
  1. yum -y install libtermcap-devel
複製代碼
8.1. Run ./configure again

Error message 2:
  1. checking for xml2-config... no
  2. configure: *** XML documentation will not be available because the 'libxml2' development package is missing.
  3. configure: *** Please run the 'configure' script with the '--disable-xmldoc' parameter option
  4. configure: *** or install the 'libxml2' development package.
  5. [root@localhost asterisk-1.8.21.0]#
複製代碼
Solution: yum -y install limxml2

8.2 Run ./configure again

The error message is the same as Error message 2, we need to install the development package for libxml2
  1. yum -y install libxml2-devel
複製代碼
8.3 Run ./configure again, it gives
  1. configure: Menuselect build configuration successfully completed

  2.                .$$=..
  3.             .$7$7..          .7$7:.
  4.           .$:.                 ,$7.7
  5.         .$7.     7$           .$77
  6.      ..$.       $            .$7
  7.     ..7$   .?.   $   .?.       7$.
  8.    $.$.   .$7. $7 .7$.      .$.
  9. .777.   .$77$77$7.      $,
  10. $~      .7$$7.       .$.
  11. .$7          .7$7:          ?$.
  12. $          ?7$$I        .$7
  13. $       .7$$      :$.
  14. $       $7$$    .$.
  15. $        $   7$7  .$    .$.
  16. $             $7         .$.
  17. 7$7            7$        7$
  18. $                        $
  19.   $7.                       $  (TM)
  20.    $.           .7$  $
  21.      $$7$$.$
  22.        $$.

  23. configure: Package configured for:
  24. configure: OS type  : linux-gnu
  25. configure: Host CPU : i686
  26. configure: build-cpu:vendor:os: i686 : pc : linux-gnu :
  27. configure: host-cpu:vendor:os: i686 : pc : linux-gnu :
  28. [root@localhost asterisk-1.8.21.0]#
複製代碼

如果要解决上面的warnings,那么一个都要一套怎样compile的方案才行!

TOP

本帖最後由 角色 於 2013-4-28 09:05 編輯

谢谢alang的信息。

用Asterisk 1.8.20.0的tarball,然后进行编译,再行进安装,也有些warnings。估计那些warnnings都是需要特别处理也能移除,

WARNING WARNING WARNING

Your Asterisk modules directory, located at
/usr/lib/asterisk/modules
contains modules that were not installed by this
version of Asterisk. Please ensure that these
modules are compatible with this version before
attempting to run Asterisk.

    app_cbmysql.so
    app_mysql.so
    app_saycountpl.so
    cdr_mysql.so
    cdr_pgsql.so
    cdr_sqlite3_custom.so
    cel_pgsql.so
    cel_sqlite3_custom.so
    chan_alsa.so
    chan_extra.so
    chan_gtalk.so
    chan_jingle.so
    chan_mgcp.so
    chan_ooh323.so
    format_mp3.so
    format_ogg_vorbis.so
    res_config_ldap.so
    res_config_mysql.so
    res_config_pgsql.so
    res_jabber.so
    res_pktccops.so
    res_snmp.so
    res_srtp.so

WARNING WARNING WARNING
[root@localhost asterisk-1.8.20.0]#

TOP

要重新編譯 Source RPM,有幾個要點:

1. source rpm,target  rpm 與 Linux OS 版本都要一致
2. 執行編譯時,要使用 rpmbuild 的指令

如果未按照這樣的方式來做,即使編譯成功,也有可能會出現不穩定的狀況
OSSLab Blog :: VoIP & IT Consultant

TOP

alang给我的link,我想明白怎样compile了,就是去对应的verison。
http://www.elastix.org/en/compon ... alk-a-asterisk.html

我之前不成功,主要就是elastix的version 2.4的Asterisk是1.8.20.0,而我用的使用1.8.21.0.

TOP

根据上面的list,估计一步步来就可以报问题慢慢解决。

TOP

17. make distclean

18. ./configure

19. ./make menuselect

20. make

21. make install, it gives
  1. +---- Asterisk Installation Complete -------+
  2. +                                           +
  3. +    YOU MUST READ THE SECURITY DOCUMENT    +
  4. +                                           +
  5. + Asterisk has successfully been installed. +
  6. + If you would like to install the sample   +
  7. + configuration files (overwriting any      +
  8. + existing config files), run:              +
  9. +                                           +
  10. +                make samples               +
  11. +                                           +
  12. +-----------------  or ---------------------+
  13. +                                           +
  14. + You can go ahead and install the asterisk +
  15. + program documentation now or later run:   +
  16. +                                           +
  17. +               make progdocs               +
  18. +                                           +
  19. + **Note** This requires that you have      +
  20. + doxygen installed on your local system    +
  21. +-------------------------------------------+
  22. WARNING WARNING WARNING

  23. Your Asterisk modules directory, located at
  24. /usr/lib/asterisk/modules
  25. contains modules that were not installed by this
  26. version of Asterisk. Please ensure that these
  27. modules are compatible with this version before
  28. attempting to run Asterisk.

  29.     app_cbmysql.so
  30.     app_mysql.so
  31.     app_saycountpl.so
  32.     cdr_mysql.so
  33.     cdr_pgsql.so
  34.     cdr_sqlite3_custom.so
  35.     cel_pgsql.so
  36.     cel_sqlite3_custom.so
  37.     chan_alsa.so
  38.     chan_extra.so
  39.     chan_gtalk.so
  40.     chan_jingle.so
  41.     chan_mgcp.so
  42.     chan_ooh323.so
  43.     format_mp3.so
  44.     format_ogg_vorbis.so
  45.     res_config_ldap.so
  46.     res_config_mysql.so
  47.     res_config_pgsql.so
  48.     res_jabber.so
  49.     res_pktccops.so
  50.     res_snmp.so
  51.     res_srtp.so

  52. WARNING WARNING WARNING
  53. [root@localhost asterisk-1.8.21.0]#
複製代碼

TOP

16. 因为连sip都没有,所有要把整套packages for Asterisk安装如下:
  1. yum -y install gcc gcc-c++ kernel-devel bison \
  2. openssl openssl-devel perl perl-Net-SSLeay perl-Crypt-SSLeay \
  3. libtermcap-devel ncurses-devel doxygen curl-devel newt-devel \
  4. mlocate lynx tar wget nmap bzip2 mod_ssl crontabs vixie-cron \
  5. speex speex-devel unixODBC unixODBC-devel libtool-ltdl \
  6. libtool-ltdl-devel mysql-connector-odbc mysql mysql-devel \
  7. mysql-server php-mysql php-mbstring php-mcrypt flex screen \
  8. libtiff-devel libxml2-devel
複製代碼

TOP

Installation is complete.

13. Enter Asterisk console
  1. [root@localhost asterisk-1.8.21.0]# /usr/sbin/asterisk -rvvvv
  2. Asterisk 1.8.21.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. Connected to Asterisk 1.8.20.0 currently running on localhost (pid = 3520)
  10. Verbosity is at least 14
複製代碼
14. Execute the command "core restart now"

15. Enter the Asterisk console again, it shows that the Asterisk version has been changed from 1.8.20.0 to 1.8.21.0.
  1. [root@localhost asterisk-1.8.21.0]# /usr/sbin/asterisk -rvvvv
  2. Asterisk 1.8.21.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. Connected to Asterisk 1.8.21.0 currently running on localhost (pid = 3520)
  10. Verbosity was 3 and is now 4
  11.     -- Remote UNIX connection
  12.     -- Remote UNIX connection disconnected
  13. localhost*CLI>
複製代碼

TOP

12. make install
  1. +---- Asterisk Installation Complete -------+
  2. +                                           +
  3. +    YOU MUST READ THE SECURITY DOCUMENT    +
  4. +                                           +
  5. + Asterisk has successfully been installed. +
  6. + If you would like to install the sample   +
  7. + configuration files (overwriting any      +
  8. + existing config files), run:              +
  9. +                                           +
  10. +                make samples               +
  11. +                                           +
  12. +-----------------  or ---------------------+
  13. +                                           +
  14. + You can go ahead and install the asterisk +
  15. + program documentation now or later run:   +
  16. +                                           +
  17. +               make progdocs               +
  18. +                                           +
  19. + **Note** This requires that you have      +
  20. + doxygen installed on your local system    +
  21. +-------------------------------------------+
  22. WARNING WARNING WARNING

  23. Your Asterisk modules directory, located at
  24. /usr/lib/asterisk/modules
  25. contains modules that were not installed by this
  26. version of Asterisk. Please ensure that these
  27. modules are compatible with this version before
  28. attempting to run Asterisk.

  29.     app_cbmysql.so
  30.     app_mysql.so
  31.     app_saycountpl.so
  32.     cdr_adaptive_odbc.so
  33.     cdr_mysql.so
  34.     cdr_odbc.so
  35.     cdr_pgsql.so
  36.     cdr_sqlite3_custom.so
  37.     cel_odbc.so
  38.     cel_pgsql.so
  39.     cel_sqlite3_custom.so
  40.     chan_alsa.so
  41.     chan_extra.so
  42.     chan_gtalk.so
  43.     chan_jingle.so
  44.     chan_mgcp.so
  45.     chan_ooh323.so
  46.     chan_sip.so
  47.     codec_speex.so
  48.     format_mp3.so
  49.     format_ogg_vorbis.so
  50.     func_curl.so
  51.     func_odbc.so
  52.     func_speex.so
  53.     res_config_curl.so
  54.     res_config_ldap.so
  55.     res_config_mysql.so
  56.     res_config_odbc.so
  57.     res_config_pgsql.so
  58.     res_crypto.so
  59.     res_curl.so
  60.     res_jabber.so
  61.     res_odbc.so
  62.     res_pktccops.so
  63.     res_snmp.so
  64.     res_srtp.so

  65. WARNING WARNING WARNING
  66. [root@localhost asterisk-1.8.21.0]#
複製代碼

TOP

11. make to start the compilation process. Eventually it gives
  1. +--------- Asterisk Build Complete ---------+
  2. + Asterisk has successfully been built, and +
  3. + can be installed by running:              +
  4. +                                           +
  5. +                make install               +
  6. +-------------------------------------------+
  7. [root@localhost asterisk-1.8.21.0]#
複製代碼

TOP

本帖最後由 角色 於 2013-4-21 23:31 編輯

9. make menuselect

Error message 3:
  1. No menuselect user interface found. Install ncurses,
  2. newt or GTK libraries to build one and re-rerun
  3. './configure' and 'make menuselect'.
  4. [root@localhost asterisk-1.8.21.0]#
複製代碼
Solution:
  1. yum -y install newt-devel
複製代碼
10. Run ./configure again

11. make menuselect, it gives
1062.gif

If you see message code around the box and if you are using putting to login the system, then you can fix it by using UTF-8 coding, as shown below:

1063.gif

TOP

返回列表