Summary: | ASTERISK-11865: app_chanspy group broken in 1.4.19 | ||
Reporter: | Steve Rawlings (stever28) | Labels: | |
Date Opened: | 2008-04-16 16:52:31 | Date Closed: | 2008-04-18 17:59:10 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Applications/app_chanspy |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | CentOS 4.4, Asterisk 1.4.19, Zaptel 1.4.10, libpri 1.4.3, asterisk-addons 1.4.6. Since I upgraded from Asterisk 1.4.18.1 to 1.4.19 an active call with spygroup=2000 cannot be spied on with the dialplan as below, worked fine on 1.4.18.1. To try and prove chanspy is working at all, I have tried 'exten => 596,n,ChanSpy(|b)', this works but spies on all active calls which is not what is required when using spygroup. I've recompiled 1.4.19 with app_chanspy.c from 1.4.18.1 and I can now spy on active calls with spygroup=2000, I can step through active calls with * and new calls with spygroup=2000 become available. The dialplan has not changed between asterisk versions. ****** ADDITIONAL INFORMATION ****** exten => _8X.,1,Set(SPYGROUP=2000) exten => _8X.,n,NoOp(${SPYGROUP}) exten => _8X.,n,Dial(Zap/g2/${EXTEN:1}) exten => _8X.,n,Congestion exten => _8X.,n,Busy exten => 596,1,ringing exten => 596,n,Wait(1) exten => 596,n,ChanSpy(|g(2000)) exten => 596,n,Hangup | ||
Comments: | By: Mark Michelson (mmichelson) 2008-04-17 10:27:32 I can confirm this change in behavior between 1.4.18 and the lastest 1.4 SVN revision. I will work on finding out why that's the case and getting it corrected. Thanks for filing this bug report! By: Mark Michelson (mmichelson) 2008-04-17 12:06:33 Okay, I found the source of the problem, and that is that part of the changes that were meant to prevent crashes involved setting a pointer to NULL. Setting this to NULL essentially made iterating through the list of channels useless because instead of moving on to the next channel, we would always get the first channel in the list. I'll have a fix for this soon. By: Digium Subversion (svnbot) 2008-04-17 15:58:16 Repository: asterisk Revision: 114226 U branches/1.4/apps/app_chanspy.c ------------------------------------------------------------------------ r114226 | mmichelson | 2008-04-17 15:58:15 -0500 (Thu, 17 Apr 2008) | 9 lines Declaration of the peer channel in this scope was making it so the peer variable defined in the outer scope was never set properly, therefore making iterating through the channel list always restart from the beginning. This bug would have affected anyone who called chanspy without specifying a first argument. (closes issue ASTERISK-11865) Reported by: stever28 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=114226 By: Digium Subversion (svnbot) 2008-04-17 15:59:40 Repository: asterisk Revision: 114227 _U trunk/ U trunk/apps/app_chanspy.c ------------------------------------------------------------------------ r114227 | mmichelson | 2008-04-17 15:59:40 -0500 (Thu, 17 Apr 2008) | 17 lines Merged revisions 114226 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114226 | mmichelson | 2008-04-17 16:03:29 -0500 (Thu, 17 Apr 2008) | 9 lines Declaration of the peer channel in this scope was making it so the peer variable defined in the outer scope was never set properly, therefore making iterating through the channel list always restart from the beginning. This bug would have affected anyone who called chanspy without specifying a first argument. (closes issue ASTERISK-11865) Reported by: stever28 ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=114227 By: Digium Subversion (svnbot) 2008-04-17 16:00:16 Repository: asterisk Revision: 114228 _U branches/1.6.0/ U branches/1.6.0/apps/app_chanspy.c ------------------------------------------------------------------------ r114228 | mmichelson | 2008-04-17 16:00:15 -0500 (Thu, 17 Apr 2008) | 25 lines Merged revisions 114227 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r114227 | mmichelson | 2008-04-17 16:04:40 -0500 (Thu, 17 Apr 2008) | 17 lines Merged revisions 114226 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r114226 | mmichelson | 2008-04-17 16:03:29 -0500 (Thu, 17 Apr 2008) | 9 lines Declaration of the peer channel in this scope was making it so the peer variable defined in the outer scope was never set properly, therefore making iterating through the channel list always restart from the beginning. This bug would have affected anyone who called chanspy without specifying a first argument. (closes issue ASTERISK-11865) Reported by: stever28 ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=114228 By: Digium Subversion (svnbot) 2008-04-18 17:59:10 Repository: asterisk Revision: 114289 A team/seanbright/resolve-shadow-warnings/ ------------------------------------------------------------------------ r114289 | seanbright | 2008-04-18 17:59:08 -0500 (Fri, 18 Apr 2008) | 4 lines Branch to work on cleaning up all of the warnings generated by enabling GCC's -Wshadow option. Hopefully it will help to stem the type of bug we saw with issue ASTERISK-11865. ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=114289 |