exten => s,n,GotoIf($[("${DIALSTATUS}" = "CHANUNAVAIL")
| ("${DIALSTATUS}" = "CONGESTION")]?:${DIALSTATUS})
...
exten => s,n(BUSY),Noop(We got BUSY)
exten => s,n,Busy()
exten => s,n(NOANSWER),Noop(We got NOANSWER)
exten => s,n,Congestion()
etc.
So Goto'ing a priority rather than an extension.
For the original poster, the simplest/crudest way is simply:
exten => s,n,Dial(SIP/4000,,10)
exten => s,n,Dial(SIP/4001,,10)
exten => s,n,Dial(SIP/4002,,10)
exten => s,n,Dial(SIP/4003,,10)
exten => s,n,Voicemail...
knowing that if one of the Dial's succeedes then the rest of them will not
action and if it fails to bridge for any reason execution will just carry
on to the next step...
Gordon