[asterisk-bugs] [JIRA] (ASTERISK-17283) ChannelRedirect hanging up a channel who is in a ChanSpy

Matt Jordan (JIRA) noreply at issues.asterisk.org
Fri Mar 13 19:30:34 CDT 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-17283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=173600#comment-173600 ] 

Matt Jordan edited comment on ASTERISK-17283 at 3/13/15 7:28 PM:
-----------------------------------------------------------------

I'm not sure if this is a duplicate of 0018585 but I'm experiencing the same symptoms as described by Thera.

I have a context with s extension to do monitoring (the target being in a channel variable) and an h extension (so I know when the person doing the monitoring hangs up). 

A1 is talking to A2, B1 is talking to B2. I originate a call to C, who sits listening to music on hold. Via AGI I set a channel var for C then redirect to a context where he starts monitoring A1. This works fine. I then set the channel var to B1 and redirect C as I did previously. C triggers the h extension and the call ends.

This is in 1.6.2.16, but works fine in 1.6.2.9 - in the earlier version, C stops monitoring A1 and starts monitoring B1 with no issues.

Here's what I see on the console, for both versions:

{noformat}
//
// We make an outbound call (to C) using a call file
//
    -- Attempting call on SIP/+9998883293 at 192.168.65.251 for s at ono-monitor-start:1 (Retry 1)
  == Using SIP RTP CoS mark 5
       > Channel SIP/192.168.65.251-0000011f was answered.
    -- Executing [s at ono-monitor-start:1] NoOp("SIP/192.168.65.251-0000011f", "Starting call for agent monitoring") in new stack
    -- Executing [s at ono-monitor-start:2] Set("SIP/192.168.65.251-0000011f", "ONO_AUDIO_PREFIX=o3") in new stack
    -- Executing [s at ono-monitor-start:3] Set("SIP/192.168.65.251-0000011f", "ONO_AUDIO=o3/eng-str") in new stack
    -- Executing [s at ono-monitor-start:4] Set("SIP/192.168.65.251-0000011f", "ONO_WEB=http://some_host/ws") in new stack
    -- Executing [s at ono-monitor-start:5] Set("SIP/192.168.65.251-0000011f", "Result=1") in new stack
    -- Executing [s at ono-monitor-start:6] Wait("SIP/192.168.65.251-0000011f", "1") in new stack
    -- Executing [s at ono-monitor-start:7] Playback("SIP/192.168.65.251-0000011f", "o3/eng-str/agent-monitor-start") in new stack
    -- <SIP/192.168.65.251-0000011f> Playing 'o3/eng-str/agent-monitor-start.ulaw' (language 'en')
    -- Executing [s at ono-monitor-start:8] WaitMusicOnHold("SIP/192.168.65.251-0000011f", "60") in new stack
    -- Started music on hold, class 'default', on SIP/192.168.65.251-0000011f
{noformat}

{noformat}
//
// At this point the call has been answered, C is listening to music, and
// will get redirected when he clicks in the web control front end
// 
// He clicks, and gets sent to ono-monitor-agent,s,1
//
  == Manager 'o3' logged on from 127.0.0.1
    -- Stopped music on hold on SIP/192.168.65.251-0000011f
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/192.168.65.251-0000011f'
    -- Executing [s at ono-monitor-agent:1] ChanSpy("SIP/192.168.65.251-0000011f", "SIP/192.168.65.251-0000011d,q") in new stack
  == Manager 'o3' logged off from 127.0.0.1
  == Spying on channel SIP/192.168.65.251-0000011d
[Jan 31 16:27:43] NOTICE[8415]: app_chanspy.c:414 start_spying: Attaching SIP/192.168.65.251-0000011f to SIP/192.168.65.251-0000011d
[Jan 31 16:27:43] NOTICE[8415]: app_chanspy.c:414 start_spying: Attaching SIP/192.168.65.251-0000011f to SIP/192.168.65.251-0000011d
[Jan 31 16:27:43] NOTICE[8415]: app_chanspy.c:414 start_spying: Attaching SIP/192.168.65.251-0000011f to SIP/192.168.184.201-0000011b
{noformat}

