[asterisk-bugs] [Asterisk 0013783]: Cannot register with sip providers that require '@' in the username
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Dec 2 16:00:17 CST 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13783
======================================================================
Reported By: navkumar
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 13783
Category: Channels/chan_sip/Registration
Reproducibility: always
Severity: major
Priority: normal
Status: new
Asterisk Version: 1.4.22
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-10-25 12:44 CDT
Last Modified: 2008-12-02 16:00 CST
======================================================================
Summary: Cannot register with sip providers that require '@'
in the username
Description:
With 1.4.22, you cannot have a registration line like the following:
register=>7123231 at sip.host.com:1234223:7123231 at sip.proxy.net/7123231
I believe there was an issue (http://bugs.digium.com/view.php?id=13570) where a
patch was committed to not
allowing 'reserved' characters; however, looking at the patch and the svn
diff, I saw that it must have guessed the first '@' is reserved; however,
this registration is perfectly valid for many sip providers. It is how you
register with particular sip hosts using a full URI instead of using a
simple host name, as well as how you register through outbound proxies.
This kind of register line is absolutely necessary though several sip
providers.
======================================================================
----------------------------------------------------------------------
(0095687) jamessan (reporter) - 2008-12-02 16:00
http://bugs.digium.com/view.php?id=13783#c95687
----------------------------------------------------------------------
This is actually a problem introduced by mis-use of the
ast_string_field_set macro. In chan_sip.c:transmit_register there is the
following line of code:
ast_string_field_set(p, fromdomain, ++fromdomain);
The body of the macro uses the 3rd argument (in this case "++fromdomain")
in multiple places, thus causing the pointer to be incremented multiple
times.
The attached stringfields.diff changes both ast_string_field_index_set and
ast_string_field_index_logset to assign the data argument of the macro to a
new variable (__data__) in the macro body and then use that variable
instead.
Issue History
Date Modified Username Field Change
======================================================================
2008-12-02 16:00 jamessan Note Added: 0095687
======================================================================
More information about the asterisk-bugs
mailing list