In my experience, with the normal SIP to PRI TA900 setup, the moment the PRI goes down, the TA900 will send SIP 503 to the network. You would then configure the network to route advance to another trunk or forward the call to a different number, if available. It's also possible to adjust the error sent back to the network inside Adtran. For example, adding "voice cause-code-map from-pri 41 486" will send a SIP 486 back to the network, instead of SIP 503, which most networks will interpret busy, and a slow busy signal will be played to the caller.
While TA900 has TCL scripting facility, I haven't personally used it. Also, i could see issues with post-dial delay being introduced if you were to simply take your TA900's SIP trunk out of service, as the network would have to try to send multiple INVITEs to the TA900, before giving up and trying an alternate route. With the SIP 503 you get today, that is not an issue, as the network knows right away that the TA is not able to accept the call.
Regards,
Yan.