Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] AMI eventmask question


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
mdupuis at ocg.ca
Guest





PostPosted: Wed Jan 22, 2014 10:25 pm    Post subject: [asterisk-users] AMI eventmask question Reply with quote

I'm creating an AMI client and I only want to get newchannel events (as well as responses to any actions I initiate). What would I set the eventmask to to only get the newchannel events?

For anyone else looking...is there a table somewhere online that maps events to their eventmask categories? I checked the asterisk wiki and voip-info but can't find this...
Back to top
dan.jenkins88 at gmail...
Guest





PostPosted: Thu Jan 23, 2014 9:02 am    Post subject: [asterisk-users] AMI eventmask question Reply with quote

On Thu, Jan 23, 2014 at 3:25 AM, Michelle Dupuis <mdupuis@ocg.ca (mdupuis@ocg.ca)> wrote:


Hi
 
Quote:
I'm creating an AMI client and I only want to get newchannel events (as well as responses to any actions I initiate).  What would I set the eventmask to to only get the newchannel events?




Are you talking about the event filter in manager.conf?


Using event filters you can say if you want to receive an event or not, specific to the event, instead of the classification of system/call etc


Take a look at the event filters in this blog post and you'll see what I mean,


http://hungrygeek.holidayextras.co.uk/2012/05/14/elastix-apply-configuration-changes-problem/



 
Quote:
 
For anyone else looking...is there a table somewhere online that maps events to their eventmask categories?  I checked the asterisk wiki and voip-info but can't find this...


 
Dan 


 
Back to top
mdupuis at ocg.ca
Guest





PostPosted: Thu Jan 23, 2014 10:12 am    Post subject: [asterisk-users] AMI eventmask question Reply with quote

That's an interesting link - I didn't know you could set a per user eventfilter in the conf file

However, I'm hoping to do this in the AMI connection for more flexibility. Upon login, you can specify the event mask to restrict the type of events sent over the AMI connection. Looking through the Asterisk code I think Newchannel falls under the 'call' event flag...but it would be nice to restrict this even further (since lots of events fall under 'call').
From: asterisk-users-bounces@lists.digium.com [asterisk-users-bounces@lists.digium.com] On Behalf Of Daniel Jenkins [dan.jenkins88@gmail.com]
Sent: Thursday, January 23, 2014 9:03 AM
To: Asterisk Users List
Subject: Re: [asterisk-users] AMI eventmask question





On Thu, Jan 23, 2014 at 3:25 AM, Michelle Dupuis <mdupuis@ocg.ca (mdupuis@ocg.ca)> wrote:


Hi

Quote:
I'm creating an AMI client and I only want to get newchannel events (as well as responses to any actions I initiate). What would I set the eventmask to to only get the newchannel events?




Are you talking about the event filter in manager.conf?


Using event filters you can say if you want to receive an event or not, specific to the event, instead of the classification of system/call etc


Take a look at the event filters in this blog post and you'll see what I mean,


http://hungrygeek.holidayextras.co.uk/2012/05/14/elastix-apply-configuration-changes-problem/




Quote:

For anyone else looking...is there a table somewhere online that maps events to their eventmask categories? I checked the asterisk wiki and voip-info but can't find this...



Dan
Back to top
dan.jenkins88 at gmail...
Guest





PostPosted: Thu Jan 23, 2014 10:24 am    Post subject: [asterisk-users] AMI eventmask question Reply with quote

On Thu, Jan 23, 2014 at 3:06 PM, Michelle Dupuis <mdupuis@ocg.ca (mdupuis@ocg.ca)> wrote:
Quote:
That's an interesting link - I didn't know you could set a per user eventfilter in the conf file
 
However, I'm hoping to do this in the AMI connection for more flexibility.  Upon login, you can specify the event mask to restrict the type of events sent over the AMI connection.  Looking through the Asterisk code I think Newchannel falls under the 'call' event flag...but it would be nice to restrict this even further (since lots of events fall under 'call').