{noformat}
//
// At this point, C is now monitoring A1's conversation
//
// He uses the web control front end to request monitoring of B1
//
  == Manager 'o3' logged on from 127.0.0.1
  == Manager 'o3' logged off from 127.0.0.1
  == Done Spying on channel SIP/192.168.65.251-0000011d
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/192.168.65.251-0000011f'
    -- Executing [s at ono-monitor-agent:1] ChanSpy("SIP/192.168.65.251-0000011f", "SIP/192.168.65.251-0000011e,q") in new stack
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/192.168.65.251-0000011f'
    -- Executing [h at ono-monitor-agent:1] NoOp("SIP/192.168.65.251-0000011f", "********** ONO-MONITOR-AGENT - Hangup Detected") in new stack
    -- Executing [h at ono-monitor-agent:2] Set("SIP/192.168.65.251-0000011f", "Result=1") in new stack
    -- Executing [h at ono-monitor-agent:3] Hangup("SIP/192.168.65.251-0000011f", "") in new stack
  == Spawn extension (ono-monitor-agent, h, 3) exited non-zero on 'SIP/192.168.65.251-0000011f'
[Jan 31 16:27:56] NOTICE[8415]: pbx_spool.c:349 attempt_thread: Call completed to SIP/+9998883293 at 192.168.65.251
{noformat}

{noformat}
// 
// It seems that in stopping monitoring, C is deemed to have hungup. The
// h extension triggered and the call ends.
//
{noformat}

{noformat}
//
// For comparison, on my 1.6.2.9 system, the first redirect looks like this:
//
  == Manager 'o3' logged on from 127.0.0.1
    -- Stopped music on hold on SIP/101-00000010
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/101-00000010'
    -- Executing [s at ono-monitor-agent:1] ChanSpy("SIP/101-00000010", "Local/s at robot-agent-3ae4;1,q") in new stack
  == Manager 'o3' logged off from 127.0.0.1
  == Spying on channel Local/s at robot-agent-3ae4;1
[Jan 31 16:42:18] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s at robot-agent-3ae4;1
[Jan 31 16:42:18] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s at robot-agent-3ae4;1
[Jan 31 16:42:18] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/6664 at in-sip-76d3;2
{noformat}

{noformat}
//
// And the second redirect looks like this:
//
  == Manager 'o3' logged on from 127.0.0.1
  == Done Spying on channel Local/s at robot-agent-3ae4;1
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/101-00000010'
    -- Executing [s at ono-monitor-agent:1] ChanSpy("SIP/101-00000010", "Local/s at robot-agent-020a;1,q") in new stack
  == Manager 'o3' logged off from 127.0.0.1
  == Spying on channel Local/s at robot-agent-020a;1
[Jan 31 16:42:21] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s at robot-agent-020a;1
[Jan 31 16:42:21] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s at robot-agent-020a;1
[Jan 31 16:42:21] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/6664 at in-sip-ee4c;2
{noformat}



was (Author: paulc):
I'm not sure if this is a duplicate of 0018585 but I'm experiencing the same symptoms as described by Thera.

I have a context with s extension to do monitoring (the target being in a channel variable) and an h extension (so I know when the person doing the monitoring hangs up). 

A1 is talking to A2, B1 is talking to B2. I originate a call to C, who sits listening to music on hold. Via AGI I set a channel var for C then redirect to a context where he starts monitoring A1. This works fine. I then set the channel var to B1 and redirect C as I did previously. C triggers the h extension and the call ends.

This is in 1.6.2.16, but works fine in 1.6.2.9 - in the earlier version, C stops monitoring A1 and starts monitoring B1 with no issues.

