SIP trunk failover on find me

Hi,
how can I process trunk congestion in a find me set up?

I am dialing multiple destinations with Dial() on a SIP outbound trunk:

Currently in case the SIP trunk ‘TRUNK1’ is down only the SKYPE destination will ring.

The ideal behavior would be to use ‘TRUNK2’ in case of ‘TRUNK1’ if ‘TRUNK1’ is down.
I do a sanity check of the trunks with ChanIsAvail() before the dial.
That doesn’t help if the trunk wasn’t paid :unamused: (SIP response 603) or if the service is not working (SIP response 500).

Any ideas for a workaround?
Maybe some SIP test call check before the actual call?

Thanks,
heinz

Should be able to do this with a local channel.

Thanks David -
this hint was exactly what I needed!

For whom it may concern this is how I solved my specific problem:

Instead:

Do this:

extensions.conf:

[external]
exten => _XXXX.,1,Noop(Dial out to ${EXTEN})
exten => _XXXX.,n,Macro(safedial,${EXTEN})

The safedial macro is quite similar to the one you find on voip-info.org for using different outbound trunks.

Thanks again,
heinz