[asterisk-dev] Dynamic server side event type filtering in ARI

Kevin Harwell kharwell at digium.com
Thu Dec 13 15:27:18 CST 2018


Greetings,

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:

GET /applications/{applicationName}/excludeEventFilters

    Returns a list of exclude event filters.

POST /applications/{applicationName}/excludeEventFilters

    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:

{  types: [ eventType, eventType, ...] }

By making it an object this would make it possible to add more filtering in
the future without having to update the definition.

DELETE /applications/{applicationName}/excludeEventFilters

    Remove all filters from the exclude list.

If people wanted I could also add the following?

PUT /applications/{applicationName}/excludeEventFilters/{eventType}

    Add the specified “eventType” to the exclude list.

DELETE /applications/{applicationName}/excludeEventFilters/{eventType}

    Remove the specified “eventType” from the exclude list.

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.

Anyhoo thoughts, opinions, alternative ideas are most welcome.

Thanks!

[1] https://issues.asterisk.org/jira/browse/ASTERISK-28106

-- 
Kevin Harwell
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: https://digium.com & https://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20181213/10ab096c/attachment.html>


More information about the asterisk-dev mailing list