[Asterisk-Users] Monitor via Manager question

Alexander Lopez alex.lopez at opsys.com
Wed Apr 20 09:18:32 MST 2005


It is a kludge but should work:

Action: Command 
command: show channels

Then sort based upon the result and you should have the two final
variables you need.

SIP/8000-????? And Zap/??

You can then Monitor the SIP channel or just grab the Zap.  I would go
with the former as you could then monitor any call to any technology.

Let me know how you do.




-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Dana Olson
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