返回列表 發帖

【角色茶桌】—— 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
複製代碼

回復 35# ckleea

With the settings allowguest = no, there is not much different. The whole system works fine.

YH

TOP

Perhaps, my router and asterisk security are set too high

TOP

回復 33# 角色


    I see this is one of the reasons that your 2b can go in. If you set it to NO, you will see the difference.

TOP

回復 32# ckleea

I did not set it at all.

YH

TOP

回復 26# 角色


    YH, what is your allowguest setting in sip.conf? Do you set it or use Yes?

TOP

I am trying to download the Asterisk 1.4.42 tar ball to my QNAP NAS for compilation and to see how it goes.

YH

TOP

本帖最後由 bubblestar 於 2011-10-15 12:44 編輯

YH, Congratulations for running both Asterisk 1.8 and Asterisk 1.4 parallel on the same machine of QNAP NAS.  It might or might not be a breakthrough but sure it is a very good try to manipulate and maximize the use of our limited resources. The test just made between you and me proved very successful.  Please keep this on and share with us what you have done.

Many thanks

TOP

回復 28# bubblestar

The time is correct
  1. [Oct 15 11:16:29] NOTICE[20130] chan_sip.c: Peer '2023' is now Reachable. (272ms / 2000ms)
  2. [Oct 15 11:26:11] NOTICE[20130] chan_sip.c: Peer '2023' is now Lagged. (3303ms / 2000ms)
  3. [Oct 15 11:26:22] NOTICE[20130] chan_sip.c: Peer '2023' is now Reachable. (273ms / 2000ms)
  4. [Oct 15 11:27:22] NOTICE[20130] chan_sip.c: Peer '2027' is now UNREACHABLE!  Last qualify: 1541
  5. [Oct 15 11:27:33] NOTICE[20130] chan_sip.c: Peer '2027' is now Reachable. (963ms / 2000ms)
  6. [Oct 15 11:39:07] NOTICE[20130] chan_sip.c: Peer '2023' is now Lagged. (2444ms / 2000ms)
  7. [Oct 15 11:39:18] NOTICE[20130] chan_sip.c: Peer '2023' is now Reachable. (624ms / 2000ms)
複製代碼

TOP

回復 24# 角色


   
How about the /var/log/Asterisk/messages? Is the time also correct?

TOP

My only difference is the hosts file, I can only register at S22, not s21

TOP

回復 25# ckleea

1. Put the following line to /etc/hosts
  1. 203.80.89.135   s2hkbntel.net s21.hkbntel.net
複製代碼
2. sip.conf
  1. [general]
  2. srvlookup=yes
  3. nat=yes
  4. realm=xxx.yyy.org
  5. externhost=xxx.yyy.org
  6. fromdomain=xxx.yyy.org
  7. localnet=192.168.1.0/255.255.255.0
  8. externrefresh = 1
  9. defaultexpirey=120
  10. bindport=5060
  11. qualify=yes
  12. disallow=all
  13. allow=ulaw,alaw,gsm
  14. alwaysauthreject=yes
  15. tos_sip=cs3
  16. tos_audio=ef
  17. tos_video=af41
  18. context=front-desk


  19. ;HKBN 2b
  20. register => 36112233hk:2b_password@s2hkbntel.net:5060/36112233


  21. [hkbn2b]
  22. type=peer
  23. username=36112233hk
  24. secret=2b_password
  25. port=5060
  26. host=s2hkbntel.net
  27. fromuser=36112233hk
  28. fromdomain=s2hkbntel.net
  29. canreinvite=no
  30. canredirect = no
  31. insecure=port,invite
  32. dtmfmode=auto
  33. context=from-hkbn
複製代碼
3. extensions.conf
  1. ;HK PSTN Gateway, with CID
  2. [trunk-hk-pstn-yh9]
  3. exten => _9XX.,1,Dial(SIP/${EXTEN:1}@hkbn2b,,r)


  4. ;HKBN 2b dial-in
  5. [from-hkbn]
  6. exten => 36112233,1,GotoIf($[${CALLERID(num)} = 96xxxyyy]?YH-call)
  7. exten => 36112233,n,GotoIf($[${CALLERID(num)} = 64xxxyyy]?Paul-call)

  8. exten => 36112233,n,Dial(SIP/2004,,)
  9. exten => 36112233,n,Hangup()

  10. exten => 36112233,n(YH-call),GoTo(internal,1130,1)
  11. exten => 36112233,n(Paul-call),Goto(internal-paul-ivr,1131,1);

  12. [internal]
  13. ;TW IVR
  14. exten => 1130,1,Answer
  15. exten => 1130,n,Wait(3)
  16. exten => 1130,n,Background(vm-enter-num-to-call)
  17. exten => 1130,n,WaitExten
  18. exten => 1130,n,Playback(vm-goodbye)
  19. exten => 1130,n,Hangup
  20. exten => i,1,Playback(pbx-invalid)
  21. exten => i,2,Goto(1130,1)
  22. exten => t,1,Playback(vm-goodbye)
  23. exten => t,2,n,Hangup

  24. [inter-paul-ivr]
  25. exten => _1,1,Dial(SIP/21xx,,)
  26. exten => _2,1,Dial(SIP/21yy,,)

  27. exten => 1131,1,Answer
  28. exten => 1131,n,Wait(3)
  29. exten => 1131,n,Background(vm-enter-num-to-call)
  30. exten => 1131,n,WaitExten
  31. exten => 1131,n,Playback(vm-goodbye)
  32. exten => 1131,n,Hangup
  33. exten => i,1,Playback(pbx-invalid)
  34. exten => i,2,Goto(1131,1)
  35. exten => t,1,Playback(vm-goodbye)
  36. exten => t,2,n,Hangup
複製代碼

TOP

回復 23# 角色


    Couldyou post your sip.conf [general] and hkbn2b setting again?

TOP

The date/time in cdr is incorrect, it use GMT in the cdr.conf. We have to modify accordingly.
  1. [csv]
  2. ;usegmtime=yes    ; log date/time in GMT.  Default is "no"
  3. usegmtime=no     ; YH 15-10-11
複製代碼
YH

TOP

There is some problem in recognising the incoming digit in the IVR. I do not know whether it comes w ...
角色 發表於 2011-10-15 07:35


I am sorry that I forward my ivr to an incorrect one. Now the ivr using HKBN 2b is fixed.

YH

TOP

返回列表