[Home]

Summary:ASTERISK-11895: [patch] ChanSpy doesn't correctly move to the next channel when * is pressed
Reporter:Jared Smith (jsmith)Labels:
Date Opened:2008-04-22 16:52:55Date Closed:2008-04-25 07:11:53
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_chanspy
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_chanspy_channel_walk.trunk.patch
Description:According to the ChanSpy documentation, when the spying caller presses the * key, ChanSpy should stop spying on the current channel and move to the next channel in the list.  In my testing, ChanSpy doesn't do this.  It seems to get stuck on one channel and won't continue on to any other channels.

****** STEPS TO REPRODUCE ******

Here's my simply dialplan:

[testing]
exten => 123,1,Answer(200)
exten => 123,n,Set(SPYGROUP=foo:bar:blah)
exten => 123,n,MusicOnHold()

exten => 124,1,Answer(200)
exten => 124,n,ChanSpy(,g(blah))

I have three phones, which I'll call Linksys, Grandstream, and Polycom.  

Linksys calls extension 123, and hears hold music.
Grandstream calls extension 124, hears the word "SIP", and then spies on (hears) the music from the Linksys call.
Polycom calls extension 123, and hears hold music (a different song).
Grandstream presses *, hears the word "SIP", and then spies on the Polycom channel.  (You can tell it's the Polycom channel both by the CLI output and the different song.)
Grandstream presses * again, but it continues to spy on the Polycom channel, and no matter how many times you press the * key, it stays on the Polycom channel.

If I do the exact same test, but have the Polycom dial first, the spy can move from there to the Linksys channel, but then never back to the Polycom.  This would make me *assume* that it's getting stuck at the end of the list and never re-traversing the list, but that's just an assumption.

****** ADDITIONAL INFORMATION ******

I haven't tried this on anything earlier than trunk, but I will if you think it's useful to test on 1.4.
Comments:By: Jared Smith (jsmith) 2008-04-23 12:15:25

This bug is indeed there in the very latest 1.4 branch (from SVN) as well... I tested revision 114579.

By: Jared Smith (jsmith) 2008-04-23 14:03:25

I'm attaching a patch that fixes this problem.  The elimination of the line that sets waitms back to 5000 is a tad bit worrysome, but I can't find any reason it was being set to 5000 in the first place.

Oh, and my patch is probably a bit verbose (just to explain what I'm doing)... I'm not sure if the comments need to make their way into the Asterisk code, or if this could be a simple patch that deletes the two lines in question.

By: Digium Subversion (svnbot) 2008-04-23 15:44:11

Repository: asterisk
Revision: 114597

U   branches/1.4/apps/app_chanspy.c
U   branches/1.4/main/http.c

------------------------------------------------------------------------
r114597 | russell | 2008-04-23 15:44:08 -0500 (Wed, 23 Apr 2008) | 10 lines

Fix an issue that caused getting the correct next channel to not always work.
Also, remove setting the amount of time to wait for a digit from 5 seconds back
down to 1/10 of a second.  I believe this was so the beep didn't get played over
and over really fast, but a while back I put in another fix for that issue.

(closes issue ASTERISK-11895)
Reported by: jsmith
Patches:
     app_chanspy_channel_walk.trunk.patch uploaded by jsmith (license 15)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114597

By: Digium Subversion (svnbot) 2008-04-23 15:47:50

Repository: asterisk
Revision: 114598

_U  trunk/
U   trunk/apps/app_chanspy.c

------------------------------------------------------------------------
r114598 | russell | 2008-04-23 15:47:50 -0500 (Wed, 23 Apr 2008) | 18 lines

Merged revisions 114597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114597 | russell | 2008-04-23 15:49:18 -0500 (Wed, 23 Apr 2008) | 10 lines

Fix an issue that caused getting the correct next channel to not always work.
Also, remove setting the amount of time to wait for a digit from 5 seconds back
down to 1/10 of a second.  I believe this was so the beep didn't get played over
and over really fast, but a while back I put in another fix for that issue.

(closes issue ASTERISK-11895)
Reported by: jsmith
Patches:
     app_chanspy_channel_walk.trunk.patch uploaded by jsmith (license 15)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114598

By: Digium Subversion (svnbot) 2008-04-23 15:48:10

Repository: asterisk
Revision: 114599

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_chanspy.c

------------------------------------------------------------------------
r114599 | russell | 2008-04-23 15:48:09 -0500 (Wed, 23 Apr 2008) | 26 lines

Merged revisions 114598 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r114598 | russell | 2008-04-23 15:53:05 -0500 (Wed, 23 Apr 2008) | 18 lines

Merged revisions 114597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114597 | russell | 2008-04-23 15:49:18 -0500 (Wed, 23 Apr 2008) | 10 lines

Fix an issue that caused getting the correct next channel to not always work.
Also, remove setting the amount of time to wait for a digit from 5 seconds back
down to 1/10 of a second.  I believe this was so the beep didn't get played over
and over really fast, but a while back I put in another fix for that issue.

(closes issue ASTERISK-11895)
Reported by: jsmith
Patches:
     app_chanspy_channel_walk.trunk.patch uploaded by jsmith (license 15)

........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114599

By: Digium Subversion (svnbot) 2008-04-25 07:11:53

Repository: asterisk
Revision: 114643

_U  team/seanbright/resolve-shadow-warnings/
U   team/seanbright/resolve-shadow-warnings/apps/app_alarmreceiver.c
U   team/seanbright/resolve-shadow-warnings/apps/app_chanspy.c
U   team/seanbright/resolve-shadow-warnings/apps/app_dial.c
U   team/seanbright/resolve-shadow-warnings/apps/app_disa.c
U   team/seanbright/resolve-shadow-warnings/apps/app_externalivr.c
U   team/seanbright/resolve-shadow-warnings/apps/app_followme.c
U   team/seanbright/resolve-shadow-warnings/apps/app_meetme.c
U   team/seanbright/resolve-shadow-warnings/apps/app_queue.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_alsa.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_gtalk.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_h323.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_iax2.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_jingle.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_local.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_mgcp.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_misdn.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_oss.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_sip.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_skinny.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_unistim.c
U   team/seanbright/resolve-shadow-warnings/channels/chan_zap.c
U   team/seanbright/resolve-shadow-warnings/include/asterisk/channel.h
U   team/seanbright/resolve-shadow-warnings/include/asterisk/manager.h
U   team/seanbright/resolve-shadow-warnings/main/channel.c
U   team/seanbright/resolve-shadow-warnings/main/http.c
U   team/seanbright/resolve-shadow-warnings/main/manager.c
U   team/seanbright/resolve-shadow-warnings/res/res_musiconhold.c

------------------------------------------------------------------------
r114643 | seanbright | 2008-04-25 07:11:47 -0500 (Fri, 25 Apr 2008) | 263 lines

Merged revisions 114585,114588,114592,114595,114598,114601,114604,114606,114609,114612,114617,114622,114625,114629,114633,114635,114637 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r114585 | oej | 2008-04-23 12:53:34 -0400 (Wed, 23 Apr 2008) | 10 lines

Merged revisions 114584 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114584 | oej | 2008-04-23 18:51:41 +0200 (Ons, 23 Apr 2008) | 2 lines

Add 502 support for both directions, not only one...  (see r114571)

........

................
r114588 | russell | 2008-04-23 13:18:29 -0400 (Wed, 23 Apr 2008) | 10 lines

Merged revisions 114587 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114587 | russell | 2008-04-23 12:16:32 -0500 (Wed, 23 Apr 2008) | 2 lines

Fix find_callno_locked() to actually return the callno locked in some more cases.

........

................
r114592 | russell | 2008-04-23 14:01:00 -0400 (Wed, 23 Apr 2008) | 13 lines

Merged revisions 114591 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114591 | russell | 2008-04-23 12:55:31 -0500 (Wed, 23 Apr 2008) | 5 lines

Store the manager session ID explicitly as 4 byte ID instead of a ulong.  The
mansession_id cookie is coded to be limited to 8 characters of hex, and this
could break logins from 64-bit machines in some cases.
(inspired by AST-20)

........

................
r114595 | qwell | 2008-04-23 14:33:28 -0400 (Wed, 23 Apr 2008) | 16 lines

Merged revisions 114594 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114594 | qwell | 2008-04-23 13:28:44 -0500 (Wed, 23 Apr 2008) | 8 lines

Fix reload/unload for res_musiconhold module.

(closes issue ASTERISK-11060)
Reported by: sunder
Patches:
     M11575_14_rev3.diff uploaded by junky (license 177)
     bug11575_trunk.diff.txt uploaded by jamesgolovich (license 176)

........

................
r114598 | russell | 2008-04-23 16:53:05 -0400 (Wed, 23 Apr 2008) | 18 lines

Merged revisions 114597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114597 | russell | 2008-04-23 15:49:18 -0500 (Wed, 23 Apr 2008) | 10 lines

Fix an issue that caused getting the correct next channel to not always work.
Also, remove setting the amount of time to wait for a digit from 5 seconds back
down to 1/10 of a second.  I believe this was so the beep didn't get played over
and over really fast, but a while back I put in another fix for that issue.

(closes issue ASTERISK-11895)
Reported by: jsmith
Patches:
     app_chanspy_channel_walk.trunk.patch uploaded by jsmith (license 15)

........

................
r114601 | russell | 2008-04-23 18:53:20 -0400 (Wed, 23 Apr 2008) | 14 lines

Merged revisions 114600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114600 | russell | 2008-04-23 17:18:12 -0500 (Wed, 23 Apr 2008) | 6 lines

Improve some broken cookie parsing code.  Previously, manager login over HTTP
would only work if the mansession_id cookie was first.  Now, the code builds
a list of all of the cookies in the Cookie header.  This fixes a problem
observed by users of the Asterisk GUI.
(closes AST-20)

........

................
r114604 | russell | 2008-04-24 10:55:21 -0400 (Thu, 24 Apr 2008) | 3 lines

Change a verbose message to debug.
(closes issue ASTERISK-11911)

................
r114606 | oej | 2008-04-24 10:59:05 -0400 (Thu, 24 Apr 2008) | 11 lines

Merged revisions 114603 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114603 | oej | 2008-04-24 16:55:18 +0200 (Tor, 24 Apr 2008) | 3 lines

Only have one max-forwards header in outbound REFERs.
Discovered in the Asterisk SIP Masterclass in Orlando. Thanks Joe!

........

................
r114609 | russell | 2008-04-24 11:56:55 -0400 (Thu, 24 Apr 2008) | 12 lines

Merged revisions 114608 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114608 | russell | 2008-04-24 10:55:21 -0500 (Thu, 24 Apr 2008) | 4 lines

Fix a silly mistake in a change I made yesterday that caused chan_iax2 to blow
up very quickly.
(issue ASTERISK-11912)

........

................
r114612 | qwell | 2008-04-24 12:47:01 -0400 (Thu, 24 Apr 2008) | 17 lines

Merged revisions 51989 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue ASTERISK-11893)
Reported by: daniele
Patches:
     misdn-moh-1.6.0-beta7.1.patch uploaded by daniele (license 471)
Tested by: daniele

Technically, I didn't use the patch above except to find out what revision to merge - but it's the same thing as this revision.

........
r51989 | crichter | 2007-01-24 06:57:22 -0600 (Wed, 24 Jan 2007) | 1 line

added fix from ASTERISK-8652
........

................
r114617 | tilghman | 2008-04-24 15:24:31 -0400 (Thu, 24 Apr 2008) | 6 lines

Fix DST calculation, and fix bug in calculation of whether conf has started yet or not
(Closes issue ASTERISK-11715)
Reported by: DEA
Patches:
      app_meetme-rt-dst-sched-fix.txt uploaded by DEA (license 3)

................
r114622 | tilghman | 2008-04-24 15:54:57 -0400 (Thu, 24 Apr 2008) | 12 lines

Merged revisions 114621 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114621 | tilghman | 2008-04-24 14:53:36 -0500 (Thu, 24 Apr 2008) | 4 lines

Ensure that when we set the accountcode, it actually shows up in the CDR.
(Fix for AMI Originate)
(Closes issue ASTERISK-11451)

........

................
r114625 | mmichelson | 2008-04-24 16:06:06 -0400 (Thu, 24 Apr 2008) | 18 lines

Merged revisions 114624 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114624 | mmichelson | 2008-04-24 15:04:24 -0500 (Thu, 24 Apr 2008) | 10 lines

Resolve a deadlock in chan_local by releasing the channel lock
temporarily.

(closes issue ASTERISK-11181)
Reported by: callguy
Patches:
     11712.patch uploaded by putnopvut (license 60)
Tested by: acunningham


........

................
r114629 | mmichelson | 2008-04-24 16:43:52 -0400 (Thu, 24 Apr 2008) | 16 lines

Merged revisions 114628 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114628 | mmichelson | 2008-04-24 15:43:03 -0500 (Thu, 24 Apr 2008) | 8 lines

Output of channel variables when eventwhencalled=vars was set
was being truncated two characters. This patch corrects the
problem.

(closes issue ASTERISK-11891)
Reported by: davidw


........

................
r114633 | mmichelson | 2008-04-24 17:35:39 -0400 (Thu, 24 Apr 2008) | 19 lines

Merged revisions 114632 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114632 | mmichelson | 2008-04-24 16:35:08 -0500 (Thu, 24 Apr 2008) | 11 lines

Re-invite RTP during a masquerade so that, for instance, an AMI
redirect of two channels which are natively bridged will preserve audio
on both channels. This prevents a problem with Asterisk not re-inviting
due to one of the channels having being a zombie.

(closes issue ASTERISK-11910)
Reported by: mneuhauser
Patches:
     asterisk-1.4-114602_restore-RTP-on-fixup.patch uploaded by mneuhauser (license 425)


........

................
r114635 | file | 2008-04-24 18:11:46 -0400 (Thu, 24 Apr 2008) | 4 lines

Hey look, it builds.
(closes issue ASTERISK-11916)
Reported by: falves11

................
r114637 | mvanbaak | 2008-04-24 18:16:48 -0400 (Thu, 24 Apr 2008) | 8 lines

Pass the hangup cause all the way to the calling app/channel.

(closes issue ASTERISK-10842)
Reported by: rain
Patches:
     20071207__pass_cause_in_hangup_control_frame.diff.txt uploaded by Corydon76 (license 14)
brought up-to-date to trunk by me

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114643