[asterisk-app-dev] Get hint state
Joshua Colp
jcolp at digium.com
Tue Aug 15 04:56:16 CDT 2017
On Tue, Aug 15, 2017, at 04:06 AM, Niklas Larsson wrote:
> Hi,
>
> been looking over the docs for ARI and fail to find a way to get the
> hint state and to subscribe to a hint state.
>
> And why do I want this? To be able to check if I can call an user. The
> app I'm considering is to wait for a user to be free and then call him
> (like a lightweight queue)
>
> Is there a way?
Numerous people have done this so it is indeed possible. You can't
subscribe to hints, but you can subscribe to device state. That is: "I
want to receive events about the device state of PJSIP/alice" to know
when they are available, not available, etc. This is done by
subscribing[1] your application to the deviceState events of the device.
For PJSIP/alice you'd subscribe to "deviceState:PJSIP/alice"
[1]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+15+Applications+REST+API#Asterisk15ApplicationsRESTAPI-subscribe
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-app-dev
mailing list