How-to-determine-dnd-status-and-turn-off-on-from-asterisk-cli - follow up

Hello
I was trying to follow How-To: determine DND status (and turn off/on from Asterisk CLI) to adjust DND state on a yealink phone.

I tried:

  asterisk -rx "devstate change Custom:DND750 INUSE devstate change Custom:DND750 NOT_INUSE"

error result:
 Usage: devstate change <device> <state>
   Change a custom device to a new state.
   The possible values for the state are:
UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING
RINGINUSE | ONHOLD

Examples:
     devstate change Custom:mystate1 INUSE
     devstate change Custom:mystate1 NOT_INUSE

Any ideas on how to get that to work?

best regards
Roberto

You can’t combine them on one command line like that.

From asterisk -rv, make sure that Custom:DND750 is there by doing a ‘show hints’.

cnyjut:

one works:

 asterisk -rx "devstate change Custom:DND750 INUSE"
 Changing DND750 to INUSE

this not:

asterisk -rx “devstate change Custom:DND750 NOT_INUSE”
No such command '“devstate' (type 'core show help “devstate' for other possible commands)

I guess quote type is diff

asterisk -rx  "devstate change Custom:DND750 NOT_INUSE"
Changing DND750 to NOT_INUSE

Thank you for the help!

lgaetz:
thanks for that!

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