# Get extensions state

**URL:** <https://community.asterisk.org/t/get-extensions-state/85558>\
**Category:** Asterisk SIP\
**Created:** [September 6, 2020, 3:08pm UTC](https://community.asterisk.org/t/get-extensions-state/85558 "2020-09-06T15:08:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![htrakotoarimanana](https://avatars.discourse-cdn.com/v4/letter/h/a87d85/32.png) [@htrakotoarimanana](https://community.asterisk.org/u/htrakotoarimanana)\
**Post date:** [September 6, 2020, 3:08pm UTC](https://community.asterisk.org/t/get-extensions-state/85558/1 "2020-09-06T15:08:13Z")

</div>

Hello,  
in sip.conf, I enable callcounter=yes  
How should I get the status of the device of operator if he put it into DND,  
In the cli with core show hints as result I get only Idle, Inuse and ringing  
I did not get those result

```auto
AST_DEVICE_UNKNOWN, /*!< Device is valid but channel didn't know state */
	AST_DEVICE_NOT_INUSE, /*!< Device is not used */
	AST_DEVICE_INUSE, /*!< Device is in use */
	AST_DEVICE_BUSY, /*!< Device is busy */
	AST_DEVICE_INVALID, /*!< Device is invalid */
	AST_DEVICE_UNAVAILABLE, /*!< Device is unavailable */
	AST_DEVICE_RINGING, /*!< Device is ringing */
	AST_DEVICE_RINGINUSE, /*!< Device is ringing *and* in use */
	AST_DEVICE_ONHOLD

```

Thanks you so much

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [September 6, 2020, 4:09pm UTC](https://community.asterisk.org/t/get-extensions-state/85558/2 "2020-09-06T16:09:18Z")

</div>

What do you mean by "putting it into “do not disturb”’. In particular, how is that reflect ed in information conveyed by the device to the PABX, and, of course, which signalling protocol is involved.

Unless it is actually Asterisk that is being told to put the phone into do not disturb, and the phone is still actually able to take calls, you are not going to be able to find out this information. However, there is nothing built in to Asterisk that will do this, so it will have to be implemented in dialplan, so we would need to know how your specific dialplan implements do not disturb.

---

<div class="post-metadata">

**Author:** ![htrakotoarimanana](https://avatars.discourse-cdn.com/v4/letter/h/a87d85/32.png) [@htrakotoarimanana](https://community.asterisk.org/u/htrakotoarimanana)\
**Post date:** [September 6, 2020, 4:20pm UTC](https://community.asterisk.org/t/get-extensions-state/85558/3 "2020-09-06T16:20:22Z")

</div>

> [@david551](#):
>
> dialplan

And How should I do to know that this operator put his status into DND?

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [September 6, 2020, 4:28pm UTC](https://community.asterisk.org/t/get-extensions-state/85558/4 "2020-09-06T16:28:27Z")

</div>

I don’t think you will be able to detect it until a call actually fails.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [October 6, 2020, 4:28pm UTC](https://community.asterisk.org/t/get-extensions-state/85558/5 "2020-10-06T16:28:31Z")

</div>

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