返回列表 發帖
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

After having tried many combinations, finally I got the simplest form in sip.conf in order to get one extension registered as follows:

sip.conf
  1. [2000]
  2. type = friend
  3. secret=2000
  4. qualify=yes
  5. host=dynamic
  6. context=internal
複製代碼

TOP

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

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

TOP

回復 18# 角色


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

TOP

Bubblestar Ching is particularly in doing various fine settings. I am a pioneer to test.

TOP

I am also in flavour to use IAX connection. Zoiper is my best friend

TOP

When I have time, I shall add more switches on it.

YH

TOP

There is another example to demonstrate the use of the sip.conf to set up the Asterisk server as follows:
  1. [2000]
  2. type = friend
  3. secret=2000
  4. nat=yes
  5. qualify=yes
  6. host=dynamic
  7. context=internal

  8. [2001]
  9. type = friend
  10. secret=2001
  11. nat=yes
  12. qualify=yes
  13. host=dynamic
  14. context=internal
複製代碼
Please note the parameter "nat", if nat=no, Zoiper is not got registrated; and if nat=yes, Zoiper is got registrated. Siemens DECT IP Phone can register regardless of the settings of the parameter "nat".

Therefore, it is better to set the parameter "nat=yes" would be better.

YH

TOP

I know the reason that I am not able to get registration. There is a type for the type, I typed it as typp rather the correct one type.

Once the word "typp" is replaced by "type", everything are working fine.

YH

TOP

回復 25# 角色

you are typing too fast with vi

TOP

Maybe.

YH

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

Yeah!

角色

TOP

返回列表