Here's what I see on the console, for both versions:

//
// We make an outbound call (to C) using a call file
//

    -- Attempting call on SIP/+9998883293 at 192.168.65.251 for s at ono-monitor-start:1 (Retry 1)
  == Using SIP RTP CoS mark 5
       > Channel SIP/192.168.65.251-0000011f was answered.
    -- Executing [s at ono-monitor-start:1] NoOp("SIP/192.168.65.251-0000011f", "Starting call for agent monitoring") in new stack
    -- Executing [s at ono-monitor-start:2] Set("SIP/192.168.65.251-0000011f", "ONO_AUDIO_PREFIX=o3") in new stack
    -- Executing [s at ono-monitor-start:3] Set("SIP/192.168.65.251-0000011f", "ONO_AUDIO=o3/eng-str") in new stack
    -- Executing [s at ono-monitor-start:4] Set("SIP/192.168.65.251-0000011f", "ONO_WEB=http://some_host/ws") in new stack
    -- Executing [s at ono-monitor-start:5] Set("SIP/192.168.65.251-0000011f", "Result=1") in new stack
    -- Executing [s at ono-monitor-start:6] Wait("SIP/192.168.65.251-0000011f", "1") in new stack
    -- Executing [s at ono-monitor-start:7] Playback("SIP/192.168.65.251-0000011f", "o3/eng-str/agent-monitor-start") in new stack
    -- <SIP/192.168.65.251-0000011f> Playing 'o3/eng-str/agent-monitor-start.ulaw' (language 'en')
    -- Executing [s at ono-monitor-start:8] WaitMusicOnHold("SIP/192.168.65.251-0000011f", "60") in new stack
    -- Started music on hold, class 'default', on SIP/192.168.65.251-0000011f

//
// At this point the call has been answered, C is listening to music, and
// will get redirected when he clicks in the web control front end
// 
// He clicks, and gets sent to ono-monitor-agent,s,1
//
  == Manager 'o3' logged on from 127.0.0.1
    -- Stopped music on hold on SIP/192.168.65.251-0000011f
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/192.168.65.251-0000011f'
    -- Executing [s at ono-monitor-agent:1] ChanSpy("SIP/192.168.65.251-0000011f", "SIP/192.168.65.251-0000011d,q") in new stack
  == Manager 'o3' logged off from 127.0.0.1
  == Spying on channel SIP/192.168.65.251-0000011d
[Jan 31 16:27:43] NOTICE[8415]: app_chanspy.c:414 start_spying: Attaching SIP/192.168.65.251-0000011f to SIP/192.168.65.251-0000011d
[Jan 31 16:27:43] NOTICE[8415]: app_chanspy.c:414 start_spying: Attaching SIP/192.168.65.251-0000011f to SIP/192.168.65.251-0000011d
[Jan 31 16:27:43] NOTICE[8415]: app_chanspy.c:414 start_spying: Attaching SIP/192.168.65.251-0000011f to SIP/192.168.184.201-0000011b

//
// At this point, C is now monitoring A1's conversation
//
// He uses the web control front end to request monitoring of B1
//
  == Manager 'o3' logged on from 127.0.0.1
  == Manager 'o3' logged off from 127.0.0.1
  == Done Spying on channel SIP/192.168.65.251-0000011d
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/192.168.65.251-0000011f'
    -- Executing [s at ono-monitor-agent:1] ChanSpy("SIP/192.168.65.251-0000011f", "SIP/192.168.65.251-0000011e,q") in new stack
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/192.168.65.251-0000011f'
    -- Executing [h at ono-monitor-agent:1] NoOp("SIP/192.168.65.251-0000011f", "********** ONO-MONITOR-AGENT - Hangup Detected") in new stack
    -- Executing [h at ono-monitor-agent:2] Set("SIP/192.168.65.251-0000011f", "Result=1") in new stack
    -- Executing [h at ono-monitor-agent:3] Hangup("SIP/192.168.65.251-0000011f", "") in new stack
  == Spawn extension (ono-monitor-agent, h, 3) exited non-zero on 'SIP/192.168.65.251-0000011f'
