Hi guys
I have this bit of code in my dialplan:
exten=>*41,1,NoOp(Extenspy)
exten=>*41,n,Playback(vm-extension)
exten=>*41,n,Read(ext_digits,,4,,,10)
exten=>*41,n,SayDigits(${ext_digits})
exten=>*41,n,ExtenSpy(${ext_digits}@internal,dbwE)
exten=>*41,n,Hangup()
I have set up a test network to test the above. I call SIP extension 1000 from SIP extension 1001. For testing purposes, 1001 is the external person outside the call center, 1000 is the agent picking up the incoming call.
From a third SIP phone (3916) I then enter *41# - all works as it should, asterisk says “extension”, I type 1000 and asterisk reads the DTMF I input on the phone keypad and then reads the numbers back. Extenspy then comes up in the CLI, the word “sip” is played, and then asterisk reads back the CALLING extension - 1001 - not the agent extension which I entered just previously, which answered the call. If I then whisper, the wrong leg of the call gets the whisper - 1001 - the external party, not 1000, which is the agent - which was specified to extenspy… E. g. I’m whispering to the client who called into the call center, not the agent.
Here’s my CLI flow:
asterisktest*CLI>
== Using SIP RTP CoS mark 5
-- Executing [1000@internal:1] Dial("SIP/1001-00000000",
"Sip/1000,120,tTg") in new stack
== Using SIP RTP CoS mark 5
-- Called Sip/1000
-- SIP/1000-00000001 is ringing
-- SIP/1000-00000001 answered SIP/1001-00000000
== Using SIP RTP CoS mark 5
-- Executing [*41@internal:1] Goto("SIP/3916-00000002", "special,*41,1")
in new stack
-- Goto (special,*41,1)
-- Executing [*41@special:1] NoOp("SIP/3916-00000002", "Extenspy") in
new stack
-- Executing [*41@special:2] Playback("SIP/3916-00000002",
"vm-extension") in new stack
-- <SIP/3916-00000002> Playing 'vm-extension.g729' (language 'en')
-- Executing [*41@special:3] Read("SIP/3916-00000002",
"ext_digits,,4,,,10") in new stack
-- Accepting a maximum of 4 digits.
-- User entered '1000'
-- Executing [*41@special:4] SayDigits("SIP/3916-00000002", "1000") in
new stack
-- <SIP/3916-00000002> Playing 'digits/1.g729' (language 'en')
-- <SIP/3916-00000002> Playing 'digits/0.g729' (language 'en')
-- <SIP/3916-00000002> Playing 'digits/0.g729' (language 'en')
-- <SIP/3916-00000002> Playing 'digits/0.g729' (language 'en')
-- Executing [*41@special:5] ExtenSpy("SIP/3916-00000002",
"1000@internal,dbwE") in new stack
-- <SIP/3916-00000002> Playing 'beep.g729' (language 'en')
-- <SIP/3916-00000002> Playing 'spy-sip.g729' (language 'en')
-- <SIP/3916-00000002> Playing 'digits/1.g729' (language 'en')
-- <SIP/3916-00000002> Playing 'digits/0.g729' (language 'en')
-- <SIP/3916-00000002> Playing 'digits/0.g729' (language 'en')
-- <SIP/3916-00000002> Playing 'digits/1.g729' (language 'en')
== Spying on channel SIP/1001-00000000
[May 15 10:17:38] NOTICE[2401]: app_chanspy.c:484 start_spying: Attaching
SIP/3916-00000002 to SIP/1001-00000000
[May 15 10:17:38] NOTICE[2401]: app_chanspy.c:484 start_spying: Attaching
SIP/3916-00000002 to SIP/1001-00000000
[May 15 10:17:38] NOTICE[2401]: app_chanspy.c:484 start_spying: Attaching
SIP/3916-00000002 to SIP/1000-00000001
== Spawn extension (internal, 1000, 1) exited non-zero on
'SIP/1001-00000000'
-- Executing [h@internal:1] NoOp("SIP/1001-00000000", "Call Hungup
INTERNAL") in new stack
== Done Spying on channel SIP/1001-00000000
-- Executing [*41@special:6] Hangup("SIP/3916-00000002", "") in new
stack
== Spawn extension (special, *41, 6) exited non-zero on
'SIP/3916-00000002'
asterisktest*CLI>
If I enter 1001 as the extension I want to spy on, I get the beep, and then just silence:
-- Executing [*41@special:5] ExtenSpy("SIP/3916-00000002",
"1001@internal,dbwE") in new stack
-- <SIP/3916-00000002> Playing 'beep.g729' (language 'en')
asterisktest*CLI>
No errrors are reported at verbosity 99.
What am I doing wrong - any idea why asterisk, when I want to spy on extension SIP/1000 - the agent - reads back extension SIP/1001 - the caller? And then, whispers to that read-back leg - the caller leg - the caller at SIP/1001 - while the agent is at SIP/1000 and I want to whisper to him…
How can I whisper to the agent leg on SIP/1000 - NOT the caller leg at 1001?
Thanks
Stefan