[asterisk-bugs] [Asterisk 0014909]: [patch] hangup when the spied-on channel hangups

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Apr 21 23:50:06 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14909 
====================================================================== 
Reported By:                junky
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14909
Category:                   Applications/app_chanspy
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.20.1 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-04-16 00:07 CDT
Last Modified:              2009-04-21 23:50 CDT
====================================================================== 
Summary:                    [patch] hangup when the spied-on channel hangups
Description: 
Following a thread on asterisk-dev
http://lists.digium.com/pipermail/asterisk-dev/2009-April/037820.html

I decided it would be cool to have such a feature.

This is the http://bugs.digium.com/view.php?id=1 only

When the spied-on channel hangups, it stops the spying and goto the next
priority in the dialplan.
====================================================================== 

---------------------------------------------------------------------- 
 (0103595) junky (manager) - 2009-04-21 23:50
 http://bugs.digium.com/view.php?id=14909#c103595 
---------------------------------------------------------------------- 
Just few notes for those interested:
you simply need to use ChanSpy with option h:

    -- Executing [88 at default:1] ChanSpy("SIP/10-0080f3e0", "|h") in new
stack
    -- <SIP/10-0080f3e0> Playing 'beep' (language 'fr')
    -- <SIP/10-0080f3e0> Playing 'spy-sip' (language 'fr')
    -- <SIP/10-0080f3e0> Playing 'digits/1' (language 'fr')
    -- <SIP/10-0080f3e0> Playing 'digits/7' (language 'fr')
troy*CLI> 

  == Spying on channel SIP/17-008030c0
[Apr 21 20:46:56] NOTICE[7196]: app_chanspy.c:220 start_spying: Attaching
SIP/10-0080f3e0 to SIP/17-008030c0
troy*CLI> 
troy*CLI> 
  == Spawn extension (default, 126, 1) exited non-zero on
'SIP/17-008030c0'
  == Done Spying on channel SIP/17-008030c0
    -- Hang up due to the spied-on channel hanging up.
    -- Executing [88 at default:2] Hangup("SIP/10-0080f3e0", "") in new
stack

Like you can see, the spied-on channel (SIP/17-008030c0) hanguped, so it
hanguped the channel (SIP/10-0080f3e0) which started the ChanSpy.

Calling Chanspy without option h, will act like before. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-04-21 23:50 junky          Note Added: 0103595                          
======================================================================




More information about the asterisk-bugs mailing list