Checking status of multiple extensions before paging

Hello experts,

We have Asterisk For paging a single Linksys SPA phone, I am using this dialplan:

exten => 101,1,GotoIf($[${DEVICE_STATE(SIP/101)}=NOT_INUSE]?FREE:BUSY)
exten => 101,n(FREE),SIPAddHeader(Call-Info:;answer-after=0)
exten => 101,n,Page(SIP/101)
exten => 101,n(BUSY),Hangup

This ensures that we will not page and auto answer a busy extension.

But for paging multiple extensions, I am using this:

exten => 100,1,SIPAddHeader(Call-Info:;answer-after=0)
exten => 100,n,Page(SIP/101&SIP/102&SIP/103)

This doesn’t check for device status, then it interrupts those extensions which are in calls.

The question: How to check for the status of multiple extensions and page only those who have NOT_INUSE status?

Did you RTFM ?

 > core show application Page 
 Valid options are:
        s - only dial channel if devicestate says it is not in use

Thanks for the great option. I am sorry that I didn’t notice it before even that I have read Page description many times. Maybe this option is new in 1.6.2.