Can't find ChanSpy command in Asterisk CLI interface ...?

First of all, thank you to Dave Burgess for providing me with brilliant help, and the clues that ended up in me understanding how to create my C# based WCF service wrapper around the Asterisk Management API, to track calls, originate calls, redirect calls, query the directory, etc - Entirely from C#. Thank you Dave :slight_smile:

However, now I have another problem, which hopefully is more easily solved I assume, since it’s simply that I cannot find the “ChanSpy” action in my Asterisk CLI when issuing a “manager show commands” . I assume this is simply a settings of some sort. However, my reasons for posting here, is because once I have been able to enable this action, hopefully due to some more brilliant help from the community here - I still need to actually construct an action to transmit this to my Asterisk Server, since the library I am using to interact with Asterisk doesn’t seem to have existing wrappers for this action (AsterNET for the record).

So hence, my question is two folded.

  1. How do I enable the ChanSpy action on my server?
  2. How would the message format for transmitting the ChanSpy action over a socket to my Asterisk server look like …?

Have a nice one,

Thomas

No expert here, but I don’t believe there is an AMI command for chanspy. What you want to do is AMI ORIGINATE a call to a local extension that then does a chanspy to a channel.

1 Like

Thank you Igaetz, I know how to do an Originate through AMI, but how do I do that without queuing another call, and instead doing ChanSpy on the other channel …?

There IS an action in the VoIP information I’ve found here - voip-info [.] org/asterisk-manager-api

I thought that was an action that existed in AMI, and that I could simply send to the Asterisk server, for thenm making another extension performing a ChanSpy …?

I don’t think so, but it’s been a while since i played with AMI.

Look at the normal sequence for a chanspy “action”, it’s part of the call setup in the context you are invoking, so I’d think something like originating a call to the extension through a “chanspy context” to get this working. As I recall, you do get the opportunity to choose your call’s context on the originate.

voip info comes up at the top of every google search, but the entire site is pretty much completely out of date. Treat is as a resource not an authority.

Do you have some resource to suggest, preferably relevant to FreePBX since this is the system we’re using …?