<div dir="ltr">
        
        


<p style="margin-bottom:0in;line-height:100%">Greetings,</p>
<p style="margin-bottom:0in;line-height:100%">I'm looking into
adding the ability for an ARI application to dynamically control
which event types it would like sent to it[1] (i.e. server side event
type filtering). I'm currently leaning toward implementing this as a
blacklist. I believe doing so would ease the development burden on
the Asterisk side as well as on the application side of things while
maintaining current application received event type expectations. Here's a proposed
REST interface:</p>
<p style="margin-bottom:0in;line-height:100%">GET
/applications/{applicationName}/excludeEventFilters</p><p style="margin-bottom:0in;line-height:100%">    Returns a list of
exclude event filters.</p>
<p style="margin-bottom:0in;line-height:100%">POST
/applications/{applicationName}/excludeEventFilters<br></p>
<p style="margin-bottom:0in;line-height:100%">    Using a json
object as a body parameter create a list of exclude event filters. This will overwrite any existing filters list. For now the json
object *might* look something like the following:<br></p>
<p style="margin-bottom:0in;line-height:100%">{  types: [
eventType, eventType, ...] }</p>
<p style="margin-bottom:0in;line-height:100%">By making it an
object this would make it possible to add more filtering in the
future without having to update the definition.<br></p>
<p style="margin-bottom:0in;line-height:100%">DELETE
/applications/{applicationName}/excludeEventFilters<br></p>
<p style="margin-bottom:0in;line-height:100%">    Remove all
filters from the exclude list.<br></p>
<p style="margin-bottom:0in;line-height:100%">If people wanted I
could also add the following?<br></p>
<p style="margin-bottom:0in;line-height:100%">PUT
/applications/{applicationName}/excludeEventFilters/{eventType}<br></p>
<p style="margin-bottom:0in;line-height:100%">    Add the specified
“eventType” to the exclude list.<br></p>
<p style="margin-bottom:0in;line-height:100%">DELETE
/applications/{applicationName}/excludeEventFilters/{eventType}<br></p>
<p style="margin-bottom:0in;line-height:100%">    Remove the
specified “eventType” from the exclude list.<br></p>
<p style="margin-bottom:0in;line-height:100%">Naming is hard, but
I've used “exclude” in order to signify that matches on a
specified filter would block messages being sent to the application.
“Filters” I've used because it's filtering the messages that are
being sent to the application, and later we might want to filter off
more than the event type name.<br></p>
<p style="margin-bottom:0in;line-height:100%">Anyhoo thoughts,
opinions, alternative ideas are most welcome.<br></p>
<p style="margin-bottom:0in;line-height:100%">Thanks!<br></p>
<p style="margin-bottom:0in;line-height:100%">[1]
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-28106">https://issues.asterisk.org/jira/browse/ASTERISK-28106</a><br></p><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Kevin Harwell<div>Digium - A Sangoma Company | Senior Software Developer<div>445 Jan Davis Drive NW - Huntsville, AL 35806 - US</div><div>Check us out at: <a href="https://digium.com" target="_blank">https://digium.com</a> & <a href="https://asterisk.org" target="_blank">https://asterisk.org</a></div></div></div></div></div>