返回列表 發帖
回復 11# 角色


   
基本上,我只要把Asterisk 1.4 的 sip.conf, extensions.conf 全盤copy 過去 Asterisk 1.8 就可以用了。 如果你是全APL 運作的話,users.conf 便無需用到的。users.conf 入面的extensions 資料,主要是你使用 GUI 介面時,由系統自動建立的。在APL裡建立extensions,跟Asterisk 1.4 完全無分別,統一放到sip.conf 便能完成。

TOP

sip.conf settings for Asterisk 1.8
  1. [general]
  2. ; Global Settings
  3. bindport = 5060                                        ; Port to bind to (SIP is 5060)
  4. bindaddr = 0.0.0.0                                        ; Bind all addresses on machine
  5. realm = asterisk
  6. useragent = myuseragent
  7. ;sdpsession = myuseragent
  8. allowguest = yes                                        ; Allow or reject guest calls ; set allowguest  =  no for security reason                         
  9. allowsubscribe = yes
  10. canreinvite = no
  11. insecure = port,invite
  12. srvlookup = yes
  13. ;qualifyfreq = 60
  14. ;qualifygap = 100
  15. ;qualifypeers = 1
  16. callevents = no
  17. ;allowexternalinvites = yes
  18. allowexternaldomains = yes
  19. alwaysauthreject = yes                        
  20. allowoverlap = no                                        ; Disable overlap dialing support (Default is yes)                     
  21. allowtransfer = yes                                        ; Disable all transfers                        
  22. videosupport = no
  23. callcounter = yes
  24. t38pt_udptl = yes,fec,maxdatagram = 400
  25. faxdetect = yes


  26. ; Network QoS Settings
  27. tos_sip = CS3                                        ; Sets TOS for SIP packets                    
  28. tos_audio = ef                                        ; Sets TOS for RTP audio packets.                             
  29. tos_video = AF41                                        ; Sets TOS for RTP video packets                                
  30. cos_sip = 3
  31. cos_audio = 5
  32. cos_video = 4
  33. cos_text = 3
  34. jbenable = no
  35. jbforce = no

  36. ; Network Settings
  37. externrefresh = 10
  38. externhost = your_ddns_name                                ; DDNS
  39. fromdomain = your_ddns_name                        ; Optional - force a particular domain        
  40. localnet = xxx.xxx.xxx.xxx/255.255.255.0                        ; Asterisk network address and mask           
  41. stunaddr =
  42. autodomain = no

  43. ; Global Signaling Settings
  44. disallow = all
  45. allow = ulaw
  46. allow = alaw
  47. allow = gsm                                                ; GSM needs low bandwidth than ulaw and alaw
  48. allow = g729
  49. allow = slin
  50. faxdetect = on
  51. rtptimeout = 60
  52. rtpholdtimeout = 300
  53. rtpkeepalive = 20                                               ; Send a keepalive ever 20 Seconds if using NAT
  54. maxexpiry = 3600                                        ; **Engin & BBP Global this if necessary
  55. minexpiry = 60                                       
  56. defaultexpiry = 240                                        ; **Engin users: include users: include this if necessary
  57. registerattempts = 0
  58. registertimeout = 20
  59. relaxdtmf = yes
  60. notifyringing = yes
  61. notifyhold = yes
  62. notifycid = yes
  63. pedantic = no
  64. progressinband = never
  65. promiscredir = no

  66. ; Default Settings
  67. nat = yes
  68. dtmfmode = rfc2833
  69. qualify = yes
  70. context = default                                        ; Send unknown SIP incoming callers to this context
  71. language = en
  72. musicclass = default
  73. mohinterpret = default
  74. mohsuggest = default


  75. [authentication]



  76. [my-settings](!)                                        ; template for the phones
  77. type = friend                                        ; is both peer (out) and user (in)
  78. qualify = yes
  79. nat = yes
  80. host = dynamic
  81. dtmfmode = auto
  82. allow = ulaw,alaw,gsm,g729,slin
  83. context = yourcontextname
  84. canreinvite = no                                        ; set "canreinvite = yes" for all internal extensions. This will let RTP directly flow from Line 1 or other ATA to PSTN without going through Asterisk, thus to minimize the delay
  85. insecure = port,invite
  86. port = 5060
  87. ;musiconhold = default
  88. ;musciclass = default
  89. ;deny=0.0.0.0/0.0.0.0
  90. ;permit=xxx.xxx.xxx/255.255.255.0


  91. [6001](my-settings)
  92. defaultuser = 6001
  93. secret = very_secret_code
  94. mailbox = 6001@default
  95. vmsecret = 6001
  96. dial = SIP/6001                                                       
  97. callerid = "who_is_who" <>
  98. ;accountcode =        
  99. ;callgroup = 1,3-4                                        ; members of groups 1,3 to 4
  100. ;pickupgroup = 1,2-4                                        ; member of "pickup" groups 1,2 to 4
  101. call-limit = 10
  102. musiconhold = default
  103. musciclass = default


  104. [6002](phone-settings)
  105. defaultuser = 6002
  106. secret = very_secret_code
  107. mailbox = 6002@default
  108. vmsecret = 6002
  109. dial = SIP/6002
  110. callerid = "who_am_i" <>
  111. ;accountcode =                        
  112. ;callgroup = 1,3-4                                        ; members of groups 1,3 to 4       
  113. ;pickupgroup = 1,2-4                                        ; member of "pickup" groups 1,2 to 4
  114. call-limit = 10
  115. musiconhold = friends
  116. musciclass = friends
複製代碼

TOP

No particular settings required for extensions.conf.  Just config as you do in Asterisk 1.4 or 1.6.

Some terms or names for creation of extension line in the file of sip.conf are different.  So, please pay special care for such changes.  For instance, user name is changed to defaultuser.  Insecure is now set as "port,invite" instead of "very" as that in Asterisk 1.4

TOP

簡單是美,高興聽到你能做到。

有關你原本不能成功的設定,可否貼上來讓大家分享一下原因呢? Thanks

TOP

回復 18# 角色


   
另外,你可以慢慢把insecure、qualify、 allow 之類的東西逐一加上去試試,那樣或者可以知道之前不能成功註冊的原因了。至樣最重要的 nat = yes 是不能缺少的了,你能否通過router跟外界順利通話,這個也是關鍵。

TOP

回復 21# ckleea


    I am flattered.  I think all of us are aiming at the same goal but just from different approach.

TOP

回復 25# 角色


    Congratulations! Welcome on board the Asterisk 1.8 and we are on the same track now.

TOP

Yes, template is very useful indeed.  So that why I choose to use it for extension creation.

TOP

返回列表