Summary: | ASTERISK-15575: SIP Message parameters and URI parameters not parsed correctly | ||
Reporter: | nick_lewis (nick_lewis) | Labels: | |
Date Opened: | 2010-02-04 03:22:08.000-0600 | Date Closed: | 2015-02-25 19:59:24.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Interoperability |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | In some cases abnf message-header params such as to-param, from-param etc and not correctly distinguished from abnf uri-params by chan_sip.c. When message-header params (such as ";tag=") are stripped off, the uri-params (such as ";transport=") are sometimes also stripped off (especially from unbracketed uris). ****** ADDITIONAL INFORMATION ****** In general it is not possible to correctly process message-header params before processing uris due to the nature of the abnf. The message-header params must therefore be left in place and the parse_uri function must return any residue that does not constitute part of the uri so that it can be processed by a message-header specific code. also the uri may contain headers after the uri-params so the parse_uri function needs to return these before the residue | ||
Comments: | By: nick_lewis (nick_lewis) 2010-02-04 03:50:22.000-0600 At the moment parse_uri only supports the uri-param ";transport=" . It could do with supporting ";user=", ";method=", ";ttl=", ";maddr=" and ";lr" as well. It should not strip arbitrary uri-params unless there are headers The parse_uri function could be simplified to parse from left to right The parse_uri function could unconditionally decode user and password (no decode required for domainlabel). The headers aggregate should remain encoded By: Leif Madsen (lmadsen) 2010-02-08 09:26:10.000-0600 I'd suggest this is a bit of a bug, and a bit of a feature request in the same. If we only support ;transport= right now, then the additional params would be a feature request. I'll leave it to a developer who much of a bug the rest of the parsing issue you've brought up is. Thanks! By: Matt Jordan (mjordan) 2015-02-25 19:58:57.631-0600 {{parse_uri_full}} now not only supports the parameters listed in the comment previous, it should also return the residue in the {{residue}} out parameter. By: Matt Jordan (mjordan) 2015-02-25 19:59:24.184-0600 Closing this out as "Fixed" (at some point in time). If there's a need for this to be re-opened, please comment here and I'll be happy to reopen it. |