本帖最後由 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).
我是這樣的:- type=peer
- defaultuser = 3xxxxxxhk
- fromuser = 3xxxxxxhk
- secret = 12345678
- host = s2hkbntel.net
- fromdomain = s2hkbntel.net
- canreinvite = no
- insecure = port,invite
- nat=yes
- port = 5060
- context = from-2bapp
- dtmfmode = auto
- disallow = all
- allow = ulaw
- allow = alaw
複製代碼 另外,codec 方面,為何把 g711u 跟 ulaw 兩者同時寫在一起呢? |