A simple Trunk Group would work like this:
Voice Services > Gateways and Trunk Groups > Trunk Group1 >
TrunkList: sp1,sp2
DigitMap: (Msp1)
If sp1 registration failed or if all sessions for sp1 are in use, then outgoing calls will pass over to sp2. Registration failure may take a few minutes to be detected by the OBi, so for a time it won't know that sp1 has failed. Most voip providers allow at least two sessions (calls) on each trunk, so if sp1 has two simultaneous calls ongoing, then a third call will then pass on to sp2.
Your first problem is that I think you have only one provider – you don't say if it needs registration or not. If not, then the OBi will never know if it has failed.
I'm guessing that you are pointing vg3 and vg4 at the same provider on spX. Your OBi has no way of telling if vg3 or vg4 has failed as they are designed for outgoing use only and never require registration.
QuoteI still get the same 404 error and the 2nd route in the trunk
is not even attempted.
The 404 message is coming from your voip provider. You may wish to check Call History to make sure that the digits sent to the provider are correct for that service.
QuoteMay be to ask a bit differently what I want to do: is there a simple way to fork an outgoing call
over 2 routes/interfaces ?
OBi devices do not allow call forking on outbound calls. The only not simple way is to make the calls from a softphone/OBiAPP or OBiON, routing the calls through your OBi, which then makes them incoming calls to the OBi which can then be forked.
Sorry to give you so much bad news! Some of my assumptions about your setup may be wrong, so post back more details if you think something can be made to work.
I use trunk groups and find them very useful. They are not just useful for "failover" situations. When used as part of an InboundCallRoute, they can add a second stage to call routing similar to how Phone Port DigitMap and OutboundCallRoute works.