返回列表 發帖

【Raspberry Pi】——Asterisk + Asterisk-GUI using SVN method

本帖最後由 角色 於 2013-9-17 21:51 編輯

因为前一段时间比较忙,所以没有时间去compile Asterisk,而看了ckleea的帖子,又再触发我再学习Raspberry的念头。

参考帖子:
http://www.telecom-cafe.com/foru ... &extra=page%3D1


Raspberry Pi
http://www.raspbian.org


Raspberry Pi FAQ
http://www.raspbian.org/RaspbianFAQ


怎样shutdown
  1. /sbin/shutdown -h now
複製代碼

root@raspberrypi:/usr/src/asterisk/asterisk11# make install

CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts

make[1]: Entering directory `/usr/src/asterisk/asterisk11/menuselect'

make[1]: `makeopts' is up to date.

make[1]: Leaving directory `/usr/src/asterisk/asterisk11/menuselect'

   [LD] aelparse.o aelbison.o pbx_ael.o hashtab.o lock.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o -> aelparse

lock.o: In function `__ast_pthread_mutex_lock':

/usr/src/asterisk/asterisk11/utils/lock.c:216: undefined reference to `ast_bt_get_addresses'

lock.o: In function `__ast_pthread_mutex_trylock':

/usr/src/asterisk/asterisk11/utils/lock.c:356: undefined reference to `ast_bt_get_addresses'

lock.o: In function `__ast_rwlock_rdlock':

/usr/src/asterisk/asterisk11/utils/lock.c:870: undefined reference to `ast_bt_get_addresses'

lock.o: In function `__ast_rwlock_wrlock':

/usr/src/asterisk/asterisk11/utils/lock.c:997: undefined reference to `ast_bt_get_addresses'

lock.o: In function `__ast_rwlock_timedrdlock':

/usr/src/asterisk/asterisk11/utils/lock.c:1128: undefined reference to `ast_bt_get_addresses'

lock.o:/usr/src/asterisk/asterisk11/utils/lock.c:1239: more undefined references to `ast_bt_get_addresses' follow

collect2: ld returned 1 exit status

make[1]: *** [aelparse] Error 1

make: *** [utils] Error 2

root@raspberrypi:/usr/src/asterisk/asterisk11# make samples

Installing adsi config files...

/usr/bin/install -c -d "/etc/asterisk"

Installing configs/asterisk.adsi

Installing configs/telcordia-1.adsi

Installing other config files...

Installing file configs/acl.conf.sample

Installing file configs/adsi.conf.sample

Installing file configs/agents.conf.sample

Installing file configs/alarmreceiver.conf.sample

Installing file configs/alsa.conf.sample

Installing file configs/amd.conf.sample

Installing file configs/app_mysql.conf.sample

Installing file configs/app_skel.conf.sample

Installing file configs/asterisk.conf.sample

Installing file configs/calendar.conf.sample

Installing file configs/ccss.conf.sample

Installing file configs/cdr_adaptive_odbc.conf.sample

Installing file configs/cdr.conf.sample

Installing file configs/cdr_custom.conf.sample

Installing file configs/cdr_manager.conf.sample

Installing file configs/cdr_mysql.conf.sample

Installing file configs/cdr_odbc.conf.sample

Installing file configs/cdr_pgsql.conf.sample

Installing file configs/cdr_sqlite3_custom.conf.sample

Installing file configs/cdr_syslog.conf.sample

Installing file configs/cdr_tds.conf.sample

Installing file configs/cel.conf.sample

Installing file configs/cel_custom.conf.sample

Installing file configs/cel_odbc.conf.sample

Installing file configs/cel_pgsql.conf.sample

Installing file configs/cel_sqlite3_custom.conf.sample

Installing file configs/cel_tds.conf.sample

Installing file configs/chan_dahdi.conf.sample

Installing file configs/chan_mobile.conf.sample

Installing file configs/cli_aliases.conf.sample

Installing file configs/cli.conf.sample

Installing file configs/cli_permissions.conf.sample