Ah, I remember what you're talking about now


https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ManagerAction_Events



That's the link to the Asterisk 12 AMI docs, the specs changed in 12 and some events are different but it's the best docs available for the AMI in my opinion - the specs didn't change much at all.


So in answer to your question, using EventMask, I don't think this is possible as EventMask only works with those blocks of permissions, like call and security. If you wanted to only get the one event type then you'd need to do that in manager.conf - I may be wrong on that, I haven't looked at the source code or anything but from what the docs say, and the docs are generated from the source code now, you can only specifiy those larger blocks,


Hope I've helped,


Dan


 
Quote:
From: asterisk-users-bounces@lists.digium.com (asterisk-users-bounces@lists.digium.com) [asterisk-users-bounces@lists.digium.com (asterisk-users-bounces@lists.digium.com)] On Behalf Of Daniel Jenkins [dan.jenkins88@gmail.com (dan.jenkins88@gmail.com)]
Sent: Thursday, January 23, 2014 9:03 AM
To: Asterisk Users List
Subject: Re: [asterisk-users] AMI eventmask question





On Thu, Jan 23, 2014 at 3:25 AM, Michelle Dupuis <mdupuis@ocg.ca (mdupuis@ocg.ca)> wrote:


Hi
 
Quote:
I'm creating an AMI client and I only want to get newchannel events (as well as responses to any actions I initiate).  What would I set the eventmask to to only get the newchannel events?




Are you talking about the event filter in manager.conf?


Using event filters you can say if you want to receive an event or not, specific to the event, instead of the classification of system/call etc


Take a look at the event filters in this blog post and you'll see what I mean,


http://hungrygeek.holidayextras.co.uk/2012/05/14/elastix-apply-configuration-changes-problem/



 
Quote:
 
For anyone else looking...is there a table somewhere online that maps events to their eventmask categories?  I checked the asterisk wiki and voip-info but can't find this...


 
Dan 


 









--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
mdupuis at ocg.ca
Guest





PostPosted: Thu Jan 23, 2014 10:33 am    Post subject: [asterisk-users] AMI eventmask question Reply with quote

Thanks - I've been through that doc before and couldn't find the info needed, which is why I went to the source code eventually.

All events are grouped, and each group is given a name/flag like 'system', 'call', etc. The docs just don't say which events are in which group/flag.

Perhaps something Digium could add at some point Smile
From: asterisk-users-bounces@lists.digium.com [asterisk-users-bounces@lists.digium.com] On Behalf Of Daniel Jenkins [dan.jenkins88@gmail.com]
Sent: Thursday, January 23, 2014 10:25 AM
To: Asterisk Users List
Subject: Re: [asterisk-users] AMI eventmask question






On Thu, Jan 23, 2014 at 3:06 PM, Michelle Dupuis <mdupuis@ocg.ca (mdupuis@ocg.ca)> wrote:
Quote:
That's an interesting link - I didn't know you could set a per user eventfilter in the conf file

However, I'm hoping to do this in the AMI connection for more flexibility. Upon login, you can specify the event mask to restrict the type of events sent over the AMI connection. Looking through the Asterisk code I think Newchannel falls under the 'call' event flag...but it would be nice to restrict this even further (since lots of events fall under 'call').



Ah, I remember what you're talking about now


https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ManagerAction_Events



That's the link to the Asterisk 12 AMI docs, the specs changed in 12 and some events are different but it's the best docs available for the AMI in my opinion - the specs didn't change much at all.


So in answer to your question, using EventMask, I don't think this is possible as EventMask only works with those blocks of permissions, like call and security. If you wanted to only get the one event type then you'd need to do that in manager.conf - I may be wrong on that, I haven't looked at the source code or anything but from what the docs say, and the docs are generated from the source code now, you can only specifiy those larger blocks,


Hope I've helped,


Dan



