[Home]

Summary:ASTERISK-14501: [patch] Register request line contains wrong address when domain and registrar host differ
Reporter:nick_lewis (nick_lewis)Labels:
Date Opened:2009-07-20 12:00:32Date Closed:2011-06-07 14:08:12
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Registration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_sip.c-registraraddr.patch
( 1) register_domain_fix_1.6.2
Description:If sip.conf contains a register string of the form []user@domain[]@host[] then the address in the sip register request line is the domain even though the request is sent to the host.

For example myself@sip.me.net@registrar.me.net results in
  REGISTER sip.me.net SIP/2.0
instead of
  REGISTER registrar.me.net SIP/2.0
Comments:By: nick_lewis (nick_lewis) 2009-08-19 03:05:39

Please find a trunk patch attached (qwell sorry blind as a bat me). In ASTERISK-13448 dvossel says the bug fix in this issue needs to go into every branch. If requested, I will try to find time to give assistance with this.

By: Digium Subversion (svnbot) 2009-08-21 17:22:45

Repository: asterisk
Revision: 213716

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r213716 | dvossel | 2009-08-21 17:22:45 -0500 (Fri, 21 Aug 2009) | 10 lines

Register request line contains wrong address when user domain and register host differ

(closes issue ASTERISK-14501)
Reported by: Nick_Lewis
Patches:
     chan_sip.c-registraraddr.patch uploaded by Nick (license 657)
     register_domain_fix_1.6.2 uploaded by dvossel (license 671)
Tested by: Nick_Lewis, dvossel


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=213716

By: Digium Subversion (svnbot) 2009-08-21 17:24:17

Repository: asterisk
Revision: 213721

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r213721 | dvossel | 2009-08-21 17:24:17 -0500 (Fri, 21 Aug 2009) | 16 lines

Merged revisions 213716 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r213716 | dvossel | 2009-08-21 17:22:11 -0500 (Fri, 21 Aug 2009) | 10 lines
 
 Register request line contains wrong address when user domain and register host differ
 
 (closes issue ASTERISK-14501)
 Reported by: Nick_Lewis
 Patches:
       chan_sip.c-registraraddr.patch uploaded by Nick (license 657)
       register_domain_fix_1.6.2 uploaded by dvossel (license 671)
 Tested by: Nick_Lewis, dvossel
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=213721

By: Digium Subversion (svnbot) 2009-08-21 17:25:21

Repository: asterisk
Revision: 213724

_U  branches/1.6.1/
U   branches/1.6.1/channels/chan_sip.c

------------------------------------------------------------------------
r213724 | dvossel | 2009-08-21 17:25:21 -0500 (Fri, 21 Aug 2009) | 16 lines

Merged revisions 213716 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r213716 | dvossel | 2009-08-21 17:22:11 -0500 (Fri, 21 Aug 2009) | 10 lines
 
 Register request line contains wrong address when user domain and register host differ
 
 (closes issue ASTERISK-14501)
 Reported by: Nick_Lewis
 Patches:
       chan_sip.c-registraraddr.patch uploaded by Nick (license 657)
       register_domain_fix_1.6.2 uploaded by dvossel (license 671)
 Tested by: Nick_Lewis, dvossel
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=213724

By: Digium Subversion (svnbot) 2009-08-21 17:26:15

Repository: asterisk
Revision: 213727

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_sip.c

------------------------------------------------------------------------
r213727 | dvossel | 2009-08-21 17:26:15 -0500 (Fri, 21 Aug 2009) | 16 lines

Merged revisions 213716 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r213716 | dvossel | 2009-08-21 17:22:11 -0500 (Fri, 21 Aug 2009) | 10 lines
 
 Register request line contains wrong address when user domain and register host differ
 
 (closes issue ASTERISK-14501)
 Reported by: Nick_Lewis
 Patches:
       chan_sip.c-registraraddr.patch uploaded by Nick (license 657)
       register_domain_fix_1.6.2 uploaded by dvossel (license 671)
 Tested by: Nick_Lewis, dvossel
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=213727

By: Digium Subversion (svnbot) 2009-12-15 12:43:09.000-0600

Repository: asterisk
Revision: 235132

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r235132 | dvossel | 2009-12-15 12:43:07 -0600 (Tue, 15 Dec 2009) | 14 lines

reverse minor sip registration regression

A registration regression caused by a code tweak in (issue ASTERISK-13448)
and a bug fix in (issue ASTERISK-14501) caused some sip registration
config entries to be constructed incorrectly.  Origially
issue ASTERISK-13448 contained the code tweak as well as a bug fix, but since
the issue was reported as a tweak the bug fix portion was moved into
issue ASTERISK-14501.  Both the tweak and the bug fix contained minor incorrect
logic that resulted in some SIP registrations to fail.

(issue ASTERISK-13448)
(issue ASTERISK-14501)


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235132

By: Digium Subversion (svnbot) 2009-12-15 12:44:19.000-0600

Repository: asterisk
Revision: 235133

_U  branches/1.6.2/

------------------------------------------------------------------------
r235133 | dvossel | 2009-12-15 12:44:18 -0600 (Tue, 15 Dec 2009) | 19 lines

Blocked revisions 235132 via svnmerge

........
 r235132 | dvossel | 2009-12-15 12:43:06 -0600 (Tue, 15 Dec 2009) | 14 lines
 
 reverse minor sip registration regression
 
 A registration regression caused by a code tweak in (issue ASTERISK-13448)
 and a bug fix in (issue ASTERISK-14501) caused some sip registration
 config entries to be constructed incorrectly.  Origially
 issue ASTERISK-13448 contained the code tweak as well as a bug fix, but since
 the issue was reported as a tweak the bug fix portion was moved into
 issue ASTERISK-14501.  Both the tweak and the bug fix contained minor incorrect
 logic that resulted in some SIP registrations to fail.
 
 (issue ASTERISK-13448)
 (issue ASTERISK-14501)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235133