Installing file configs/codecs.conf.sample

Installing file configs/confbridge.conf.sample

Installing file configs/config_test.conf.sample

Installing file configs/console.conf.sample

Installing file configs/dbsep.conf.sample

Installing file configs/dnsmgr.conf.sample

Installing file configs/dsp.conf.sample

Installing file configs/dundi.conf.sample

Installing file configs/enum.conf.sample

Installing file configs/extconfig.conf.sample

Installing file configs/extensions.ael.sample

Installing file configs/extensions.conf.sample

Installing file configs/extensions.lua.sample

Installing file configs/extensions_minivm.conf.sample

Installing file configs/features.conf.sample

Installing file configs/festival.conf.sample

Installing file configs/followme.conf.sample

Installing file configs/func_odbc.conf.sample

Installing file configs/gtalk.conf.sample

Installing file configs/h323.conf.sample

Installing file configs/http.conf.sample

Installing file configs/iax.conf.sample

Installing file configs/iaxprov.conf.sample

Installing file configs/indications.conf.sample

Installing file configs/jabber.conf.sample

Installing file configs/jingle.conf.sample

Installing file configs/logger.conf.sample

Installing file configs/manager.conf.sample

Installing file configs/meetme.conf.sample

Installing file configs/mgcp.conf.sample

Installing file configs/minivm.conf.sample

Installing file configs/misdn.conf.sample

Installing file configs/modules.conf.sample

Installing file configs/motif.conf.sample

Installing file configs/musiconhold.conf.sample

Installing file configs/muted.conf.sample

Installing file configs/ooh323.conf.sample

Installing file configs/osp.conf.sample

Installing file configs/oss.conf.sample

Installing file configs/phone.conf.sample

Installing file configs/phoneprov.conf.sample

Installing file configs/queuerules.conf.sample

Installing file configs/queues.conf.sample

Installing file configs/res_config_mysql.conf.sample

Installing file configs/res_config_sqlite3.conf.sample

Installing file configs/res_config_sqlite.conf.sample

Installing file configs/res_corosync.conf.sample

Installing file configs/res_curl.conf.sample

Installing file configs/res_fax.conf.sample

Installing file configs/res_ldap.conf.sample

Installing file configs/res_odbc.conf.sample

Installing file configs/res_pgsql.conf.sample

Installing file configs/res_pktccops.conf.sample

Installing file configs/res_snmp.conf.sample

Installing file configs/res_stun_monitor.conf.sample

Installing file configs/rtp.conf.sample

Installing file configs/say.conf.sample

Installing file configs/sip.conf.sample

Installing file configs/sip_notify.conf.sample

Installing file configs/skinny.conf.sample

Installing file configs/sla.conf.sample

Installing file configs/smdi.conf.sample

Installing file configs/udptl.conf.sample

Installing file configs/unistim.conf.sample

Installing file configs/users.conf.sample

Installing file configs/voicemail.conf.sample

Installing file configs/vpb.conf.sample

Installing file configs/xmpp.conf.sample

if [ "y" = "y" ]; then \

echo "Updating asterisk.conf" ; \

sed -e 's|^astetcdir.*$|astetcdir => /etc/asterisk|' \

-e 's|^astmoddir.*$|astmoddir => /usr/lib/asterisk/modules|' \

-e 's|^astvarlibdir.*$|astvarlibdir => /var/lib/asterisk|' \

-e 's|^astdbdir.*$|astdbdir => /var/lib/asterisk|' \

-e 's|^astkeydir.*$|astkeydir => /var/lib/asterisk|' \

-e 's|^astdatadir.*$|astdatadir => /var/lib/asterisk|' \

-e 's|^astagidir.*$|astagidir => /var/lib/asterisk/agi-bin|' \

-e 's|^astspooldir.*$|astspooldir => /var/spool/asterisk|' \

-e 's|^astrundir.*$|astrundir => /var/run/asterisk|' \

-e 's|^astlogdir.*$|astlogdir => /var/log/asterisk|' \

