Architecture with 2 Opensips and 2 Asterisks

Dear community,

I would like to setup an architecture with 2 proxy VMs (Opensips) and 2 Asterisk VMs.
Please note that the configuration for the 2 proxies will be Active/Standby, so only each one of them will have all the incoming traffic, unless it is decided to turn traffic to the 2nd Opensips (e.g. due to maintenance).
My question is if there is an automatic process, so that Asterisk can choose between the 2 proxies for the outgoing calls. How would you propose to handle this issue?

Thank you in advance for your time.

Usually, an Active/Standby setup is with a Floating/Virtual IP. In that case Asterisk would be sending traffic only to the virtual IP, regardless on which node it is currently assigned to.