Hi,
I’d like to set custom device states such as the following regarding DND:
User wants to set DND on:
same => n,Set(DEVICE_STATE(Custom:DND${CALLERID(num)})=BUSY)
User wants to set DND off:
same => n,Set(DEVICE_STATE(Custom:DND${CALLERID(num)})=NOT_INUSE)
Now, if I define hints like so:
exten => _XXXX,hint,PJSIP/${EXTEN}&Custom:DND${EXTEN}
the DND/BUSY states will show up fine for all those endpoints that subscribe.
However, if an endpoint never registers and never enables/disables DND it can appear as IDLE/online instead of unavailable.
So, “core show hints” might show that EXTEN is in State:Unavailable if I DO NOT add Custom:DND${EXTEN} to “hint”, but it will show that EXTEN is in State:Idle if I do.
That means that any endpoint that subscribes to it will get an incorrect reading (online when it is not).
I really need to make sure the DND status is reflected in the device state (I don’t care for user presence/state). I read somewhere about PRESENCE_STATE and CustomPresence, but I might not need it (and I don’t necessarily have Digium devices).
All I need is that if a users sets DND on it’s device state should be set to BUSY, INUSE or ONHOLD or whichever the SIP/webrtc clients will see as “somewhat busy/unavailable”.
So it seems that if Custom:DND${EXTEN} is not explicitly set it will default to NOT_INUSE, correct?
I mean that if the hint is PJSIP/${EXTEN}&Custom:DND${EXTEN} and PJSIP/${EXTEN} is UNAVAILABLE or UNKNOWN and Custom:DND${EXTEN} is undefined then the overall hint will be NOT_INUSE and will show up as Idle with “core show hints”, correct?
In any case, how can one properly make use of custom hints as in my DND example?