How to set Custom Device State by AMI Script?


Need some help regarding Custom Device State. I am working on Node.js library for Agent Portal integration with Asterisk v13. every thing work fine but i need to change Agent status by clicking button on Agent portal.

if it is not possible with AMI please advise any other solution

Custom device state can be manipulated from AMI using the Setvar[1] AMI action. This works like the dialplan, where the variable would be the DEVICE_STATE dialplan function.


1 Like

which variable should i set by ami script?
i have use command action for devstate change because DEVICE_STATE change ami action not available. I also use command DBPUT entry in DND/exten.
another thing that i want to know in device state can i put custom state like when Agent go for launch state shows LAUNCH_BREAK. i want on my wallboard show agent state

You set DEVICE_STATE(Custom:name) where name is the name of the custom device state. What that is depends on how you are using everything…

As for other device states no, only those explicitly allowed work.