Remote device state

Is there any mechanism within Asterisk currently for doing something like “remote device state”?

By this, I mean querying another Asterisk system to get the device state of something there - not the trunk itself that may exist between the two systems.

This page is on the wiki, but this discusses distributed device state: Distributed Device State with AIS - Asterisk Project - Asterisk Project Wiki

I’m not interested in sharing or distributing device state at all. I’m purely interested in querying, on demand, the device state of something that DEVICE_STATE() on a remote Asterisk system would be able to determine. Obviously, this would be properly authenticated and such. It would seem that using switch => with IAX2 might be the closest thing that exists, since that’s generic dialplan, but I’m wondering if there’s a better way - this might work for doing remote HINTs but not DEVICE_STATE it would seem.

For context, currently we have a bit of a janky system for doing this in place. Whenever node A wants to query the status of extension C on node B, it performs a Dial() to node B using IAX2. There is a context on node B that simply checks the DEVICE_STATE and then hangs up with a certain cause code depending on the state; hence, the Dial is a dummy operation that always returns immediately. This is used for things like Busy Redial / Last Call Return, etc. cross nodes where a call should be attempted only if the line is free at the other end.

What would be nice is to eliminate this janky DEVICE_STATE → Dial → DEVICE_STATE component in the middle and be able to directly use DEVICE_STATE on node A.

Has anyone done something like this or have a suggestion on the best way? Being able to use DEVICE_STATE over IAX2 directly would be quite nice, and make it easier to structure an application around.

No, there is nothing built in to connect Asterisk instances like that and merely query. Only sharing/distributing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.