Exact dialplan for the first call to spy on:
exten => _*2#X.,1,NoOp(“Dummy-Call to Dialer - MAID ${EXTEN:3}”)
same => n,Answer()
same => n,Set(MAID=${EXTEN:3})
same => n,NoOp(“Set up Spygroup - SPY-${MAID}”)
same => n,Set(SPYGROUP=SPY-${MAID})
same => n,Playback(tt-weasels)
same => n,MusicOnHold(default)
same => n,Hangup()
Dialplan for 2nd call (Trying to spy and join conference):
exten => _*1#X.,1,NoOp(“Set up for silent monitoring for MAID ${EXTEN:3}”)
same => n,Answer()
same => n,Set(MAID=${EXTEN:3})
same => n,Originate(Local/${MAID}@background_spy,exten,background_spy,${MAID},1,30,a)
same => n,ConfBridge(KONF-${MAID})
same => n,Hangup()
[background_spy]
exten => _X.,1,NoOp(“Background_spy context”)
same => n,Set(CHANNEL_NAME=SPYCHANNEL-${EXTEN})
same => n,ExtenSpy(SPY-${EXTEN})
same => n,Hangup()
The CLI shows:
== Endpoint callrouter is now Reachable
– Contact callrouter/sip:192.168.251.91 is now Reachable. RTT: 1.485 msec
– Executing [*2#12345@main:1] NoOp(“PJSIP/norman-linphone-00000000”, "“Dummy-Call to Dialer - MAID 12345"”) in new stack
– Executing [*2#12345@main:2] Answer(“PJSIP/norman-linphone-00000000”, “”) in new stack
> 0x75c6b8020c40 – Strict RTP learning after remote address set to: 192.168.199.130:7078
> 0x75c6b8020c40 – Strict RTP switching to RTP target address 192.168.199.130:7078 as source
– Executing [*2#12345@main:3] Set(“PJSIP/norman-linphone-00000000”, “MAID=12345”) in new stack
– Executing [*2#12345@main:4] NoOp(“PJSIP/norman-linphone-00000000”, "“Set up Spygroup - SPY-12345"”) in new stack
– Executing [*2#12345@main:5] Set(“PJSIP/norman-linphone-00000000”, “SPYGROUP=SPY-12345”) in new stack
– Executing [*2#12345@main:6] Playback(“PJSIP/norman-linphone-00000000”, “tt-weasels”) in new stack
– <PJSIP/norman-linphone-00000000> Playing ‘tt-weasels.gsm’ (language ‘de’)
– Executing [*2#12345@main:7] MusicOnHold(“PJSIP/norman-linphone-00000000”, “default”) in new stack
– Started music on hold, class ‘default’, on channel ‘PJSIP/norman-linphone-00000000’
> 0x75c6b8020c40 – Strict RTP learning complete - Locking on source address 192.168.199.130:7078
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio CoS mark 5
– Executing [*1#12345@from_callrouter:1] Goto(“PJSIP/callrouter-00000001”, “main_norman,*1#12345,1”) in new stack
– Goto (main_norman,*1#12345,1)
– Executing [*1#12345@main_norman:1] NoOp(“PJSIP/callrouter-00000001”, "“Set up for silent monitoring for MAID 12345"”) in new stack
– Executing [*1#12345@main_norman:2] Answer(“PJSIP/callrouter-00000001”, “”) in new stack
> 0x75c6b80631b0 – Strict RTP learning after remote address set to: 192.168.251.91:13646
> 0x75c6b80631b0 – Strict RTP switching to RTP target address 192.168.251.91:13646 as source
– Executing [*1#12345@main_norman:3] Set(“PJSIP/callrouter-00000001”, “MAID=12345”) in new stack
– Executing [*1#12345@main_norman:4] Originate(“PJSIP/callrouter-00000001”, “Local/12345@background_spy,exten,background_spy,12345,1,30,a”) in new stack
– Executing [12345@background_spy:1] NoOp(“Local/12345@background_spy-00000000;2”, ““Background_spy context””) in new stack
– Executing [12345@background_spy:2] Set(“Local/12345@background_spy-00000000;2”, “CHANNEL_NAME=SPYCHANNEL-12345”) in new stack
– Executing [12345@background_spy:3] ExtenSpy(“Local/12345@background_spy-00000000;2”, “SPY-12345”) in new stack
– Called 12345@background_spy
– Local/12345@background_spy-00000000;1 answered
– Executing [12345@background_spy:1] NoOp(“Local/12345@background_spy-00000000;1”, ““Background_spy context””) in new stack
– Executing [12345@background_spy:2] Set(“Local/12345@background_spy-00000000;1”, “CHANNEL_NAME=SPYCHANNEL-12345”) in new stack
– Executing [12345@background_spy:3] ExtenSpy(“Local/12345@background_spy-00000000;1”, “SPY-12345”) in new stack
– <Local/12345@background_spy-00000000;1> Playing ‘beep.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;2> Playing ‘beep.gsm’ (language ‘de’)
– Executing [*1#12345@main_norman:5] Wait(“PJSIP/callrouter-00000001”, “1”) in new stack
– <Local/12345@background_spy-00000000;2> Playing ‘letters/s.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;1> Playing ‘letters/s.gsm’ (language ‘de’)
– Executing [*1#12345@main_norman:6] ConfBridge(“PJSIP/callrouter-00000001”, “KONF-12345”) in new stack
– Channel CBAnn/KONF-12345-00000001;2 joined ‘softmix’ base-bridge <81984b18-b6e4-4de4-b45c-8d20573c6d8e>
– <PJSIP/callrouter-00000001> Playing ‘conf-onlyperson.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;2> Playing ‘letters/p.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;1> Playing ‘letters/p.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;2> Playing ‘letters/y.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;1> Playing ‘letters/y.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;2> Playing ‘letters/dash.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;1> Playing ‘letters/dash.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;2> Playing ‘letters/p.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;1> Playing ‘letters/p.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;2> Playing ‘letters/j.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;1> Playing ‘letters/j.gsm’ (language ‘de’)
– <PJSIP/callrouter-00000001> Playing ‘confbridge-join.gsm’ (language ‘de’)
– <CBAnn/KONF-12345-00000001;1> Playing ‘confbridge-join.gsm’ (language ‘en’)
– <Local/12345@background_spy-00000000;2> Playing ‘letters/s.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;1> Playing ‘letters/s.gsm’ (language ‘de’)
– Channel PJSIP/callrouter-00000001 joined ‘softmix’ base-bridge <81984b18-b6e4-4de4-b45c-8d20573c6d8e>
> 0x75c6b80631b0 – Strict RTP learning complete - Locking on source address 192.168.251.91:13646
– <Local/12345@background_spy-00000000;2> Playing ‘letters/i.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;1> Playing ‘letters/i.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;2> Playing ‘letters/p.gsm’ (language ‘de’)
– <Local/12345@background_spy-00000000;1> Playing ‘letters/p.gsm’ (language ‘de’)
== Spying on channel PJSIP/norman-linphone-00000000
– Attaching spy channel Local/12345@background_spy-00000000;2 to PJSIP/norman-linphone-00000000
== Spying on channel PJSIP/norman-linphone-00000000
– Attaching spy channel Local/12345@background_spy-00000000;1 to PJSIP/norman-linphone-00000000