Device State Function with multiple contact PJSIP

Hi,

Is it possible to test the device state of all the contacts of an endpoint? Basically I just test the state of the endpoint with ${DEVICE_STATE(PJSIP/XXX)} function, if it is busy I don’t ring it except that I will have to connect 2 phones to the same endpoint and I would like the 2nd phone to be able to ring even if the first one is already online and if both phones are online, do not ring them.

Thanks

I don’t know what that means exactly, but the device state of an endpoint is an aggregate of all contacts. If any are available, then the contact is available. If the number of calls matches the busy at value, then it’s busy.