Pjsip parameter device_state_busy_at not working

Hi all,
I am testing the device_state_busy_at parameter of pjsip, but it appears it does not work. My endpoint configuration is:

type = endpoint
context = inbound
disallow = all
allow = ulaw
allow = alaw
allow = g729
language = it
transport = transport-udp
auth = testtest
aors = testtest
identify_by = username
pickup_group = 1
call_group = 1
callerid = “testtest” <1>
force_rport = yes
rewrite_contact = yes
rtp_symmetric = yes
device_state_busy_at = 1

From asterisk console, with pjsip show endpoint I can see the device state parameter has been set correctly:

device_state_busy_at : 1

Nevertheless, when I am on call and a new direct call enters the pbx, asterisk does not send the busy signal to the caller and routes the call to my phone anyway.
Is there anything else that must be set in order to handle the device state busy?

Thanks

It controls device state, and then extension state of hints. It doesn’t prevent calls from going to the endpoint unless you write your own dialplan logic to check device state for dialing.

1 Like

Thank you very much. I checked the behavior with core show hints and it is consistent with the value I set.

you need to do something like this before Dial
same => n,ExecIf($["${DEVICE_STATE(PJSIP/${EXTEN})}"!=“NOT_INUSE”]?Busy(3))
same => n,ExecIf($["${HINT(${EXTEN})}"!=“NOT_INUSE”]?Busy(3))