Summary: | ASTERISK-17283: ChannelRedirect hanging up a channel who is in a ChanSpy | ||||
Reporter: | Tanguy CHAPRON (thera) | Labels: | |||
Date Opened: | 2011-01-25 10:34:56.000-0600 | Date Closed: | 2015-03-13 19:53:17 | ||
Priority: | Minor | Regression? | No | ||
Status: | Closed/Complete | Components: | Applications/app_channelredirect | ||
Versions: | Frequency of Occurrence | ||||
Related Issues: |
| ||||
Environment: | Attachments: | ||||
Description: | # 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@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 :( | ||||
Comments: | By: Tanguy CHAPRON (thera) 2011-01-26 04:45:24.000-0600 I compile my asterisk with the new file of the 303549 revision. => Same problem, so I don't think it's a duplicate trouble. By: Leif Madsen (lmadsen) 2011-01-31 13:37:53.000-0600 You need to provide more information. Please provide the console output when this happens along with anything required to reproduce this issue. By: paulc (paulc) 2011-01-31 18:44:20.000-0600 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@192.168.65.251 for s@ono-monitor-start:1 (Retry 1) == Using SIP RTP CoS mark 5 > Channel SIP/192.168.65.251-0000011f was answered. -- Executing [s@ono-monitor-start:1] NoOp("SIP/192.168.65.251-0000011f", "Starting call for agent monitoring") in new stack -- Executing [s@ono-monitor-start:2] Set("SIP/192.168.65.251-0000011f", "ONO_AUDIO_PREFIX=o3") in new stack -- Executing [s@ono-monitor-start:3] Set("SIP/192.168.65.251-0000011f", "ONO_AUDIO=o3/eng-str") in new stack -- Executing [s@ono-monitor-start:4] Set("SIP/192.168.65.251-0000011f", "ONO_WEB=http://some_host/ws") in new stack -- Executing [s@ono-monitor-start:5] Set("SIP/192.168.65.251-0000011f", "Result=1") in new stack -- Executing [s@ono-monitor-start:6] Wait("SIP/192.168.65.251-0000011f", "1") in new stack -- Executing [s@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@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@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@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@ono-monitor-agent:1] NoOp("SIP/192.168.65.251-0000011f", "********** ONO-MONITOR-AGENT - Hangup Detected") in new stack -- Executing [h@ono-monitor-agent:2] Set("SIP/192.168.65.251-0000011f", "Result=1") in new stack -- Executing [h@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@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@ono-monitor-agent:1] ChanSpy("SIP/101-00000010", "Local/s@robot-agent-3ae4;1,q") in new stack == Manager 'o3' logged off from 127.0.0.1 == Spying on channel Local/s@robot-agent-3ae4;1 [Jan 31 16:42:18] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s@robot-agent-3ae4;1 [Jan 31 16:42:18] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s@robot-agent-3ae4;1 [Jan 31 16:42:18] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/6664@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@robot-agent-3ae4;1 == Spawn extension (ono-monitor-agent, s, 1) exited non-zero on 'SIP/101-00000010' -- Executing [s@ono-monitor-agent:1] ChanSpy("SIP/101-00000010", "Local/s@robot-agent-020a;1,q") in new stack == Manager 'o3' logged off from 127.0.0.1 == Spying on channel Local/s@robot-agent-020a;1 [Jan 31 16:42:21] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s@robot-agent-020a;1 [Jan 31 16:42:21] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/s@robot-agent-020a;1 [Jan 31 16:42:21] NOTICE[22831]: app_chanspy.c:414 start_spying: Attaching SIP/101-00000010 to Local/6664@in-sip-ee4c;2 {noformat} By: Tanguy CHAPRON (thera) 2011-02-01 04:11:47.000-0600 You have all necessary informations in "Additionnal Information" to reproduce the issue. 1- Bridge two channels with the Bridge application 2- Spy on a channel of the Bridge 3- Do a redirection of the channel who Spy with manager command 'Redirect'. By: Matt Jordan (mjordan) 2015-03-13 19:53:17.771-0500 Well, at some point in time we fixed this :-) Using Asterisk 11: *Dialplan* {noformat} exten => waiter,1,NoOp() same => n,Answer() same => n,Echo() exten => bridger,1,NoOp() same => n,Answer() same => n,Bridge(Local/waiter@default-00000000;2) same => n,Hangup() exten => spy,1,NoOp() same => n,Answer() same => n,ChanSpy(Local/bridger@default-00000001;2,q) same => n,Hangup() exten => redirect,1,NoOp() same => n,Wait(5) same => n,Echo() {noformat} *CLI commands* {noformat} *CLI> channel originate Local/waiter@default application MusicOnHold *CLI> channel originate Local/bridger@default application MusicOnHold *CLI> channel originate Local/spy@default application MusicOnHold {noformat} *AMI* {noformat} Action: Redirect Channel: Local/spy@default-00000002;2 Context: default Exten: redirect Priority: 1 {noformat} *CLI exeuction:* {noformat} *CLI> channel originate Local/waiter@default application MusicOnHold -- Executing [waiter@default:1] NoOp("Local/waiter@default-00000000;2", "") in new stack -- Executing [waiter@default:2] Answer("Local/waiter@default-00000000;2", "") in new stack *CLI> -- Launching MusicOnHold() on Local/waiter@default-00000000;1 -- Started music on hold, class 'default', on Local/waiter@default-00000000;1 -- Executing [waiter@default:3] Echo("Local/waiter@default-00000000;2", "") in new stack *CLI> channel originate Local/bridger@default application MusicOnHold -- Executing [bridger@default:1] NoOp("Local/bridger@default-00000001;2", "") in new stack -- Executing [bridger@default:2] Answer("Local/bridger@default-00000001;2", "") in new stack *CLI> -- Launching MusicOnHold() on Local/bridger@default-00000001;1 -- Started music on hold, class 'default', on Local/bridger@default-00000001;1 -- Executing [bridger@default:3] Bridge("Local/bridger@default-00000001;2", "Local/waiter@default-00000000") in new stack == Spawn extension (default, waiter, 3) exited non-zero on 'Bridge/Local/waiter@default-00000000;2<ZOMBIE>' *CLI> channel originate Local/spy@default application MusicOnHold -- Executing [spy@default:1] NoOp("Local/spy@default-00000002;2", "") in new stack -- Executing [spy@default:2] Answer("Local/spy@default-00000002;2", "") in new stack *CLI> -- Launching MusicOnHold() on Local/spy@default-00000002;1 -- Started music on hold, class 'default', on Local/spy@default-00000002;1 -- Executing [spy@default:3] ChanSpy("Local/spy@default-00000002;2", "Local/bridger@default-00000001") in new stack -- <Local/spy@default-00000002;2> Playing 'beep.gsm' (language 'en') *CLI> == Manager 'asterisk' logged on from 127.0.0.1 == Spawn extension (default, redirect, 1) exited non-zero on 'Local/spy@default-00000002;2' -- Executing [redirect@default:1] NoOp("Local/spy@default-00000002;2", "") in new stack -- Executing [redirect@default:2] Wait("Local/spy@default-00000002;2", "5") in new stack -- Executing [redirect@default:3] Echo("Local/spy@default-00000002;2", "") in new stack {noformat} |