[asterisk-bugs] [Asterisk 0016626]: Chanspy application does not exit when user hangs up

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Jul 26 15:38:10 CDT 2010


The following issue has been ASSIGNED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16626 
====================================================================== 
Reported By:                kobaz
Assigned To:                jpeeler
====================================================================== 
Project:                    Asterisk
Issue ID:                   16626
Category:                   Applications/app_chanspy
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Target Version:             1.6.2.12
Asterisk Version:           SVN 
JIRA:                       SWP-742 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.0 
SVN Revision (number only!): 240716 
Request Review:              
====================================================================== 
Date Submitted:             2010-01-17 13:06 CST
Last Modified:              2010-07-26 15:38 CDT
====================================================================== 
Summary:                    Chanspy application does not exit when user hangs up
Description: 
1.6.0 svn tr

IAX device dials 267 at services, ChanSpy executes... IAX device hangs up...
chanspy is still running

extend context services {
  267 => {
    Answer();
    ChanList(SIP/213);
    Set(encchannel=${BASE64_ENCODE(${CHANLIST_RESULT})});
    goto connectToChannel, ${encchannel}, 1;
  }
}

context connectToChannel {
  h => {
    Hangup();
  }

  _.! => {
    Set(spy=${BASE64_DECODE(${EXTEN})});
    Answer();
    ChanSpy(${spy},qw);
  }
}


    -- Executing [267 at trunkhandler_from-branch:1]
Answer("IAX2/branch-9556", "") in new stack
    -- Executing [267 at trunkhandler_from-branch:2]
ChanList("IAX2/branch-9556", "SIP/213") in new stack
    -- Executing [267 at trunkhandler_from-branch:3] Set("IAX2/branch-9556",
"encchannel=U0lQLzIxMy0wMDAwMDAwMA==") in new stack
    -- Executing [267 at trunkhandler_from-branch:4] Goto("IAX2/branch-9556",
"connectToChannel,U0lQLzIxMy0wMDAwMDAwMA==,1") in new stack
    -- Goto (connectToChannel,U0lQLzIxMy0wMDAwMDAwMA==,1)
    -- Executing [U0lQLzIxMy0wMDAwMDAwMA==@connectToChannel:1]
Set("IAX2/branch-9556", "spy=SIP/213-00000000") in new stack
    -- Executing [U0lQLzIxMy0wMDAwMDAwMA==@connectToChannel:2]
Answer("IAX2/branch-9556", "") in new stack
    -- Executing [U0lQLzIxMy0wMDAwMDAwMA==@connectToChannel:3]
ChanSpy("IAX2/branch-9556", "SIP/213-00000000,qw") in new stack
  == Spying on channel SIP/213-00000000
[Jan 17 13:54:44] NOTICE[8329]: app_chanspy.c:245 start_spying: Attaching
IAX2/branch-9556 to SIP/213-00000000
[Jan 17 13:54:44] NOTICE[8329]: app_chanspy.c:245 start_spying: Attaching
IAX2/branch-9556 to SIP/213-00000000

--- IAX2/branch-9556 hangs up here ---

> core show channels
Channel              Location             State   Application(Data)
IAX2/branch-9556     U0lQLzIxMy0wMDAwMDAw Up     
ChanSpy(SIP/213-00000000,qw)
SIP/213-00000000     s at dialExten:1        Up      AppDial((Outgoing
Line))
IAX2/branch-3772     s at dialExten:5        Up      Dial(SIP/213)


I'm not good enough with the code yet to see why it's happening... but I
see where it's happening.

Line 416 of app_chanspy.c

414:        if (ast_test_flag(flags, OPTION_WHISPER)) {
415:                ast_audiohook_lock(&csth.whisper_audiohook);
416:                ast_audiohook_detach(&csth.whisper_audiohook); //
lockup
417:                ast_audiohook_unlock(&csth.whisper_audiohook);
418:                ast_audiohook_destroy(&csth.whisper_audiohook);
419:        }

If the spyee channel hangs up, ast_audiohook_detach() will finish, and
ChanSpy will end.

This only happens when there is no audio being generated.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0016524 Chanspy cannot spy on a non-bridged cha...
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-07-26 15:38 lmadsen        Assigned To               => jpeeler         
2010-07-26 15:38 lmadsen        Target Version            => 1.6.2.12        
2010-07-26 15:38 lmadsen        Description Updated                          
======================================================================




More information about the asterisk-bugs mailing list