# \[Rest API\]check devices state before click to call

**URL:** <https://forums.vitalpbx.org/t/rest-api-check-devices-state-before-click-to-call/2157>\
**Category:** Wish List\
**Created:** [December 28, 2022, 3:36am UTC](https://forums.vitalpbx.org/t/rest-api-check-devices-state-before-click-to-call/2157 "2022-12-28T03:36:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![norman\_namkoong](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/norman_namkoong/32/270_2.png) [@norman\_namkoong](https://forums.vitalpbx.org/u/norman_namkoong)\
**Post date:** [December 28, 2022, 3:36am UTC](https://forums.vitalpbx.org/t/rest-api-check-devices-state-before-click-to-call/2157/1 "2022-12-28T03:36:36Z")

</div>

Hi,

we wish to device state check (Registered or not) before click to call.  
because if device state is not registered it make problem when we use click to call by API.

i think like this add

**http://{{host}}/api/v2/devices/{{device-id}}/state**

thank you.

---

<div class="post-metadata">

**Author:** ![PitzKey](https://forums.vitalpbx.org/user_avatar/forums.vitalpbx.org/pitzkey/32/420_2.png) [@PitzKey](https://forums.vitalpbx.org/u/PitzKey)\
**Post date:** [December 28, 2022, 9:33am UTC](https://forums.vitalpbx.org/t/rest-api-check-devices-state-before-click-to-call/2157/2 "2022-12-28T09:33:27Z")

</div>

+1

VitalPBX devs should be easily able to implement this, as it is is possible to get the data from AMI and [ARI](https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+Devicestates+REST+API)
