[asterisk-bugs] [Asterisk 0016626]: Chanspy application does not exit when user hangs up
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Jan 18 11:05:54 CST 2010
The following issue has been UPDATED.
======================================================================
https://issues.asterisk.org/view.php?id=16626
======================================================================
Reported By: kobaz
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 16626
Category: Applications/app_chanspy
Reproducibility: always
Severity: minor
Priority: normal
Status: acknowledged
Asterisk Version: SVN
JIRA:
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-01-18 11:05 CST
======================================================================
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-01-18 11:05 lmadsen Description Updated
======================================================================
More information about the asterisk-bugs
mailing list