Summary: | ASTERISK-16495: [patch] Encoded URI in a subscription does not work | ||
Reporter: | Ramon Peek-Fares (ramonpeek) | Labels: | |
Date Opened: | 2010-08-03 07:21:54 | Date Closed: | 2010-09-21 17:58:12 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Subscriptions |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20100831__issue17785.diff.txt ( 1) debug.txt | |
Description: | When a phone sends an encoded URI for an subscription the URI is not matched with the actual hint that is in decoded format. For example if I have an extension with a hint that is named: "ASTERISK-5453" or "*5601". The subscription will work fine if the phone subscribes with an already decoded URI, but when its decoded like "%255601" or "%2A5601" asterisk is unable to match it with the correct hint. Note: In the setup the option pedantic checking was set to "yes". | ||
Comments: | By: Ramon Peek-Fares (ramonpeek) 2010-08-03 07:23:58 See the attached debug.txt to see what is happening. Off course the hint for "&ASTERISK-31;5601" is existing: pbx*CLI> show hints -= Registered Asterisk Dial Plan Hints =- 406@subscriptions : SIP/406 State:Unavailable Watchers 1 422@subscriptions : SIP/422 State:Idle Watchers 1 407@subscriptions : SIP/407 State:Unavailable Watchers 0 452@subscriptions : Custom:452-state State:Unavailable Watchers 1 451@subscriptions : Custom:451-state State:Unavailable Watchers 1 &ASTERISK-31;5601@subscriptions : Custom:01-parkedcall State:Unavailable Watchers 0 By: Ramon Peek-Fares (ramonpeek) 2010-08-03 07:30:53 PS: I've already looked at the code and it seems that this needs fixing in a lot of places. Question is whether or not it's according to RFC2396. If you ask me; encoded URI's should be allowed in subscriptions too. By: Tilghman Lesher (tilghman) 2010-08-31 18:23:12 Patch uploaded against 1.4 SVN. By: Ramon Peek-Fares (ramonpeek) 2010-09-10 07:06:32 Tested the patch, it now works! Thanks! By: Digium Subversion (svnbot) 2010-09-21 16:58:15 Repository: asterisk Revision: 288112 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r288112 | tilghman | 2010-09-21 16:58:13 -0500 (Tue, 21 Sep 2010) | 15 lines Try both the encoded and unencoded subscription URI for a match in hints. When a phone sends an encoded URI for a subscription, the URI is not matched with the actual hint that is in decoded format. For example, if we have an extension with a hint that is named: "ASTERISK-5453" or "*5601", the subscription will work fine if the phone subscribes with an already decoded URI, but when it's decoded like "%255601" or "%2A5601", Asterisk is unable to match it with the correct hint. (closes issue ASTERISK-16495) Reported by: ramonpeek Patches: 20100831__issue17785.diff.txt uploaded by tilghman (license 14) Tested by: ramonpeek ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=288112 By: Digium Subversion (svnbot) 2010-09-21 16:59:48 Repository: asterisk Revision: 288113 _U branches/1.6.2/ U branches/1.6.2/channels/chan_sip.c ------------------------------------------------------------------------ r288113 | tilghman | 2010-09-21 16:59:47 -0500 (Tue, 21 Sep 2010) | 22 lines Merged revisions 288112 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r288112 | tilghman | 2010-09-21 16:58:13 -0500 (Tue, 21 Sep 2010) | 15 lines Try both the encoded and unencoded subscription URI for a match in hints. When a phone sends an encoded URI for a subscription, the URI is not matched with the actual hint that is in decoded format. For example, if we have an extension with a hint that is named: "ASTERISK-5453" or "*5601", the subscription will work fine if the phone subscribes with an already decoded URI, but when it's decoded like "%255601" or "%2A5601", Asterisk is unable to match it with the correct hint. (closes issue ASTERISK-16495) Reported by: ramonpeek Patches: 20100831__issue17785.diff.txt uploaded by tilghman (license 14) Tested by: ramonpeek ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=288113 By: Digium Subversion (svnbot) 2010-09-21 17:57:23 Repository: asterisk Revision: 288159 _U branches/1.8/ U branches/1.8/channels/chan_sip.c ------------------------------------------------------------------------ r288159 | tilghman | 2010-09-21 17:57:23 -0500 (Tue, 21 Sep 2010) | 29 lines Merged revisions 288113 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r288113 | tilghman | 2010-09-21 16:59:46 -0500 (Tue, 21 Sep 2010) | 22 lines Merged revisions 288112 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r288112 | tilghman | 2010-09-21 16:58:13 -0500 (Tue, 21 Sep 2010) | 15 lines Try both the encoded and unencoded subscription URI for a match in hints. When a phone sends an encoded URI for a subscription, the URI is not matched with the actual hint that is in decoded format. For example, if we have an extension with a hint that is named: "ASTERISK-5453" or "*5601", the subscription will work fine if the phone subscribes with an already decoded URI, but when it's decoded like "%255601" or "%2A5601", Asterisk is unable to match it with the correct hint. (closes issue ASTERISK-16495) Reported by: ramonpeek Patches: 20100831__issue17785.diff.txt uploaded by tilghman (license 14) Tested by: ramonpeek ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=288159 By: Digium Subversion (svnbot) 2010-09-21 17:58:11 Repository: asterisk Revision: 288160 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r288160 | tilghman | 2010-09-21 17:58:10 -0500 (Tue, 21 Sep 2010) | 36 lines Merged revisions 288159 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r288159 | tilghman | 2010-09-21 17:57:22 -0500 (Tue, 21 Sep 2010) | 29 lines Merged revisions 288113 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r288113 | tilghman | 2010-09-21 16:59:46 -0500 (Tue, 21 Sep 2010) | 22 lines Merged revisions 288112 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r288112 | tilghman | 2010-09-21 16:58:13 -0500 (Tue, 21 Sep 2010) | 15 lines Try both the encoded and unencoded subscription URI for a match in hints. When a phone sends an encoded URI for a subscription, the URI is not matched with the actual hint that is in decoded format. For example, if we have an extension with a hint that is named: "ASTERISK-5453" or "*5601", the subscription will work fine if the phone subscribes with an already decoded URI, but when it's decoded like "%255601" or "%2A5601", Asterisk is unable to match it with the correct hint. (closes issue ASTERISK-16495) Reported by: ramonpeek Patches: 20100831__issue17785.diff.txt uploaded by tilghman (license 14) Tested by: ramonpeek ........ ................ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=288160 |