Quote:
From: asterisk-users-bounces@lists.digium.com (asterisk-users-bounces@lists.digium.com) [asterisk-users-bounces@lists.digium.com (asterisk-users-bounces@lists.digium.com)] On Behalf Of Daniel Jenkins [dan.jenkins88@gmail.com (dan.jenkins88@gmail.com)]
Sent: Thursday, January 23, 2014 9:03 AM
To: Asterisk Users List
Subject: Re: [asterisk-users] AMI eventmask question





On Thu, Jan 23, 2014 at 3:25 AM, Michelle Dupuis <mdupuis@ocg.ca (mdupuis@ocg.ca)> wrote:


Hi

Quote:
I'm creating an AMI client and I only want to get newchannel events (as well as responses to any actions I initiate). What would I set the eventmask to to only get the newchannel events?




Are you talking about the event filter in manager.conf?


Using event filters you can say if you want to receive an event or not, specific to the event, instead of the classification of system/call etc


Take a look at the event filters in this blog post and you'll see what I mean,


http://hungrygeek.holidayextras.co.uk/2012/05/14/elastix-apply-configuration-changes-problem/




Quote:

For anyone else looking...is there a table somewhere online that maps events to their eventmask categories? I checked the asterisk wiki and voip-info but can't find this...



Dan












--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
mjordan at digium.com
Guest





PostPosted: Thu Jan 23, 2014 3:46 pm    Post subject: [asterisk-users] AMI eventmask question Reply with quote

On Thu, Jan 23, 2014 at 9:31 AM, Michelle Dupuis <mdupuis@ocg.ca> wrote:
Quote:
Thanks - I've been through that doc before and couldn't find the info
needed, which is why I went to the source code eventually.

All events are grouped, and each group is given a name/flag like 'system',
'call', etc. The docs just don't say which events are in which group/flag.

Perhaps something Digium could add at some point Smile

Or someone from the open source community... this is an open source
project, after all Smile

The managerEventInstance XML elements already have an attribute for
the manager class, which is populated:

<managerEvent language="en_US" name="ParkedCallTimeOut">
<managerEventInstance class="EVENT_FLAG_CALL">
<synopsis>Raised when a parked call times out.</synopsis>
<syntax>
<parameter name="Exten">
<para>The parking lot extension.</para>
</parameter>
<parameter name="Channel"/>
<parameter name="Parkinglot">
<para>The name of the parking lot.</para>
</parameter>
<parameter name="CallerIDNum"/>
<parameter name="CallerIDName"/>
<parameter name="ConnectedLineNum"/>
<parameter name="ConnectedLineName"/>
<parameter name="UniqueID"/>
</syntax>
<see-also>
<ref type="managerEvent">ParkedCall</ref>
</see-also>
</managerEventInstance>
</managerEvent>

You could actually grep the core-en_US.xml file and get all of the
events that match to a particular class authorization.

It doesn't show up in the CLI due to the xmldoc API not parsing out
that attribute. The same is true for the wiki documentation; that
project is up on github [1]. It wouldn't be a large patch to either to
have that attribute displayed.

Matt

[1] https://github.com/asterisk/publish-docs

--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
dan.jenkins88 at gmail...
Guest





PostPosted: Thu Jan 23, 2014 4:04 pm    Post subject: [asterisk-users] AMI eventmask question Reply with quote

On Thu, Jan 23, 2014 at 8:46 PM, Matthew Jordan <mjordan@digium.com (mjordan@digium.com)> wrote:
Quote:
On Thu, Jan 23, 2014 at 9:31 AM, Michelle Dupuis <mdupuis@ocg.ca (mdupuis@ocg.ca)> wrote:
Quote:
Thanks - I've been through that doc before and couldn't find the info
needed, which is why I went to the source code eventually.

All events are grouped, and each group is given a name/flag like 'system',
'call', etc.  The docs just don't say which events are in which group/flag.

Perhaps something Digium could add at some point Smile


Or someone from the open source community... this is an open source
project, after all Smile

