Howto Spy on a specific call using ChanSpy

Hi, I want to spy on a specific channel. I have dialplan like this -

[ctx]
exten => 10,1,Dial(SIP/34@somedomain.com)

exten => 11,1,Dial(SIP/56@somedomain.com)

exten => 12,1,ChanSpy(DONTKNOW)

so calls to extension 10 is bridged with ‘34@somedomain.com’ and calls to extension 11 is bridged with ‘56@somedomain.com’.

When i call extension 12 i would like to spy on calls to ‘56@somedomain.com’.

To do so, what should be the line -
exten => 12,1,ChanSpy(SIP/56@somedomain.com)
or
exten => 12,1,ChanSpy(SIP/11)

Or is there some other way?
Please help. Thanx

1 Like

In this case, it’s probably better/easier to use “Extenspy”:

exten => 12,1,ExtenSpy(11@ctx)

You could still use ChanSpy, adn your first line looks correct:

exten => 12,1,ChanSpy(SIP/56@whatever.com)

1 Like

[quote=“jdmetzger”]In this case, it’s probably better/easier to use “Extenspy”:

exten => 12,1,ExtenSpy(11@ctx)

You could still use ChanSpy, adn your first line looks correct:

exten => 12,1,ChanSpy(SIP/56@whatever.com)[/quote]

Thank you for the suggestion. :smile: But I have a confusion. :confused: For example in the Dialplan I have -
[ctx]
exten => 11,1,Dial(${SIP_DEST})

exten => 12,1,ExtenSpy(11@ctx)

the SIP_DEST is changed dynamically. Say there are 2 calls at one moment. Caller1 called ‘11’ and is bridged with SIP_DEST1 while Caller2 called ‘11’ and bridged with SIP_DEST2. Now I want to spy on the call between Caller2 and SIP_DEST2.

What should I do? I actually need to spy on specific channel.
Thank you.

1 Like

hello, can anybody help? please. :W

1 Like