-e 's|^astsbindir.*$|astsbindir => /usr/sbin|' \

"/etc/asterisk/asterisk.conf" > "/etc/asterisk/asterisk.conf.tmp" ; \

/usr/bin/install -c -m 644 "/etc/asterisk/asterisk.conf.tmp" "/etc/asterisk/asterisk.conf" ; \

rm -f "/etc/asterisk/asterisk.conf.tmp" ; \

fi ; \

/usr/bin/install -c -d "/var/spool/asterisk/voicemail/default/1234/INBOX"

Updating asterisk.conf

build_tools/make_sample_voicemail "//var/lib/asterisk" "//var/spool/asterisk"

Installing file phoneprov/000000000000.cfg

/usr/bin/install: cannot create regular file `/var/lib/asterisk/phoneprov/000000000000.cfg': No such file or directory

Installing file phoneprov/000000000000-directory.xml

/usr/bin/install: cannot create regular file `/var/lib/asterisk/phoneprov/000000000000-directory.xml': No such file or directory

Installing file phoneprov/000000000000-phone.cfg

/usr/bin/install: cannot create regular file `/var/lib/asterisk/phoneprov/000000000000-phone.cfg': No such file or directory

Installing file phoneprov/polycom_line.xml

/usr/bin/install: cannot create regular file `/var/lib/asterisk/phoneprov/polycom_line.xml': No such file or directory

Installing file phoneprov/polycom.xml

/usr/bin/install: cannot create regular file `/var/lib/asterisk/phoneprov/polycom.xml': No such file or directory

Installing file phoneprov/snom-mac.xml

/usr/bin/install: cannot create regular file `/var/lib/asterisk/phoneprov/snom-mac.xml': No such file or directory

make: *** [samples] Error 1

root@raspberrypi:/usr/src/asterisk/asterisk11# /usr/sbin/asterisk

-bash: /usr/sbin/asterisk: No such file or directory

root@raspberrypi:/usr/src/asterisk/asterisk11# /usr/sbin/asterisk

-bash: /usr/sbin/asterisk: No such file or directory

root@raspberrypi:/usr/src/asterisk/asterisk11# cd..

-bash: cd..: command not found

root@raspberrypi:/usr/src/asterisk/asterisk11# cd..

-bash: cd..: command not found

root@raspberrypi:/usr/src/asterisk/asterisk11# cd/

-bash: cd/: No such file or directory

root@raspberrypi:/usr/src/asterisk/asterisk11# cd

root@raspberrypi:~# /usr/sbin/asterisk

-bash: /usr/sbin/asterisk: No such file or directory

root@raspberrypi:~#

TOP

入左“make“指令後,就一直出現問題,請問係咩事?

root@raspberrypi:/usr/src/asterisk/asterisk11# make

CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts

make[1]: Entering directory `/usr/src/asterisk/asterisk11/menuselect'

make[1]: `makeopts' is up to date.

