<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/3417/">https://reviewboard.asterisk.org/r/3417/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On April 5th, 2014, 3:02 a.m. EDT, <b>Olle E Johansson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I would like to see a configuration option for this, as it will generate a massive amount of events in busy servers.</pre>
</blockquote>
<p>On April 7th, 2014, 11:40 a.m. EDT, <b>Mark Michelson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">That's fair. I can think of two ways to do this:
1) The DeviceStateChange and PublishStateChange belong to a new event category. This way, you can add the event category to your read= line in manager.conf if you want to see the event, or you can leave the category off if you don't.
2) There can be individual configuration options in manager.conf to suppress certain events. This would act as a generic method to disable the publication of certain events and could be applied to any event.
Personally, I like number 2 more, but I'm willing to hear suggestions for other ways of doing this.</pre>
</blockquote>
<p>On April 10th, 2014, 4:23 p.m. EDT, <b>Mark Michelson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Interestingly, I wasn't aware of this until I dived into the manager code, but you can already set up individual events to be filtered out if you want. If you put
eventfilter = !DeviceStateChange
eventfilter = !PresenceStateChange
Then these events will be suppressed. This has been around since 1.8</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">eventfilters are for preventing excessive TCP traffic, or hiding certain events for security reasons. They actually add CPU overhead. Each eventfilter runs regexec() from within an ao2_t_callback_data for every event. I am also concerned about the impact of topic_forwarder generating full AMI packets before eventfilters are processed.
As an alternative, isn't the point of stasis so we don't add stuff to the core unless it's universally useful? If this were res_manager_devicestate and res_manager_presencestate or similar, they could easily be set to noload. I have no doubt the information provided by these events will be useful to some, but not me. I'm not tied to the idea of this stuff living in modules, but would like to see a way to disable the topic_forwarder's.</pre>
<br />
<p>- Corey</p>
<br />
<p>On April 10th, 2014, 4:10 p.m. EDT, Mark Michelson wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Mark Michelson.</div>
<p style="color: grey;"><i>Updated April 10, 2014, 4:10 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">AMI does not emit events when device state or presence state changes. The closest things that exist currently are the ExtenstionStatus and PresenceStatus events, which inform about device state and presence state events as they pertain to hints in the dialplan. These new events are raised for every device state change or presence state change in Asterisk.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">See /r/3418</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/main/presencestate.c <span style="color: grey">(411714)</span></li>
<li>/trunk/main/manager.c <span style="color: grey">(411714)</span></li>
<li>/trunk/main/devicestate.c <span style="color: grey">(411714)</span></li>
<li>/trunk/include/asterisk/presencestate.h <span style="color: grey">(411714)</span></li>
<li>/trunk/include/asterisk/devicestate.h <span style="color: grey">(411714)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3417/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>