1) А проверить? Смоделировать ситуацию и промониторить поведение?
2) Можно и не проверять, а написать конструкцию чуть сложнее: Dial second trunk based on Return codes
exten => _[7-8]9XXXXXXXXX,1,Dial(SIP/operator1/7${EXTEN:1},50)
same => n,NoOp(Dial status is ${DIALSTATUS})
same => n,ExecIf(${DIALSTATUS}=NOANSWER)?Dial(SIP/operator2/7${EXTEN:1},50)
Dial sets DIALSTATUS to indicate its success or failure. However, under some circumstances, execution will jump to priority n+101 in the current context. This happens when:
All channels dialed were busy
There is exists something at n+101 in the current context
You are running asterisk 1.0.x, priorityjumping=yes is set in extensions.conf, or the j option is specified in the dial command
If the g option is specified, and the called party hangs up before the calling party, then Dial continues execution at priority n+1.
Do Progress() before calling Dial() if you want asterisk to go in-band (in order to use playtones configured in indications.conf etc.). In some cases you may have to use Answer(), but that is to be avoided because it “charges”, prevents auto-redial, etc.
Note: The bristuff patches change the dial behaviour slightly and jump to n+201 if the dialed destination isn’t connected (e.g. a SIP softphone is not up and running, or hasn’t registered).
DIALSTATUS – For more details see Asterisk variable DIALSTATUS
${DIALSTATUS} will be one of:
CHANUNAVAIL : Channel unavailable (for example in sip.conf, when using qualify=, the SIP chan is unavailable)
BUSY : Returned busy
NOANSWER : No Answer (i.e SIP 480 or 604 response)
ANSWER : Call was answered
CANCEL : Call attempt cancelled (i.e user hung up before the call connected)
DONTCALL : Privacy manager don’t call
TORTURE : Privacy manager torture menu
CONGESTION : Means Congestion, or anything else (some other error setting up the call)
https://www.voip-info.org/asterisk-cmd-dial/