[Asterisk-Users] Monitor via Manager question

mattf mattf at vicimarketing.com
Wed Apr 20 09:11:38 MST 2005


Doesn't work that way, you have to know the exact channel that you want to
Monitor on SIP. What you can do is a Command Show Channels in the manager
and parse through the output to find the first channel then do your Monitor
command.

MATT---

-----Original Message-----
From: Dana Olson [mailto:rickaster at gmail.com]
Sent: Wednesday, April 20, 2005 11:51 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Monitor via Manager question


Hello. I checked in the wiki and read a bunch of old threads from this
mailing list but haven't found what I'm looking for.

I'm using a simple PHP script, and here is the relevant portion:

fputs($socket, "Action: Monitor\r\n");
fputs($socket, "Channel: Zap/1-1\r\n\r\n");

That works fine. As does this:

fputs($socket, "Action: Monitor\r\n");
fputs($socket, "Channel: SIP/8000-h4d8\r\n\r\n");

But what I need to be able to do is this:

fputs($socket, "Action: Monitor\r\n");
fputs($socket, "Channel: SIP/8000\r\n\r\n");

And have it record either the first call that is up on SIP/8000, or
the last, or whatever (doesn't matter, only one call at a time will be
up on this line).

However, if I try this, it always comes back to me with:

Response: Error
Message: No such channel

Because I am not specifying the actual call that is up. Is there any
way to do this? Or can I somehow easily look up what Zap channel is
used by SIP/8000 and pass that?

The other twist is that SIP/8000 will be specified by a variable
passed through a form. Basically, I want a web form with two buttons
and a text box: Start Rec., Stop Rec., and User Ext.. I didn't start
out that complex though, just right now it's a simple PHP script, and
it was taken from the Wiki. I need to get the core functionality
working properly before I add the buttons and whatever.

Thanks in advance for any advice.

--
Dana
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list