Cannot get "show" attribute of Contact to test for DND

Hello. I have a few queries regarding the IPCortex Javascript API.

When querying the list of contacts per queue, as per the API I check the “show” attribute. On every contact, however, the show attribute just comes back as “”. When using Google Developer Tools to check the object in the console, the attribute is actually just an empty string.

Could anyone please advise on another way to detect if a device or contact is on Do Not Disturb?

Also, is there any way to access calls on a specific extension if the contact has no phones or devices? It is just a voicemail queue but I need to track the calls to it.

Thank you in advance.

Hi,

Hopefully I can help.

You have found a small documentation error, The Contact.show property will be an empty string to indicate either offline state, or that there is insufficient permission to get state information from that contact; Viewing the Contact.states property will show what data is available to build the show value from.

Also please note that the contact object cannot show whether a device is ‘DnD’ as 'handset DnD is internalised in the handset and is not available via the API. The Contact state shows the contact’s XMPP/Chat state only.

Regarding the voicemail line, this is not something I’ve tried before, it depends how detailed or real-time your tracking needs to be. For very real-time results you would need to track calls on the trunk device coming into the PABX, and ignore calls that are not bridged to voicemail, Call.name === 'Voicemail' also, Call.number will represent the voicemail box number currently being called. More simply, monitor the number of read/unread messages in the mailbox by using the relevant mailbox object.

I imagine that the above will trigger further questions, but feel free to ask.

Regards,
Steve

Hi Steve,

Thank you very much for your help. So am I right in saying there is no way to find out if a device is in DnD state? I will check the Contact.states property and see if I can find anything there.

I have since sorted the Voicemail question. We got around it by doing some configuration on the extension within the IPCortex admin control panel.

Again, thank you very much for your help and will get in touch if I have any further queries.

Regards,

Tom

EDIT I’ve checked the Contact.states property of our contacts and they all seem to be empty as shown below:

Hi,

The empty states object suggests that either the target user is not online with the API (or XMPP) or that you have no XMPP roster permission to see their XMPP state.

You are correct that at present there is no way to know whether a handset is in DnD mode - There is a Broadcom extension to the SIP protocol that purports to reveal this data, but it is complicated and not currently supported by our SIP engine.

Regards,
Steve

Hi Steve,

For the moment we are just using this API as a live data feed from a group of agents, so nobody is logged into XMPP or the API as there is no interface for them to log in yet.

Thank you for the information and your support.

Regards,

Tom