Summary: | ASTERISK-14749: [patch] SoftHangup() incorrectly truncates multi-hyphen channel names | ||
Reporter: | Dwayne Hubbard (dhubbard) | Labels: | |
Date Opened: | 2009-09-01 17:37:09 | Date Closed: | 2009-09-01 20:50:38 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_softhangup |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) dw-softhangup-1.4.patch | |
Description: | The SoftHangup application assumes that a channel name will only have one hyphen in it (ala Foo/Bar-Z) and cuts the channel name at the first hyphen. The dialplan snippet in the Additional Information section will result in an incorrectly cut channel name: [Sep 1 17:07:03] NOTICE[1355]: app_softhangup.c:81 softhangup_exec: before cut: 'Local/my-multi-hyphen@default-56a3,2' [Sep 1 17:07:03] NOTICE[1355]: app_softhangup.c:93 softhangup_exec: after cut: 'Local/my' SoftHangup should start at the end of the string and cut the channel name at the last hyphen. This bug affects all versions of Asterisk. ****** ADDITIONAL INFORMATION ****** exten => 9998,1,Answer() exten => 9998,n,Dial(Local/my-multi-hyphen,30,r) exten => my-multi-hyphen,1,Answer() exten => my-multi-hyphen,n,SoftHangup(Local|a) exten => my-multi-hyphen,n,Echo() | ||
Comments: | By: Digium Subversion (svnbot) 2009-09-01 18:05:36 Repository: asterisk Revision: 215270 U branches/1.4/apps/app_softhangup.c ------------------------------------------------------------------------ r215270 | dhubbard | 2009-09-01 18:05:35 -0500 (Tue, 01 Sep 2009) | 12 lines Use strrchr() so SoftHangup will correctly truncate multi-hyphen channel names In general channel names are in the form Foo/Bar-Z, but the channel name could have multiple hyphens and look like Foo/B-a-r-Z. Use strrchr to truncate the channel name at the last hyphen. (closes issue ASTERISK-14749) Reported by: dhubbard Patches: dw-softhangup-1.4.patch uploaded by dhubbard (license 733) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=215270 By: Digium Subversion (svnbot) 2009-09-01 20:17:43 Repository: asterisk Revision: 215338 _U trunk/ U trunk/apps/app_softhangup.c ------------------------------------------------------------------------ r215338 | dhubbard | 2009-09-01 20:17:43 -0500 (Tue, 01 Sep 2009) | 18 lines Merged revisions 215270 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r215270 | dhubbard | 2009-09-01 18:04:52 -0500 (Tue, 01 Sep 2009) | 12 lines Use strrchr() so SoftHangup will correctly truncate multi-hyphen channel names In general channel names are in the form Foo/Bar-Z, but the channel name could have multiple hyphens and look like Foo/B-a-r-Z. Use strrchr to truncate the channel name at the last hyphen. (closes issue ASTERISK-14749) Reported by: dhubbard Patches: dw-softhangup-1.4.patch uploaded by dhubbard (license 733) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=215338 By: Digium Subversion (svnbot) 2009-09-01 20:21:56 Repository: asterisk Revision: 215352 _U branches/1.6.0/ U branches/1.6.0/apps/app_softhangup.c ------------------------------------------------------------------------ r215352 | dhubbard | 2009-09-01 20:21:56 -0500 (Tue, 01 Sep 2009) | 25 lines Merged revisions 215338 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r215338 | dhubbard | 2009-09-01 20:16:59 -0500 (Tue, 01 Sep 2009) | 18 lines Merged revisions 215270 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r215270 | dhubbard | 2009-09-01 18:04:52 -0500 (Tue, 01 Sep 2009) | 12 lines Use strrchr() so SoftHangup will correctly truncate multi-hyphen channel names In general channel names are in the form Foo/Bar-Z, but the channel name could have multiple hyphens and look like Foo/B-a-r-Z. Use strrchr to truncate the channel name at the last hyphen. (closes issue ASTERISK-14749) Reported by: dhubbard Patches: dw-softhangup-1.4.patch uploaded by dhubbard (license 733) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=215352 By: Digium Subversion (svnbot) 2009-09-01 20:37:35 Repository: asterisk Revision: 215375 _U branches/1.6.1/ U branches/1.6.1/apps/app_softhangup.c ------------------------------------------------------------------------ r215375 | dhubbard | 2009-09-01 20:37:35 -0500 (Tue, 01 Sep 2009) | 25 lines Merged revisions 215338 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r215338 | dhubbard | 2009-09-01 20:16:59 -0500 (Tue, 01 Sep 2009) | 18 lines Merged revisions 215270 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r215270 | dhubbard | 2009-09-01 18:04:52 -0500 (Tue, 01 Sep 2009) | 12 lines Use strrchr() so SoftHangup will correctly truncate multi-hyphen channel names In general channel names are in the form Foo/Bar-Z, but the channel name could have multiple hyphens and look like Foo/B-a-r-Z. Use strrchr to truncate the channel name at the last hyphen. (closes issue ASTERISK-14749) Reported by: dhubbard Patches: dw-softhangup-1.4.patch uploaded by dhubbard (license 733) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=215375 By: Digium Subversion (svnbot) 2009-09-01 20:50:38 Repository: asterisk Revision: 215376 _U branches/1.6.2/ U branches/1.6.2/apps/app_softhangup.c ------------------------------------------------------------------------ r215376 | dhubbard | 2009-09-01 20:50:37 -0500 (Tue, 01 Sep 2009) | 25 lines Merged revisions 215338 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r215338 | dhubbard | 2009-09-01 20:16:59 -0500 (Tue, 01 Sep 2009) | 18 lines Merged revisions 215270 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r215270 | dhubbard | 2009-09-01 18:04:52 -0500 (Tue, 01 Sep 2009) | 12 lines Use strrchr() so SoftHangup will correctly truncate multi-hyphen channel names In general channel names are in the form Foo/Bar-Z, but the channel name could have multiple hyphens and look like Foo/B-a-r-Z. Use strrchr to truncate the channel name at the last hyphen. (closes issue ASTERISK-14749) Reported by: dhubbard Patches: dw-softhangup-1.4.patch uploaded by dhubbard (license 733) ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=215376 |