電訊茶室's Archiver

角色 發表於 2013-4-21 22:14

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

[i=s] 本帖最後由 角色 於 2013-4-25 01:15 編輯 [/i]

因为有的时候需要修改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:[code]
configure: error: *** termcap support not found (on modern systems, this typically means the ncurses development package is missing)
[root@localhost asterisk-1.8.21.0]#
[/code]Solution:[code]
yum -y install libtermcap-devel
[/code]8.1. Run ./configure again

Error message 2:[code]
checking for xml2-config... no
configure: *** XML documentation will not be available because the 'libxml2' development package is missing.
configure: *** Please run the 'configure' script with the '--disable-xmldoc' parameter option
configure: *** or install the 'libxml2' development package.
[root@localhost asterisk-1.8.21.0]#
[/code]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[code]
yum -y install libxml2-devel
[/code]8.3 Run ./configure again, it gives[code]
configure: Menuselect build configuration successfully completed

               .$$=..
            .$7$7..          .7$7:.
          .$:.                 ,$7.7
        .$7.     7$           .$77
     ..$.       $            .$7
    ..7$   .?.   $   .?.       7$.
   $.$.   .$7. $7 .7$.      .$.
.777.   .$77$77$7.      $,
$~      .7$$7.       .$.
.$7          .7$7:          ?$.
$          ?7$$I        .$7
$       .7$$      :$.
$       $7$$    .$.
$        $   7$7  .$    .$.
$             $7         .$.
7$7            7$        7$
$                        $
  $7.                       $  (TM)
   $.           .7$  $
     $$7$$.$
       $$.

configure: Package configured for:
configure: OS type  : linux-gnu
configure: Host CPU : i686
configure: build-cpu:vendor:os: i686 : pc : linux-gnu :
configure: host-cpu:vendor:os: i686 : pc : linux-gnu :
[root@localhost asterisk-1.8.21.0]#
[/code]

角色 發表於 2013-4-21 22:45

[i=s] 本帖最後由 角色 於 2013-4-21 23:31 編輯 [/i]

9. make menuselect

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

11. make menuselect, it gives
[attach]2435[/attach]

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:

[attach]2436[/attach]

角色 發表於 2013-4-21 23:33

11. make to start the compilation process. Eventually it gives[code]
+--------- Asterisk Build Complete ---------+
+ Asterisk has successfully been built, and +
+ can be installed by running:              +
+                                           +
+                make install               +
+-------------------------------------------+
[root@localhost asterisk-1.8.21.0]#
[/code]

角色 發表於 2013-4-21 23:35

12. make install[code]
+---- Asterisk Installation Complete -------+
+                                           +
+    YOU MUST READ THE SECURITY DOCUMENT    +
+                                           +
+ Asterisk has successfully been installed. +
+ If you would like to install the sample   +
+ configuration files (overwriting any      +
+ existing config files), run:              +
+                                           +
+                make samples               +
+                                           +
+-----------------  or ---------------------+
+                                           +
+ You can go ahead and install the asterisk +
+ program documentation now or later run:   +
+                                           +
+               make progdocs               +
+                                           +
+ **Note** This requires that you have      +
+ doxygen installed on your local system    +
+-------------------------------------------+
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_adaptive_odbc.so
    cdr_mysql.so
    cdr_odbc.so
    cdr_pgsql.so
    cdr_sqlite3_custom.so
    cel_odbc.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
    chan_sip.so
    codec_speex.so
    format_mp3.so
    format_ogg_vorbis.so
    func_curl.so
    func_odbc.so
    func_speex.so
    res_config_curl.so
    res_config_ldap.so
    res_config_mysql.so
    res_config_odbc.so
    res_config_pgsql.so
    res_crypto.so
    res_curl.so
    res_jabber.so
    res_odbc.so
    res_pktccops.so
    res_snmp.so
    res_srtp.so

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

[/code]

角色 發表於 2013-4-21 23:41

Installation is complete.

13. Enter Asterisk console[code]
[root@localhost asterisk-1.8.21.0]# /usr/sbin/asterisk -rvvvv
Asterisk 1.8.21.0, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.20.0 currently running on localhost (pid = 3520)
Verbosity is at least 14
[/code]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.[code]
[root@localhost asterisk-1.8.21.0]# /usr/sbin/asterisk -rvvvv
Asterisk 1.8.21.0, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.21.0 currently running on localhost (pid = 3520)
Verbosity was 3 and is now 4
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
localhost*CLI>
[/code]

角色 發表於 2013-4-22 00:40

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

角色 發表於 2013-4-22 00:41

17. make distclean

18. ./configure

19. ./make menuselect

20. make

21. make install, it gives[code]
+---- Asterisk Installation Complete -------+
+                                           +
+    YOU MUST READ THE SECURITY DOCUMENT    +
+                                           +
+ Asterisk has successfully been installed. +
+ If you would like to install the sample   +
+ configuration files (overwriting any      +
+ existing config files), run:              +
+                                           +
+                make samples               +
+                                           +
+-----------------  or ---------------------+
+                                           +
+ You can go ahead and install the asterisk +
+ program documentation now or later run:   +
+                                           +
+               make progdocs               +
+                                           +
+ **Note** This requires that you have      +
+ doxygen installed on your local system    +
+-------------------------------------------+
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.21.0]#
[/code]

角色 發表於 2013-4-25 00:37

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

角色 發表於 2013-4-25 01:06

alang给我的link,我想明白怎样compile了,就是去对应的verison。
[url]http://www.elastix.org/en/component/kunena/18-modules/55174-gtalk-a-asterisk.html[/url]

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

alang 發表於 2013-4-25 13:31

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

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

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

角色 發表於 2013-4-28 08:58

[i=s] 本帖最後由 角色 於 2013-4-28 09:05 編輯 [/i]

谢谢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]#

角色 發表於 2013-4-28 13:53

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

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.