[Home]

Summary:ASTERISK-16572: chanspy cuts the voice between caller and callee if Local channel is used
Reporter:Christoph Hennek (chris0602)Labels:
Date Opened:2010-08-16 04:00:10Date Closed:2015-03-27 16:23:53
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_chanspy
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) console-output.txt
( 1) dialplan_sipconfig.txt
( 2) sip-debug.txt
Description:I'm making a SIP call from a SIP softphone through a SIP GSM gateway.
Because of 6 seconds silence during the connenction through the GSM gateway I'm playing tones. Thats works fine until I try to spy the channel. Then the caller can't hear the callee, the callee can't hear the caller but the spier hears both sides. If the spier stays on the channel and the caller establishes a new connection all works fine.



[out-gsmgate]
EXTEN => xxx, 1, Answer()
EXTEN => xxx, n, Playtones(waitforring)
EXTEN => xxx, n, dial(SIP/gsmgate&Local/s@no-op,60)

[no-op]
EXTEN => s, 1, Hangup()
Comments:By: Leif Madsen (lmadsen) 2010-08-16 14:43:49

Not enough information provided. Please include console output, channel configuration information and the entire dialplan required to reproduce this issue.

We'll also need SIP debug information.

By: Christoph Hennek (chris0602) 2010-08-17 02:49:31

Sorry I did a mistake in my discription. Only the caller can't hear the Callee after spying the channel.

I hope you can reproduce it with the uploaded files.

By: Matt Jordan (mjordan) 2015-03-27 16:18:58.560-0500

Tested with the latest from Asterisk 11, this does not appear to be broken still.

In the log below, {{SIP/ekiga}} dials a Local channel that spins for a bit and {{SIP/bob}}. {{SIP/bob}} answers. {{SIP/alice}} spies on {{SIP/ekiga}}, and spys correctly.

{noformat}
   -- Executing [2000@default:1] NoOp("SIP/ekiga-00000006", "") in new stack
   -- Executing [2000@default:2] Gosub("SIP/ekiga-00000006", "dial_subroutines,get_dial_string,1(2000)") in new stack
   -- Executing [get_dial_string@dial_subroutines:1] NoOp("SIP/ekiga-00000006", "") in new stack
   -- Executing [get_dial_string@dial_subroutines:2] Set("SIP/ekiga-00000006", "extension=2000") in new stack
   -- Executing [get_dial_string@dial_subroutines:3] GotoIf("SIP/ekiga-00000006", "0?bad_exten") in new stack
[Mar 27 16:16:08] ERROR[30991][C-00000005]: pbx.c:4303 ast_func_read: Function PJSIP_DIAL_CONTACTS not registered
   -- Executing [get_dial_string@dial_subroutines:4] Set("SIP/ekiga-00000006", "dialstring=") in new stack
   -- Executing [get_dial_string@dial_subroutines:5] GotoIf("SIP/ekiga-00000006", "0?success") in new stack
   -- Executing [get_dial_string@dial_subroutines:6] Set("SIP/ekiga-00000006", "dialstring=PJSIP/bob") in new stack
   -- Executing [get_dial_string@dial_subroutines:7] Return("SIP/ekiga-00000006", "0") in new stack
   -- Executing [2000@default:3] ExecIf("SIP/ekiga-00000006", "0)?Hangup()") in new stack
   -- Executing [2000@default:4] Gosub("SIP/ekiga-00000006", "dial_subroutines,set_dial_args,1") in new stack
   -- Executing [set_dial_args@dial_subroutines:1] NoOp("SIP/ekiga-00000006", "") in new stack
   -- Executing [set_dial_args@dial_subroutines:2] Set("SIP/ekiga-00000006", "dial_args=tT") in new stack
   -- Executing [set_dial_args@dial_subroutines:3] Return("SIP/ekiga-00000006", "0") in new stack
   -- Executing [2000@default:5] ExecIf("SIP/ekiga-00000006", "0)?Hangup()") in new stack
   -- Executing [2000@default:6] Dial("SIP/ekiga-00000006", "SIP/bob&Local/800@default,15") in new stack
 == Using SIP RTP CoS mark 5
   -- Called SIP/bob
   -- Called Local/800@default
   -- Executing [800@default:1] NoOp("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:2] Set("Local/800@default-00000002;2", "COUNT=1") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 1") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=2") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 2") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=3") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 3") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=4") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 4") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=5") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 5") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=6") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 6") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=7") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 7") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=8") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 8") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=9") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 9") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=10") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "1") in new stack
   -- Executing [800@default:4] NoOp("Local/800@default-00000002;2", "Counter is 10") in new stack
   -- Executing [800@default:5] Set("Local/800@default-00000002;2", "COUNT=11") in new stack
   -- Executing [800@default:6] EndWhile("Local/800@default-00000002;2", "") in new stack
   -- Executing [800@default:3] While("Local/800@default-00000002;2", "0") in new stack
   -- Executing [800@default:7] Hangup("Local/800@default-00000002;2", "") in new stack
 == Spawn extension (default, 800, 7) exited non-zero on 'Local/800@default-00000002;2'
   -- SIP/bob-00000007 is ringing
   -- SIP/bob-00000007 answered SIP/ekiga-00000006
   -- Remotely bridging SIP/ekiga-00000006 and SIP/bob-00000007

 == Using SIP RTP CoS mark 5
   -- Executing [900@default:1] NoOp("SIP/alice-00000008", "") in new stack
   -- Executing [900@default:2] ChanSpy("SIP/alice-00000008", "SIP/ekiga,qv(1)") in new stack
 == Spying on channel SIP/ekiga-00000006
[Mar 27 16:16:14] NOTICE[31056][C-00000006]: app_chanspy.c:491 start_spying: Attaching SIP/alice-00000008 to SIP/ekiga-00000006

 == Spawn extension (default, 2000, 6) exited non-zero on 'SIP/ekiga-00000006'
 == Done Spying on channel SIP/ekiga-00000006
 == Spawn extension (default, 900, 2) exited non-zero on 'SIP/alice-00000008'
{noformat}