[Asterisk-Dev] Inter-server queries

Thomas Andrews tandrews at grok.co.za
Mon Aug 1 07:43:40 MST 2005


Hi,

I want to remotely query the status of a device (eg Zap/1) on another
asterisk server. Sort of like CHANISAVAIL, but from another * machine.
How would I go about doing that ?

I created a proc called action_devicestate() similar to
action_extensionstate(), and I can call it from the manager API no
problem. The idea is that I use the Management API to talk between
servers and exchange the info that I need.

In principle this works ok, but it's actually a bit kludgy because
ast_device_state() relies on the existance of a channel, so an on-hook
phone is reported as AST_DEVICE_UNKNOWN. Secondly devices like the IAXy
are *always* in state AST_DEVICE_NOT_INUSE.

Just wondering if I'm missing something obvious here...

Regards,
Thomas



More information about the asterisk-dev mailing list