返回列表 發帖

【角色茶桌】—— QNAP TS-119 Asterisk 1.8 Installation

本帖最後由 角色 於 2011-10-14 21:13 編輯

其实以前都有想过怎样在QNAP NAS安装Asterisk 1.8, 主要目的是可以安装到Google Voice和其他codec。

参考link: http://forum.qnap.com/viewtopic. ... mp;p=230131#p230131

现在已经安装的ipkg packages:

1) svn
2) gawk
  1. ipkage install optware-devel
複製代碼
  1. export PATH=/opt/bin:$PATH
  2. export LDFLAGS="-L/opt/lib"
  3. export CFLAGS="-I/opt/include"
  4. export LD_LIBRARY_PATH=/opt/lib
複製代碼
  1. ./configure --build=arm-gnu-linux
複製代碼
  1. ./configure --prefix=/type/here/the/custom/path
複製代碼
  1. ./configure --prefix=/opt/asterisk-1.8 --build=arm-gnu-linux
複製代碼

本帖最後由 bubblestar 於 2011-10-14 15:51 編輯

It is a great to hear that!  If they can also make it and put it into QPKG as well, I hope I can apply on my TS109.  I know they are going to do it and release once the the installation succeeds.

TOP

  1. configure: creating ./config.status
  2. config.status: creating build_tools/menuselect-deps
  3. gawk: ./confldX1rf/subs.awk:2: S["/; s/!.*/"]=LTLIBOBJS!%!_!# ""
  4. gawk: ./confldX1rf/subs.awk:2:                          ^ syntax error
  5. gawk: ./confldX1rf/subs.awk:3: S["/; s/!.*/"]=LTLIBOBJS!%!_!# ""
  6. gawk: ./confldX1rf/subs.awk:3:                              ^ syntax error
  7. gawk: ./confldX1rf/subs.awk:4: S["/; s/!.*/"]=PBX_SYSLOG!1%!_!# "1"
  8. gawk: ./confldX1rf/subs.awk:4:                                ^ syntax error
  9. gawk: ./confldX1rf/subs.awk:5: S["/; s/!.*/"]=PBX_SYSLOG_FACILITY_LOG_UUCP!1%!_!
複製代碼
To solve the above problem, we have to install the optware-devel package
  1. ipkage install optware-devel
複製代碼

TOP

  1. export PATH=/opt/bin:$PATH
複製代碼

TOP

本帖最後由 角色 於 2011-10-14 13:48 編輯
  1. gcc -g -c -D_GNU_SOURCE -Wall   -c -o menuselect_stub.o menuselect_stub.c
  2. gcc -o menuselect menuselect.o strcompat.o menuselect_stub.o mxml/libmxml.a
  3. make[2]: Leaving directory `/share/HDA_DATA/.qpkg/Optware/src/asterisk/1.8/menuselect'
  4. menuselect/nmenuselect: error while loading shared libraries: libnewt.so.0.52: cannot open shared object file: No such file or directory
  5. menuselect changes NOT saved!
  6. make[1]: Leaving directory `/share/HDA_DATA/.qpkg/Optware/src/asterisk/1.8'
  7. [/opt/src/asterisk/1.8] #
複製代碼
Solved by
  1. export PATH=/opt/bin:$PATH
  2. export LDFLAGS="-L/opt/lib"
  3. export CFLAGS="-I/opt/include"
  4. export LD_LIBRARY_PATH=/opt/lib
複製代碼

TOP

Finally I am able to obtain the following menuselect image:

10-14-2011 1-30-28 PM.png

YH

TOP

本帖最後由 角色 於 2011-10-14 14:39 編輯

