Summary:ASTERISK-17763: sip.conf.sample incorrectly describes types (peer/user/friend)
Reporter:Tim Osman (obeliks)Labels:
Date Opened:2011-04-27 14:03:43Date Closed:2012-01-25 10:43:51.000-0600
Versions:1.8.3 Frequency of
is related toASTERISK-15537 type=user and type=friend are no longer the same for chan_sip
Description:Could we update sip.conf.sample with proper description of what exactly the difference between user and peer is? The current version also incorrectly suggests using type=friend for "local SIP phones". This results in confusion among users and software developers. E.g FreePBX uses type=friend for extensions for "historical reasons". To make things worse using friend/user allows extension enumeration w/INVITE packets. It would we nice if we could hear an updated story from the horse's mouth which would clear any perplexion that have been building  over the years.



Comments:By: Leif Madsen (lmadsen) 2011-04-27 14:16:03

Please provide a patch for the documentation and text you wish it to be changed to.

By: Leif Madsen (lmadsen) 2011-05-10 16:19:45

No response from reporter.

By: Tim Osman (obeliks) 2011-06-01 12:31:59

I think asking a random person to write the docs is a cop out. Asterisk SIP stack is a moving target. The docs need to come from someone with direct access to the development team if not developers themselves.

By: Leif Madsen (lmadsen) 2011-06-03 07:19:35

I don't understand what you want, and it seems like the reporter has a clearer understanding of what is "wrong".

type=user performs matching on the From head.
type=peer performs matching on the IP address.
type=friends is a combination of trying to match as a 'user' first, then as a 'peer' second.

Suggesting that the use of type=friend is incorrect, is wrong.

By: David Woolley (davidw) 2011-06-03 08:43:51

I think the problem is that distinction is not at all clear to the majority of users, with the result that an urban folklore has grown up which says that everything must be specified as type=friend, which often works, because over-specifying capabilities does often work.  (There is a similar urban folklore which says always use insecure=port,invite - both tend to result in less secure systems than need be.)  For most people these categories are matic incantations.

Unnecessarily using type=friend, sometimes causes confusing failures, when a user match actually happens in a context that needed an IP match, and introduces a vulnerability to searching for valid user names.

I think obeliks is asking for someone who fully understands all the nuances to write the description.

By: David Woolley (davidw) 2011-06-13 06:59:24.768-0500

type=peer performs matching on the IP address.

This is wrong for REGISTER, and that is the sort of subtlety that needs a lot of familiarity with the code; I had to read the code to discover this.

By: Tim Osman (obeliks) 2011-06-13 17:05:44.883-0500

{quote}I don't understand what you want{quote}
Apologies for not being clear in my initial request. All I want are clearly defined the 3 sip device types and when to use them. The current docs are severely lacking - to re-quote the link from the opening post:


By: Tim Osman (obeliks) 2011-06-15 12:23:42.438-0500

For a sample of the amount of confusion incorrect sip docs cause see another issue - ASTERISK-15537 or the wiki - https://wiki.asterisk.org/wiki/display/AST/Creating+SIP+Accounts

By: Jonathan Rose (jrose) 2012-01-25 10:43:52.002-0600

See related issue for fix.