[asterisk-bugs] [Asterisk 0010113]: Record-Route fields are not copied when the response is 18x
noreply at bugs.digium.com
noreply at bugs.digium.com
Thu Aug 9 07:55:48 CDT 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=10113
======================================================================
Reported By: makoto
Assigned To: oej
======================================================================
Project: Asterisk
Issue ID: 10113
Category: Channels/chan_sip/General
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: 1.2.18
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: Yes
Request Review:
======================================================================
Date Submitted: 07-03-2007 23:47 CDT
Last Modified: 08-09-2007 07:55 CDT
======================================================================
Summary: Record-Route fields are not copied when the response
is 18x
Description:
In respprep function of chan_sip.c, Record-Route fields are copied
from the request to the response header when the response is 2xx.
But according to RFC 3261 (Table 3: Summary of header fields, P--Z),
Record-Route fields should be also copied when the response is 18x
and should not be copied when the request is REGISTER.
Header field where proxy ACK BYE CAN INV OPT REG
Record-Route R ar o o o o o -
Record-Route 2xx,18x mr - o o o o -
One of our partner said that there was a SIP server which this problem
affected.
======================================================================
----------------------------------------------------------------------
alienpenguin - 08-09-07 07:55
----------------------------------------------------------------------
Hi, I can confirm this behaviour affects asterisk 1.4.6 as well (it indeed
breaks some of our customer's set up).
I have a doubt, doesn't RFC 3261 states that even 1xx (not just 18x) need
to have the record route header copied?
However a patch as simple as the following one solves the issue:
--- chan_sip.c 2007-08-09 14:55:29.000000000 +0200
+++ chan_sip.c.new 2007-08-09 14:59:19.000000000 +0200
@@ -5636,7 +5636,8 @@
init_resp(resp, msg);
copy_via_headers(p, resp, req, "Via");
- if (msg[0] == '2')
+ /* Line below was patched to add record route to 1xx responses as
well */
+ if ( (msg[0] == '2') || (msg[0]=='1') )
copy_all_header(resp, req, "Record-Route");
copy_header(resp, req, "From");
ot = get_header(req, "To");
Issue History
Date Modified Username Field Change
======================================================================
08-09-07 07:55 alienpenguin Note Added: 0068653
======================================================================
More information about the asterisk-bugs
mailing list