[Question] Can Use 「ChanIsAvail 」to check extension status?

Hi,
I wanna use 「ChanIsAvail」 to check extensions Status.
exten => s,1,ChanIsAvail(SIP/${ARG1},s)
But I try to get the status always 1.

I try to keyin channel value , will get correct status such as busy.
exten => s,1,ChanIsAvail(SIP/204-00000016,s)

how can I got the callee channel in dialplan ?

thx everyone.

Did you mean you would like to use it?

ChanIsAvail doesn’t tell you about extensions only about devices.

I believe it requires call counters (or is that limits) to be enabled for it tor return useful “in use” information, and it would require qualify a or a dynamic host to give some of the other values.

I want to get ${AVAILSTATUS} = 4 when the callee device is busy.

actually device 204 is busy, use chanisavail(SIP/204,s) always got 1 (Not In Use).

I try chanisavail(SIP/204-00000001,s) cat get correct ${AVAILSTATUS} = 4

So I want get callee device channel variable to use in chanisavail.

That use is deprecated. You should use group counts, instead. The semantics of call limits are not clear when both sides may may calls.

If you insist on using it, you definitely need call limits, as they only way that Asterisk knows that the device is busy, without actually calling it, is by knowing how many calls are already using it.

If the device can also initiate calls, you will still get glare cases, where they go busy after you make the test.