I seem to not get how does the DEVICE_STATE function work. When I get a call to extension that is busy DEVICE_STATE still returns “NOT_INUSE” instead of “BUSY”. Am I missing something? Do I have to apply additional configuration to get the DEVICE_STATE function work?
-- Executing [999999999@local:1] NoOp("SIP/provider-0000162c", "999999999 device state is NOT_INUSE ") in new stack
.........
-- Executing [999999999@locales:10] Dial("SIP/provider-0000162c", "SIP/999999999, 30") in new stack
.........
-- Got SIP response 486 "Busy Here" back from 10.10.51.123:5060
-- SIP/999999999-0000162d is busy
It can only report what Asterisk knows. The 486 response came from the remote side, and the only way Asterisk has to discover this is to attempt a call.