make[1]: Leaving directory `/usr/src/asterisk/asterisk11/menuselect'

Generating embedded module rules ...

   [CC] astcanary.c -> astcanary.o

   [LD] astcanary.o -> astcanary

   [CC] astdb2sqlite3.c -> astdb2sqlite3.o

   [CC] hash/hash.c -> hash/hash.o

   [CC] hash/hash_bigkey.c -> hash/hash_bigkey.o

   [CC] hash/hash_buf.c -> hash/hash_buf.o

   [CC] hash/hash_func.c -> hash/hash_func.o

   [CC] hash/hash_log2.c -> hash/hash_log2.o

   [CC] hash/hash_page.c -> hash/hash_page.o

   [CC] hash/ndbm.c -> hash/ndbm.o

   [CC] btree/bt_close.c -> btree/bt_close.o

   [CC] btree/bt_conv.c -> btree/bt_conv.o

   [CC] btree/bt_debug.c -> btree/bt_debug.o

   [CC] btree/bt_delete.c -> btree/bt_delete.o

   [CC] btree/bt_get.c -> btree/bt_get.o

   [CC] btree/bt_open.c -> btree/bt_open.o

   [CC] btree/bt_overflow.c -> btree/bt_overflow.o

   [CC] btree/bt_page.c -> btree/bt_page.o

   [CC] btree/bt_put.c -> btree/bt_put.o

   [CC] btree/bt_search.c -> btree/bt_search.o

   [CC] btree/bt_seq.c -> btree/bt_seq.o

   [CC] btree/bt_split.c -> btree/bt_split.o

   [CC] btree/bt_utils.c -> btree/bt_utils.o

   [CC] db/db.c -> db/db.o

   [CC] mpool/mpool.c -> mpool/mpool.o

   [CC] recno/rec_close.c -> recno/rec_close.o

   [CC] recno/rec_delete.c -> recno/rec_delete.o

   [CC] recno/rec_get.c -> recno/rec_get.o

   [CC] recno/rec_open.c -> recno/rec_open.o

   [CC] recno/rec_put.c -> recno/rec_put.o

   [CC] recno/rec_search.c -> recno/rec_search.o

   [CC] recno/rec_seq.c -> recno/rec_seq.o

   [CC] recno/rec_utils.c -> recno/rec_utils.o

   [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

   [LD] astdb2sqlite3.o db1-ast/libdb1.a -> astdb2sqlite3

   [CC] astdb2bdb.c -> astdb2bdb.o

   [LD] astdb2bdb.o db1-ast/libdb1.a -> astdb2bdb

   [CP] res/ael/ael_lex.c -> aelparse.c

   [CC] aelparse.c -> aelparse.o

   [CP] res/ael/ael.tab.c -> aelbison.c

   [CC] aelbison.c -> aelbison.o

   [CP] pbx/pbx_ael.c -> pbx_ael.c

   [CC] pbx_ael.c -> pbx_ael.o

   [CP] main/hashtab.c -> hashtab.c

   [CC] hashtab.c -> hashtab.o

   [CP] main/lock.c -> lock.c

   [CC] lock.c -> lock.o

lock.c: In function ‘__ast_pthread_mutex_lock’:

lock.c:186:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

lock.c: In function ‘__ast_pthread_mutex_trylock’:

lock.c:326:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

lock.c: In function ‘__ast_pthread_mutex_unlock’:

lock.c:408:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

lock.c: In function ‘__ast_rwlock_unlock’:

lock.c:754:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

lock.c: In function ‘__ast_rwlock_rdlock’:

lock.c:840:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

lock.c: In function ‘__ast_rwlock_wrlock’:

lock.c:967:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

lock.c: In function ‘__ast_rwlock_timedrdlock’:

lock.c:1098:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

lock.c: In function ‘__ast_rwlock_timedwrlock’:

lock.c:1209:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

lock.c: In function ‘__ast_rwlock_tryrdlock’:

lock.c:1322:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

lock.c: In function ‘__ast_rwlock_trywrlock’:

lock.c:1400:17: warning: variable ‘bt’ set but not used [-Wunused-but-set-variable]

   [CC] ael_main.c -> ael_main.o

   [CP] main/ast_expr2f.c -> ast_expr2f.c

   [CC] ast_expr2f.c -> ast_expr2f.o

   [CP] main/ast_expr2.c -> ast_expr2.c

   [CC] ast_expr2.c -> ast_expr2.o

   [CP] main/strcompat.c -> strcompat.c

   [CC] strcompat.c -> strcompat.o

   [CP] res/ael/pval.c -> pval.c

   [CC] pval.c -> pval.o

   [CC] extconf.c -> extconf.o

   [LD] aelparse.o aelbison.o pbx_ael.o hashtab.o lock.o ael_main.o ast_expr2f.o ast_expr2.o strcompat.o pval.o extconf.o -> aelparse

lock.o: In function `__ast_pthread_mutex_lock':

/usr/src/asterisk/asterisk11/utils/lock.c:216: undefined reference to `ast_bt_get_addresses'

lock.o: In function `__ast_pthread_mutex_trylock':

