返回列表 發帖
本帖最後由 bubblestar 於 2012-7-14 14:02 編輯

User is a type you use for your local SIP phones.


As of Asterisk 1.2, there is no reason to actually use 'user' entries
any more at all
; you can use 'type=peer' for everything and the behavior
will be much more consistent.

All configuration options supported under 'type=user' are also
supported under 'type=peer'.

The difference between friend and peer is the same as defining _both_ a
user and peer, since that is what 'type=friend' does internally.

The only benefit of type=user is when you _want_ to match on username
regardless of IP the calls originate from. If the peer is registering to
you, you don't need it. If they are on a fixed IP, you don't need it.
'type=peer' is _never_ matched on username for incoming calls, only
matched on IP address/port number (unless you use insecure=port or higher).


我是這樣的:
  1. type=peer
  2. defaultuser = 3xxxxxxhk
  3. fromuser = 3xxxxxxhk
  4. secret = 12345678
  5. host = s2hkbntel.net
  6. fromdomain = s2hkbntel.net
  7. canreinvite = no
  8. insecure = port,invite
  9. nat=yes
  10. port = 5060
  11. context = from-2bapp
  12. dtmfmode = auto
  13. disallow = all
  14. allow = ulaw
  15. allow = alaw
複製代碼
另外,codec 方面,為何把 g711u 跟 ulaw 兩者同時寫在一起呢?

TOP

回復 4# lawleo


   
這個codec 的先後使用,我也是明白的。

可能我的問題有些語意不清吧,G711 有兩種版本,分別稱為 u-law 及 a-law。而一般configuration,我們大概都是用:

disallow=all
allow=ulaw
allow=alaw
allow=g729

之類這樣的方式表示,而g711u 就比較少,另外,g711u 不就等於是使用 G.711 u-law 嗎,所以兩者應是指同一Codec 吧,那麼,在樓主的configuration file 看,我覺得g711u 跟 ulaw 便不是互補,而是重複了,有錯請指正。

TOP

返回列表