[Jan 31 16:27:56] NOTICE[8415]: pbx_spool.c:349 attempt_thread: Call completed to SIP/+9998883293 at 192.168.65.251

// 
// It seems that in stopping monitoring, C is deemed to have hungup. The
// h extension triggered and the call ends.
//

//
// For comparison, on my 1.6.2.9 system, the first redirect looks like this:
//
  == Manager 'o3' logged on from 127.0.0.1
    -- Stopped music on hold on SIP/101-00000010
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/101-00000010'
    -- Executing [s at ono-monitor-agent:1] ChanSpy("SIP/101-00000010", "Local/s at robot-agent-3ae4;1,q") in new stack
  == Manager 'o3' logged off from 127.0.0.1
  == Spying on channel Local/s at robot-agent-3ae4;1
[Jan 31 16:42:18] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s at robot-agent-3ae4;1
[Jan 31 16:42:18] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s at robot-agent-3ae4;1
[Jan 31 16:42:18] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/6664 at in-sip-76d3;2

//
// And the second redirect looks like this:
//
  == Manager 'o3' logged on from 127.0.0.1
  == Done Spying on channel Local/s at robot-agent-3ae4;1
  == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/101-00000010'
    -- Executing [s at ono-monitor-agent:1] ChanSpy("SIP/101-00000010", "Local/s at robot-agent-020a;1,q") in new stack
  == Manager 'o3' logged off from 127.0.0.1
  == Spying on channel Local/s at robot-agent-020a;1
[Jan 31 16:42:21] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s at robot-agent-020a;1
[Jan 31 16:42:21] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s at robot-agent-020a;1
[Jan 31 16:42:21] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/6664 at in-sip-ee4c;2



> ChannelRedirect hanging up a channel who is in a ChanSpy
> --------------------------------------------------------
>
>                 Key: ASTERISK-17283
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-17283
>             Project: Asterisk
>          Issue Type: Bug
>          Components: Applications/app_channelredirect
>            Reporter: Tanguy CHAPRON
>            Severity: Minor
>
> # User B is bridge with User A.
> # User C start ChanSpy on the A channel.
> # Let's doing a redirection of the Channel C with manager command (Action: Redirect), CLI command (channel redirect) or Application (ChannelRedirect).
> => The channel stop to spying but, just before go in the context,extension,priority specified, the call end.
> *ADDITIONAL INFORMATION*
> {noformat}
> Static situation with the ChanSpy
> Asterisk*CLI> core show channels verbose 
> Channel              Context              Extension        Prio State   Application  Data                      CallerID        Duration Accountcode PeerAccount BridgedTo           
> SIP/102-0000000e     appelant             630                34 Up      ChanSpy      SIP/201-0000000d,q        892000000       00:00:23                         (None)              
> SIP/201-0000000d     medium               630                27 Up      Bridge       SIP/101-0000000c,Hh       892000000       00:08:12                         SIP/101-0000000c    
> SIP/101-0000000c     mise-en-conf         630                 3 Up      (None)       (None)                    892000000       00:08:16                         SIP/201-0000000d    
> 3 active channels
> 2 active calls
> {noformat}
> So let's doing a redirection of the channel SIP/102-00000008 with the diaplan application ChannelRedirect :
> {noformat}
> [Jan 25 17:24:39] VERBOSE[2880] pbx.c:     -- Executing [630 at medium:25] ChannelRedirect("SIP/201-0000000d", "SIP/102-0000000e,mise-en-conf,630,1") in new stack
> [Jan 25 17:24:39] DEBUG[2880] channel.c: Soft-Hanging up channel 'SIP/102-0000000e'
> {noformat}
> The channel is Hung up :(



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list