Summary: | ASTERISK-13701: [patch] SIP Attended Transfer fails | ||
Reporter: | klaus3000 (klaus3000) | Labels: | |
Date Opened: | 2009-03-05 11:10:42.000-0600 | Date Closed: | 2009-03-10 20:04:05 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Interoperability |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) attended-transfer-fails-trace-anonymized.txt ( 1) patch_chan_sip_attended_transfer_1.4.23.txt | |
Description: | Hi! The attended trasfer fails in the following scenario: PBX: Aterisk 1.4.23 Extensions: 1, 2 and 3 Extension 2 call extension 1. Extension 1 puts extension 2 on hold. Extension 1 calls extension 3. Extension 1 put extensions 3 on hold. Extension 1 refers extension 3 to extension 2 --> Asterisk sends NOTIFY with message/sipfrag: SIP/2.0 481 Call leg/transaction does not exist and the transfer fails. The failure happens only if the REFER is sent to extension 3. If extensions 1 refers extension 2 to extension 3, then everything works fine. I have tested with recent SNOM and eyebeam clients - same result, transfer does not work. ****** ADDITIONAL INFORMATION ****** see attached trace | ||
Comments: | By: klaus3000 (klaus3000) 2009-03-06 04:15:58.000-0600 one more: the attended transfer always fails if the call which is "replaced" is an incoming call. e.g. if extenxion 1 receives call from 2 and 3. If the extensions 1 wants to transfer 2 to 3 or transfer 3 to 2 it always fails. if extensions 1 calls extension 2 and 3, then the transfer always works. By: klaus3000 (klaus3000) 2009-03-06 07:08:19.000-0600 Attached patch fixes the bug. The problem is that Asterisk changed compared wrong tags for outgoing calls. This is wrong, as the RFC states: > In other words, the to-tag parameter is compared to the local > tag, and the from-tag parameter is compared to the remote tag. There is no difference if a call is incoming or outgoing - the local tag should always be compared to the to-tag. Trunk also uses the wrong logic and needs to be fixed. btw: attended transfer tested and works now fine in all scenarios (incoming, outgoing calls) with eyebeam and SNOM phones. By: Mark Michelson (mmichelson) 2009-03-09 09:44:10 You haven't mentioned this explicitly, but does the failure only occur with pedantic mode enabled? The patch you have submitted seems to only affect processing with pedantic mode enabled. By the way, I really like the patch, especially the citation of RFC 3891. If you can confirm that the failure does not occur if you do not have pedantic mode enabled, then I think this patch should go in as soon as possible. Thanks! By: klaus3000 (klaus3000) 2009-03-09 18:38:45 You are correct - this patch affects only pedantic mode. With pedantic mode turned off, the tags are not checked at all (at least in 1.4, I have not reviewed 1.6 and trunk). That's probably the reason why this bug is there since long time - most users do not use pedantic mode (probably they do not even know that it exists). PS: Please remove pedantic=no :-) By: Digium Subversion (svnbot) 2009-03-10 19:30:27 Repository: asterisk Revision: 181029 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r181029 | mmichelson | 2009-03-10 19:30:26 -0500 (Tue, 10 Mar 2009) | 9 lines Fix incorrect tag checking on transfers when pedantic=yes is enabled. (closes issue ASTERISK-13701) Reported by: klaus3000 Patches: patch_chan_sip_attended_transfer_1.4.23.txt uploaded by klaus3000 (license 65) Tested by: klaus3000 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=181029 By: Digium Subversion (svnbot) 2009-03-10 19:46:48 Repository: asterisk Revision: 181032 _U trunk/ U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r181032 | mmichelson | 2009-03-10 19:46:48 -0500 (Tue, 10 Mar 2009) | 19 lines Merged revisions 181029,181031 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181029 | mmichelson | 2009-03-10 19:30:26 -0500 (Tue, 10 Mar 2009) | 9 lines Fix incorrect tag checking on transfers when pedantic=yes is enabled. (closes issue ASTERISK-13701) Reported by: klaus3000 Patches: patch_chan_sip_attended_transfer_1.4.23.txt uploaded by klaus3000 (license 65) Tested by: klaus3000 ........ r181031 | mmichelson | 2009-03-10 19:32:40 -0500 (Tue, 10 Mar 2009) | 3 lines Remove unused variables. ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=181032 By: Digium Subversion (svnbot) 2009-03-10 19:52:23 Repository: asterisk Revision: 181034 _U branches/1.6.0/ U branches/1.6.0/channels/chan_sip.c ------------------------------------------------------------------------ r181034 | mmichelson | 2009-03-10 19:52:23 -0500 (Tue, 10 Mar 2009) | 30 lines Merged revisions 181032-181033 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r181032 | mmichelson | 2009-03-10 19:46:47 -0500 (Tue, 10 Mar 2009) | 19 lines Merged revisions 181029,181031 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181029 | mmichelson | 2009-03-10 19:30:26 -0500 (Tue, 10 Mar 2009) | 9 lines Fix incorrect tag checking on transfers when pedantic=yes is enabled. (closes issue ASTERISK-13701) Reported by: klaus3000 Patches: patch_chan_sip_attended_transfer_1.4.23.txt uploaded by klaus3000 (license 65) Tested by: klaus3000 ........ r181031 | mmichelson | 2009-03-10 19:32:40 -0500 (Tue, 10 Mar 2009) | 3 lines Remove unused variables. ........ ................ r181033 | mmichelson | 2009-03-10 19:49:00 -0500 (Tue, 10 Mar 2009) | 3 lines Add missing comment that quotes RFC 3891 ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=181034 By: Digium Subversion (svnbot) 2009-03-10 20:04:04 Repository: asterisk Revision: 181035 _U branches/1.6.1/ U branches/1.6.1/channels/chan_sip.c ------------------------------------------------------------------------ r181035 | mmichelson | 2009-03-10 20:04:04 -0500 (Tue, 10 Mar 2009) | 30 lines Merged revisions 181032-181033 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r181032 | mmichelson | 2009-03-10 19:46:47 -0500 (Tue, 10 Mar 2009) | 19 lines Merged revisions 181029,181031 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181029 | mmichelson | 2009-03-10 19:30:26 -0500 (Tue, 10 Mar 2009) | 9 lines Fix incorrect tag checking on transfers when pedantic=yes is enabled. (closes issue ASTERISK-13701) Reported by: klaus3000 Patches: patch_chan_sip_attended_transfer_1.4.23.txt uploaded by klaus3000 (license 65) Tested by: klaus3000 ........ r181031 | mmichelson | 2009-03-10 19:32:40 -0500 (Tue, 10 Mar 2009) | 3 lines Remove unused variables. ........ ................ r181033 | mmichelson | 2009-03-10 19:49:00 -0500 (Tue, 10 Mar 2009) | 3 lines Add missing comment that quotes RFC 3891 ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=181035 |