[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
Thu Jan 28 01:42:47 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: minor
Priority: normal
Status: new
Asterisk Version: 1.6.2.1
JIRA:
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-28 01:42 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!
======================================================================
----------------------------------------------------------------------
(0117286) wdoekes (reporter) - 2010-01-28 01:42
https://issues.asterisk.org/view.php?id=16723#c117286
----------------------------------------------------------------------
In trunk this was changed in sip.conf.sample:
r153983 | oej | 2008-11-03 19:02:14 +0100 (Mon, 03 Nov 2008) | 2 lines
+; * The type=friend is a device type that accepts both incoming and
outbound calls,
+; where Asterisk match on the From: username on incoming calls.
+; (A synonym for friend is "user"). This is a type you use for your
local
+; SIP phones.
-; type = user a device that authenticates to us by "from" field to
place calls
-; type = peer a device we place calls to or that calls us and we
match by host
-; type = friend two configurations (peer+user) in one
This distinction in the code you mention was later:
r169791 | mmichelson | 2009-01-21 22:53:55 +0100 (Wed, 21 Jan 2009) | 18
lines
if (!strcasecmp(v->value, "peer")) {
peer->type |= SIP_TYPE_PEER;
} else if (!strcasecmp(v->value, "user")) {
peer->type |= SIP_TYPE_USER;
} else if (!strcasecmp(v->value, "friend")) {
peer->type = SIP_TYPE_USER | SIP_TYPE_PEER;
}
That's odd :) It looks like a move to remove the user-type and then
re-adding it again.
I've personally only ever used/needed friends though. But then again, my
usage may be wrong(tm).
Issue History
Date Modified Username Field Change
======================================================================
2010-01-28 01:42 wdoekes Note Added: 0117286
======================================================================
More information about the asterisk-bugs
mailing list