[asterisk-bugs] [Asterisk 0016723]: type=user and type=friend are no longer the same for chan_sip

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jan 29 02:03:28 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16723 
====================================================================== 
Reported By:                yarique
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16723
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   text
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.2.1 
JIRA:                       SWP-816 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-01-27 22:08 CST
Last Modified:              2010-01-29 02:03 CST
====================================================================== 
Summary:                    type=user and type=friend are no longer the same for
chan_sip
Description: 
The comments in sip.conf as well as various on-line pages suggest that node
types "user" and "friend" are synonyms for chan_sip.  However, since SVN
rev 169791 they are treated differently.  In particular, a user node will
not get the SIP_TYPE_PEER flag, which makes it impossible for it to
REGISTER with chan_sip:
  
chan_sip.c: Registration from '"foo" <sip:foo at example.org>' failed for
'192.0.2.101' - No matching peer found

As soon as the node type is changed to friend, it can register OK.

Perhaps this needs clarification.  Thanks!
====================================================================== 

---------------------------------------------------------------------- 
 (0117357) oej (manager) - 2010-01-29 02:03
 https://issues.asterisk.org/view.php?id=16723#c117357 
---------------------------------------------------------------------- 
Type=user and type=friend has never been the same and it has never been the
intention with any patch whatsoever. 

THe change was that type=friend and type=peer was now equal. 

- User objects have been and still are only used for inbound calls. No
registration, not outbound calls.
- Peer objects are for outbound calls in IAX2 and SIP. In SIP we add
inbound calls, matched on port/ip.
- Friend is not an object at all. It's just a shorthand to say "create a
user and a peer with the same name, please". A type=friend will show up in
both "sip show users" and "sip show peers".

This is documented in many places already, but we can surely add to it.

In the process of removing the code structure for a user and replace it
with one code structure for all objects, there was a mistake done by me,
later fixed by other developers. Even though we changed the internals, the
configuration stays exactly the same. No changes made at all. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-29 02:03 oej            Note Added: 0117357                          
======================================================================




More information about the asterisk-bugs mailing list