/usr/src/asterisk/asterisk11/utils/lock.c:356: undefined reference to `ast_bt_get_addresses'

lock.o: In function `__ast_rwlock_rdlock':

/usr/src/asterisk/asterisk11/utils/lock.c:870: undefined reference to `ast_bt_get_addresses'

lock.o: In function `__ast_rwlock_wrlock':

/usr/src/asterisk/asterisk11/utils/lock.c:997: undefined reference to `ast_bt_get_addresses'

lock.o: In function `__ast_rwlock_timedrdlock':

/usr/src/asterisk/asterisk11/utils/lock.c:1128: undefined reference to `ast_bt_get_addresses'

lock.o:/usr/src/asterisk/asterisk11/utils/lock.c:1239: more undefined references to `ast_bt_get_addresses' follow

collect2: ld returned 1 exit status

make[1]: *** [aelparse] Error 1

make: *** [utils] Error 2

TOP

core show translation的结果,如下:

ulaw->alaw都要9ms,看来有些慢。我的QNAP TS-269 PRO是1ms以内。


1051.gif

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

备用帖子。

TOP

本帖最後由 角色 於 2013-9-15 15:39 編輯

ComNet Phone在Raspberry Pi Asterisk注册问题,可以参考
http://www.telecom-cafe.com/foru ... &extra=page%3D2

TOP

本帖最後由 角色 於 2013-9-15 10:02 編輯

由于我的Respberry Pi在启动取得10.0.88.31。在还没有进入网页,我们要restart asterisk server。

用浏览器(Chrome),输入下面地址:

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

1052a.gif

login name:admin
密码:admin

1052b.gif

1052c.gif

1052d.gif

TOP

本帖最後由 角色 於 2013-9-15 10:16 編輯

Asterisk-GUI安装
  1. ## Install Asterisk GUI
  2. cd /usr/src/asterisk
  3. svn checkout http://svn.digium.com/svn/asterisk-gui/branches/2.0/ gui
  4. cd gui
  5. ./configure
  6. make
  7. make install
複製代碼
下载source code,然后make,如果成功,大家可以看到:
  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/gui#
複製代碼
make install
  1. +---- Asterisk GUI Installation Complete ---+
  2. +                                           +
  3. +    YOU MUST READ THE SECURITY DOCUMENT    +
  4. +                                           +
  5. + Asterisk-GUI has successfully been        +
  6. + installed.                                +
  7. +                                           +
  8. +-------------------------------------------+
  9. +                                           +
  10. +          BEFORE THE GUI WILL WORK         +
  11. +                                           +
  12. + Before the GUI will run, you must perform +
  13. + some modifications to the Asterisk        +
  14. + configuration files in accordance with    +
  15. + the README file.  When done, you can      +
  16. + check your changes by doing:              +
  17. +                                           +
  18. +               make checkconfig            +
  19. +                                           +
  20. +-------------------------------------------+
複製代碼
我们先用make checkconfig,看看在没有修改前是有什么messages?
  1. root@raspberrypi:/usr/src/asterisk/gui# 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: FAILED
  6. -- Please be sure you have 'enabled = yes'
  7. -- in /etc/asterisk/http.conf
  8. make: *** [checkconfig] Error 1
複製代碼
有error message,怎样去修改呢?
  1. cd /etc/asterisk
複製代碼
然后修改 /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
複製代碼
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
複製代碼
然后cd /usr/src/asterisk/gui, make checkconfig
  1. --- Checking Asterisk configuration to see if it will support the GUI ---
  2. * Checking for http.conf: OK
  3. * Checking for manager.conf: OK
  4. * Checking if HTTP is enabled: OK
  5. * Checking if HTTP static support is enabled: OK
  6. * Checking if manager is enabled: OK
  7. * Checking if manager over HTTP is enabled: OK
  8. --- Everything looks good ---
  9. * GUI should be available at http://raspberrypi:8088/asterisk/static/config/index.html

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

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

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

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

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

TOP

返回列表