Nicholas Blasgen wrote:> I'm trying to figure out how to listen in to a channel that I specify.
> I have the impression I've seen this done via Flash web controls, but
> I'm trying to write something myself and I can't figure out what
command
> would be used. ChanSpy looks great, but I don't see how to specify the
> channel.
>
> I have a channel identifier like "SIP/provider-08748db0" which is
what I
> would send to applications like Hangup(<chan>) or
Redirect(<chan>) but
> it doesn't look like ChanSpy was written to accept that format. I
> haven't tried passing "SIP/provider-08748db0" to ChanSpy, but
from the
> documentation it seems that it shouldn't work.
>
> So the question is, how can I listen into a channel if I know either the
> channel or the unqiue id? And in the meantime I will play around with
> ChanSpy more.
Chanspy should do exactly what you want. If you ran
exten => blah,n,ChanSpy(SIP/provider)
Then you would be able to listen to all active calls involving any channel whose
name begins with 'SIP/provider'. If it turns out that there is a channel
called
'SIP/provider-12345abc', then that channel may be spied on with the
above
ChanSpy call in the dialplan.
The thing to remember is that the "chanprefix" argument as it is
described in
ChanSpy's documentation is literally any text that may appear at the start
of a
channel name. Chanspy(SIP) would allow you to spy on any SIP channel, whereas
ChanSpy(S) would allow spying on both SIP and Skinny channels. There is no
minimum or maximum limit to what this string may be.
Mark Michelson