[incoming]
exten => _X.,1,Dial(SIP/${NumberToDial},26)
same => n,GotoIf($["${DIALSTATUS}" = “BUSY”]?numberbusy)
same => n,Hangup()
same => n(numberbusy),Dial(SIP/${OperatorsNumber},26)
same => n,GotoIf($["${DIALSTATUS}" = “BUSY”]?operatorbusy)
same => n,Hangup()
same => n(operatorbusy),Playback(announcement)
same => n,Hangup()
[internal]
exten => _X.,1,Dial(SIP/${EXTEN},26)
same => n,GotoIf($["${DIALSTATUS}" = “BUSY”]?hangup)
same => n(hangup),Hangup()
There are several other DIALSTATUSes you’ll want to account for. See “core show application Dial”.