Hello experts,
We have Asterisk 1.6.2.19. 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?