When using ChanSpy to monitor a call I more often than not experience an issue where the call is ended. Here is the scenario.
context for ChanSpy
[myspy]
exten = *76,1,Answer()
exten = *76,2,Chanspy(SIP/5002,qb)
If I dial *76 before there is a call active on 5002 and then a call comes in or goes out everything works fine, but if a call is already in progress on 5002 and I use ChanSpy it ends the call (the ChanSpy call stays up).
Here is what I see on the console, starting with the call starting on the extension and then using ChanSpy from another phone.
-- Executing [nomirror@macro-tlfxcallmanager:1] Dial("SIP/rf-HVC-0000001f", "SIP/ewrfauto5002,25") in new stack
== Using SIP RTP CoS mark 5
– Called ewrfauto5002
– SIP/ewrfauto5002-00000020 is ringing
– SIP/ewrfauto5002-00000020 answered SIP/rf-HVC-0000001f
– Packet2Packet bridging SIP/rf-HVC-0000001f and SIP/ewrfauto5002-00000020
== Using SIP RTP CoS mark 5
– Executing [*76@teleflex_phones:1] Answer(“SIP/ewrfauto5001-00000021”, “”) in new stack
– Executing [*76@teleflex_phones:2] Read(“SIP/ewrfauto5001-00000021”, “EXT,agent-newlocation”) in new stack
– <SIP/ewrfauto5001-00000021> Playing ‘agent-newlocation.ulaw’ (language ‘en’)
– User entered ‘5002’
– Executing [*76@teleflex_phones:3] ChanSpy(“SIP/ewrfauto5001-00000021”, “SIP/ewrfauto5002,q”) in new stack
== Spying on channel SIP/ewrfauto5002-00000020
[Nov 17 02:50:34] NOTICE[3190]: app_chanspy.c:414 start_spying: Attaching SIP/ewrfauto5001-00000021 to SIP/ewrfauto5002-00000020
[Nov 17 02:50:34] NOTICE[3190]: app_chanspy.c:414 start_spying: Attaching SIP/ewrfauto5001-00000021 to SIP/ewrfauto5002-00000020
[Nov 17 02:50:34] NOTICE[3190]: app_chanspy.c:414 start_spying: Attaching SIP/ewrfauto5001-00000021 to SIP/rf-HVC-0000001f
– Native bridging SIP/rf-HVC-0000001f and SIP/ewrfauto5002-00000020 ended
== Spawn extension (macro-tlfxcallmanager, nomirror, 1) exited non-zero on ‘SIP/rf-HVC-0000001f’ in macro ‘tlfxcallmanager’
== Spawn extension (tel01_internal, 5002, 2) exited non-zero on ‘SIP/rf-HVC-0000001f’
== Done Spying on channel SIP/ewrfauto5002-00000020
== Spawn extension (teleflex_phones, *76, 3) exited non-zero on ‘SIP/ewrfauto5001-00000021’
What is particularly odd is the behavior is not 100%. Sometimes I can succesfully ChanSpy without killing the call; though most of the time it does kill it. The main difference that sticks out when looking at the console is the “Native bridging … ended” This only appears in the cases where the call is killed.
I have tried setting the “transmit_silence” parameters in asterisk.conf for good measure, but that doesn’t seem to make a difference.
I have also tried to use ExtenSpy with the same results.
Asterisk version is : Asterisk 1.6.2.11 built by on a x86_64 running Linux on 2010-08-28 21:36:52 UTC
Any help would be greatly appreciated.