[asterisk-users] type=peer vs type=user (depricated?)
Rusty Newton
rnewton at digium.com
Thu Jan 23 19:01:17 CST 2014
On Wed, Jan 22, 2014 at 5:56 PM, Michelle Dupuis <mdupuis at ocg.ca> wrote:
> I'm looking at setting type=peer vs type=user (in both IAX and SIP conf
> entries), and I found a comment attributed to digium
> (http://www.voip-info.org/wiki/view/Asterisk+SIP+user+vs+peer) in 2005 that
> type=user is depricated and that we should only use type=peer
>
> Is that still correct? Will type=user be phased out, and should even new
> installs of older asterisk versions (eg: 1.6) use type=peer only?
>
> Are people still using type=user for phone sets? (and type=peer for
> upstream/trunks only)
Howdy!
This is always a confusing part of the chan_sip SIP channel driver.
Rather than try to dig into any history, here is the current
documentation (from sip.conf.sample in the Asterisk source of
1.8,11,12) that you should base your decision to use a particular
"type" on:
"; SIP entities have a 'type' which determines their roles within Asterisk.
; * For entities with 'type=peer':
; Peers handle both inbound and outbound calls and are matched by
ip/port, so for
; The case of incoming calls from the peer, the IP address must
match in order for
; The invitation to work. This means calls made from either
direction won't work if
; The peer is unregistered while host=dynamic or if the host is
otherise not set to
; the correct IP of the sender.
; * For entities with 'type=user':
; Asterisk users handle inbound calls only (meaning they call
Asterisk, Asterisk can't
; call them) and are matched by their authorization information
(authname and secret).
; Asterisk doesn't rely on their IP and will accept calls regardless
of the host setting
; as long as the incoming SIP invite authorizes successfully.
; * For entities with 'type=friend':
; Asterisk will create the entity as both a friend and a peer.
Asterisk will accept
; calls from friends like it would for users, requiring only that
the authorization
; matches rather than the IP address. Since it is also a peer, a
friend entity can
; be called as long as its IP is known to Asterisk. In the case of
host=dynamic,
; this means it is necessary for the entity to register before
Asterisk can call it."
Most new work for SIP support in Asterisk is happening around
res_pjsip[1][2]. I don't know that there is any plans to deprecate
type=user going forward in chan_sip.
> Is that still correct? Will type=user be phased out, and should even new
> installs of older asterisk versions (eg: 1.6) use type=peer only?
New installs of older Asterisk versions? That doesn't sound wise,
seeing as the 1.6 branch doesn't have any support, even for security
issues... A new install of Asterisk should be on a version of Asterisk
supported by the developers.[3] Right now, that would be the latest of
the 1.8,11, or 12 branches. That being said, 12 is rather new and has
many significant changes that should be considered.[3]
[1]: https://wiki.asterisk.org/wiki/display/AST/New+in+12
[2]: https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip
[3]: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions
Hope that helps, thanks!
--
Rusty Newton
Digium, Inc. | Community Support Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
direct: +1 256 428 6200
Check us out at: http://digium.com & http://asterisk.org
More information about the asterisk-users
mailing list