Error message
  1. Assembler messages:
  2. Error: unknown architecture `armv5tel'

  3. Error: unrecognized option -march=armv5tel
  4. src/add.c:1: error: bad value (armv5tel) for -march= switch
  5. make[2]: *** [src/add.o] Error 1
  6. make[1]: *** [gsm/lib/libgsm.a] Error 2
  7. make: *** [codecs] Error 2
複製代碼
Resolved by
  1. ./configure --build=arm-gnu-linux
複製代碼

TOP

本帖最後由 角色 於 2011-10-15 11:36 編輯

终于可以complilation成功:
  1.   
  2. +--------- Asterisk Build Complete ---------+
  3. + Asterisk has successfully been built, and +
  4. + can be installed by running:              +
  5. +                                           +
  6. +                make install               +
  7. +-------------------------------------------+
  8. [/opt/src/asterisk/1.8] #
複製代碼

TOP

行到嗎?

TOP

I have not installed it because I forgot to change the installation location.

The default will be /opt/etc/asterisk. I would like to change it to other location.

YH

TOP

终于可以运行没有问题。
  1. Asterisk SVN-branch-1.8-r340809, Copyright (C) 1999 - 2011 Digium, Inc. and others.
  2. Created by Mark Spencer <markster@digium.com>
  3. Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
  4. This is free software, with components licensed under the GNU General Public
  5. License version 2 and other licenses; you are welcome to redistribute it under
  6. certain conditions. Type 'core show license' for details.
  7. =========================================================================
  8.   == Parsing '/opt/asterisk-1.8/etc/asterisk/asterisk.conf':   == Found
  9.   == Parsing '/opt/asterisk-1.8/etc/asterisk/extconfig.conf':   == Found
複製代碼

TOP

现在下载Asterisk 1.8.7.0 tar ball, 然后再重新recompile。

角色

TOP

  1. ./configure --prefix=/opt/asterisk-1.8.7.0 --build=arm-gnu-linux
複製代碼
  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 : arm
  26. configure: build-cpu:vendor:os: arm : gnu : linux-gnu :
  27. configure: host-cpu:vendor:os: arm : gnu : linux-gnu :
  28. [/opt/src/asterisk-1.8.7.0] #
複製代碼

TOP

make 也没有问题。
  1.    [AR] hash/hash.o hash/hash_bigkey.o hash/hash_buf.o hash/hash_func.o hash/hash_log2.o hash/hash_page.o hash/ndbm.o btree/bt_close.o btree/bt_conv.o btree/bt_debug.o btree/bt_delete.o btree/bt_get.o btree/bt_open.o btree/bt_overflow.o btree/bt_page.o btree/bt_put.o btree/bt_search.o btree/bt_seq.o btree/bt_split.o btree/bt_utils.o db/db.o mpool/mpool.o recno/rec_close.o recno/rec_delete.o recno/rec_get.o recno/rec_open.o recno/rec_put.o recno/rec_search.o recno/rec_seq.o recno/rec_utils.o -> libdb1.a
  2.    [LD] abstract_jb.o acl.o alaw.o aoc.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o audiohook.o autochan.o autoservice.o bridging.o callerid.o ccss.o cdr.o cel.o channel.o chanvars.o cli.o config.o data.o datastore.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o event.o features.o file.o fixedjitterbuf.o frame.o framehook.o fskmodem.o global_datastores.o hashtab.o heap.o http.o image.o indications.o io.o jitterbuf.o loader.o lock.o logger.o manager.o md5.o netsock.o netsock2.o pbx.o plc.o poll.o privacy.o rtp_engine.o say.o sched.o security_events.o sha1.o slinfactory.o srv.o ssl.o stdtime/localtime.o strcompat.o strings.o stun.o syslog.o taskprocessor.o tcptls.o tdd.o term.o test.o threadstorage.o timing.o translate.o udptl.o ulaw.o utils.o version.o xml.o xmldoc.o editline/libedit.a db1-ast/libdb1.a  -> asterisk
  3. Building Documentation For: channels pbx apps codecs formats cdr cel bridges funcs tests main res addons
  4. +--------- Asterisk Build Complete ---------+
  5. + Asterisk has successfully been built, and +
  6. + can be installed by running:              +
  7. +                                           +
  8. +                make install               +
  9. +-------------------------------------------+
  10. [/opt/src/asterisk-1.8.7.0] #
複製代碼

TOP

make install

再用下面方式运行Asterisk
  1. [/opt/asterisk-1.8.7.0] # /opt/asterisk-1.8.7.0/sbin/asterisk
  2. [/opt/asterisk-1.8.7.0] # /opt/asterisk-1.8.7.0/sbin/asterisk -rvvvvvvvvvvvvvvvv
  3. Asterisk 1.8.7.0, Copyright (C) 1999 - 2011 Digium, Inc. and others.
  4. Created by Mark Spencer <markster@digium.com>
  5. Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
  6. This is free software, with components licensed under the GNU General Public
  7. License version 2 and other licenses; you are welcome to redistribute it under
  8. certain conditions. Type 'core show license' for details.
  9. =========================================================================
  10.   == Parsing '/opt/asterisk-1.8.7.0/etc/asterisk/asterisk.conf':   == Found
  11.   == Parsing '/opt/asterisk-1.8.7.0/etc/asterisk/extconfig.conf':   == Found
  12. Connected to Asterisk 1.8.7.0 currently running on TWTS119 (pid = 23208)
  13. Verbosity was 0 and is now 16
  14. TWTS119*CLI>
複製代碼

TOP

返回列表