By: Digium Subversion (svnbot) 2009-12-15 12:47:44.000-0600

Repository: asterisk
Revision: 235134

U   branches/1.6.2/channels/chan_sip.c

------------------------------------------------------------------------
r235134 | dvossel | 2009-12-15 12:47:43 -0600 (Tue, 15 Dec 2009) | 7 lines

reverses minor sip registration regression

reverses the changes caused by issue ASTERISK-14501. The
issue reported was expected behavior.

(issue ASTERISK-14501)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235134

By: Digium Subversion (svnbot) 2009-12-15 12:49:53.000-0600

Repository: asterisk
Revision: 235135

U   branches/1.6.1/channels/chan_sip.c

------------------------------------------------------------------------
r235135 | dvossel | 2009-12-15 12:49:53 -0600 (Tue, 15 Dec 2009) | 7 lines

reverses minor sip registration regression

reverses the changes caused by issue ASTERISK-14501. The
issue reported was expected behavior.

(issue ASTERISK-14501)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235135

By: Digium Subversion (svnbot) 2009-12-15 12:56:15.000-0600

Repository: asterisk
Revision: 235136

U   branches/1.6.0/channels/chan_sip.c

------------------------------------------------------------------------
r235136 | dvossel | 2009-12-15 12:56:15 -0600 (Tue, 15 Dec 2009) | 7 lines

reverses minor sip registration regression

reverses the changes caused by issue ASTERISK-14501. The
issue reported was expected behavior.

(issue ASTERISK-14501)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235136

By: Digium Subversion (svnbot) 2010-01-22 18:42:11.000-0600

Repository: asterisk
Revision: 242514

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_sip.c
U   branches/1.6.0/configs/sip.conf.sample

------------------------------------------------------------------------
r242514 | tilghman | 2010-01-22 18:42:09 -0600 (Fri, 22 Jan 2010) | 55 lines

Backporting register line parsing from trunk to fix a bad parsing error in 1.6.0.

(closes issue ASTERISK-15182)
Reported by: jamicque
Patches:
      20100114__issue16491.diff.txt uploaded by tilghman (license 14)
Tested by: jamicque

........
 r213098 | tilghman | 2009-08-19 16:05:17 -0500 (Wed, 19 Aug 2009) | 9 lines
 
 Better parsing for the "register" line
 Allows characters that are otherwise used as delimiters to be used within
 certain fields (like the secret).
 (closes issue ASTERISK-14045, closes issue ASTERISK-14612)
  Reported by: tilghman
  Patches:
        20090818__issue15008.diff.txt uploaded by tilghman (license 14)
  Tested by: lmadsen, tilghman
........
 r213635 | dvossel | 2009-08-21 16:02:50 -0500 (Fri, 21 Aug 2009) | 5 lines
 
 fixes sip register parsing when user@domain is used
 
 (issue ASTERISK-14045)
 (issue ASTERISK-14612)
........
 r215222 | tilghman | 2009-09-01 16:19:40 -0500 (Tue, 01 Sep 2009) | 3 lines
 
 Fix register such that lines with a transport string, but without an authuser, parse correctly.
 (AST-228)
........
 r215801 | tilghman | 2009-09-02 22:43:51 -0500 (Wed, 02 Sep 2009) | 5 lines
 
 Default the callback extension to "s".  This is a regression.
 (closes issue ASTERISK-14697)
  Reported by: elguero
  Change-type: bugfix
........
 r235132 | dvossel | 2009-12-15 12:43:06 -0600 (Tue, 15 Dec 2009) | 14 lines
 
 reverse minor sip registration regression
 
 A registration regression caused by a code tweak in (issue ASTERISK-13448)
 and a bug fix in (issue ASTERISK-14501) caused some sip registration
 config entries to be constructed incorrectly.  Origially
 issue ASTERISK-13448 contained the code tweak as well as a bug fix, but since
 the issue was reported as a tweak the bug fix portion was moved into
 issue ASTERISK-14501.  Both the tweak and the bug fix contained minor incorrect
 logic that resulted in some SIP registrations to fail.
 
 (issue ASTERISK-13448)
 (issue ASTERISK-14501)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=242514

By: nick_lewis (nick_lewis) 2010-01-25 05:47:21.000-0600

This bug has reappeared due to a code reversal



By: nick_lewis (nick_lewis) 2010-01-25 05:51:25.000-0600

The code reversal was carried out because of an unspecified "minor incorrect logic that resulted in some SIP registrations to fail"

What was the incorrect logic and could I please have an example of a registration string that fails as a result. I will then produce a patch that fixes the subject of this ticket without the adverse effect

By: David Vossel (dvossel) 2010-01-25 11:15:29.000-0600

The patch is the problem. What your patch fixes turns out to actually be expected behavior and broke some people's registrations.  I looked through the commit logs and that behavior was introduced as a feature.  I guess it makes it possible to represent more complex registrations.

Perhaps bring this up on the dev-list. If I remember correctly I believe OEJ introduced this in this commit. http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_sip.c?r1=126899&r2=126902

I'm closing this issue again, but feel free to re-open it again if you can figure out a way to get your patch in and make everyone else happy as well.  It would probably have to be a Trunk only fix unless some new ugly option is used to turn it on and off.  This must be a fairly common usage of the registration string because it broke boxes even within our test lab when we upgraded.