The managerEventInstance XML elements already have an attribute for
the manager class, which is populated:

    <managerEvent language="en_US" name="ParkedCallTimeOut">
        <managerEventInstance class="EVENT_FLAG_CALL">
            <synopsis>Raised when a parked call times out.</synopsis>
            <syntax>
                <parameter name="Exten">
                    <para>The parking lot extension.</para>
                </parameter>
                <parameter name="Channel"/>
                <parameter name="Parkinglot">
                    <para>The name of the parking lot.</para>
                </parameter>
                <parameter name="CallerIDNum"/>
                <parameter name="CallerIDName"/>
                <parameter name="ConnectedLineNum"/>
                <parameter name="ConnectedLineName"/>
                <parameter name="UniqueID"/>
            </syntax>
            <see-also>
                <ref type="managerEvent">ParkedCall</ref>
            </see-also>
        </managerEventInstance>
    </managerEvent>

You could actually grep the core-en_US.xml file and get all of the
events that match to a particular class authorization.

It doesn't show up in the CLI due to the xmldoc API not parsing out
that attribute. The same is true for the wiki documentation; that
project is up on github [1]. It wouldn't be a large patch to either to
have that attribute displayed.

Matt

[1] https://github.com/asterisk/publish-docs

--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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





Thanks Matt, I was going to ask where the tool was that generated from source, I'll take a look and see if I can contribute that back,


Dan
Back to top
dan.jenkins88 at gmail...
Guest





PostPosted: Tue Jan 28, 2014 10:50 am    Post subject: [asterisk-users] AMI eventmask question Reply with quote

On Thu, Jan 23, 2014 at 9:05 PM, Daniel Jenkins <dan.jenkins88@gmail.com (dan.jenkins88@gmail.com)> wrote:
Quote:



On Thu, Jan 23, 2014 at 8:46 PM, Matthew Jordan <mjordan@digium.com (mjordan@digium.com)> wrote:
Quote:
On Thu, Jan 23, 2014 at 9:31 AM, Michelle Dupuis <mdupuis@ocg.ca (mdupuis@ocg.ca)> wrote:
Quote:
Thanks - I've been through that doc before and couldn't find the info
needed, which is why I went to the source code eventually.

All events are grouped, and each group is given a name/flag like 'system',
'call', etc.  The docs just don't say which events are in which group/flag.

Perhaps something Digium could add at some point Smile


Or someone from the open source community... this is an open source
project, after all Smile

The managerEventInstance XML elements already have an attribute for
the manager class, which is populated:

    <managerEvent language="en_US" name="ParkedCallTimeOut">
        <managerEventInstance class="EVENT_FLAG_CALL">
            <synopsis>Raised when a parked call times out.</synopsis>
            <syntax>
                <parameter name="Exten">
                    <para>The parking lot extension.</para>
                </parameter>
                <parameter name="Channel"/>
                <parameter name="Parkinglot">
                    <para>The name of the parking lot.</para>
                </parameter>
                <parameter name="CallerIDNum"/>
                <parameter name="CallerIDName"/>
                <parameter name="ConnectedLineNum"/>
                <parameter name="ConnectedLineName"/>
                <parameter name="UniqueID"/>
            </syntax>
            <see-also>
                <ref type="managerEvent">ParkedCall</ref>
            </see-also>
        </managerEventInstance>
    </managerEvent>

You could actually grep the core-en_US.xml file and get all of the
events that match to a particular class authorization.

It doesn't show up in the CLI due to the xmldoc API not parsing out
that attribute. The same is true for the wiki documentation; that
project is up on github [1]. It wouldn't be a large patch to either to
have that attribute displayed.

Matt

[1] https://github.com/asterisk/publish-docs

--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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







Thanks Matt, I was going to ask where the tool was that generated from source, I'll take a look and see if I can contribute that back,


Dan






Hi, just to let you know that this is partially done now,


https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ManagerEvent_AgentConnect



At the bottom you'll see a Class


Next stage is to create a page which has all the classes and the events grouped by class.


But at least you can see which event is what class now.


Dan
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services