Re: ARI all subscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matt,
Thanks! That's a great update. Since I'm a relative newcomer to your world, where would I find out about updates like this in the future? I always read the "news" of a new release at http://www.asterisk.org/downloads/news and didn't see any mention of it (although I could have missed it).

After hunting some specific terms, I did find it on jira. Sorry for the newbie question. I just hope to be a better resource for ARI related items.

Mark Ingles

On October 19, 2015, at 9:46 PM, Matthew Jordan <mjordan@xxxxxxxxxx> wrote:

On Mon, Oct 19, 2015 at 1:05 PM, Mark Ingles <mark@xxxxxxxxxxx> wrote:
> Jim,
> By default, your Stasis app is only subscribed to events emitted by
> resources it creates or are passed to it by the Stasis() dialplan app.
>
> If you want to look at a test system with activity, there's no "ALL" idea
> like AMI.
>
> However, you should be able to use the subscribe to an event source:
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Applications+REST+API#Asterisk13ApplicationsRESTAPI-subscribe
>
> To get a list of possible event sources, for example bridges, you can get a
> list of all bridges then subscribe to them:
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Bridges+REST+API#Asterisk13BridgesRESTAPI-list
>

Hey Mark -

You are absolutely correct up until 13.6.0. In that version, we added
a new feature to subscribe to all events occurring within Asterisk
either through the WS connection or through the applications resource.

To set it up in the WS connection, you can pass subscribeAll=true when
requesting the WebSocket, e.g.,

GET https://localhost:8088/ari/events?app=foo&subscribeAll=true

Note that this effectively disables application specific
subscriptions, although you're allowed to make them (but it's
effectively a NoOp (for the most part))

Alternatively, you can subscribe to all events for a particular
resource type through the applications resource by removing any
specifier for the eventSource. Previously, this would have just
rejected the attempt; now it implies that you want everything for that
eventSource. As an example, the following subscribes you to all
channels:

POST https://localhost:8088/ari/applications/foo/subscription?eventSource=channel:

Matt

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

_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev



[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux