How to create Trunk Sequence?

Hi,

Just need to know how to set the trunk sequence for outbound calls i.e. VoIP and TDM. Like first preference of call is VoIP and if it fails due to congestion/failure the outbound calls goes through TDM.

Please need this example in asterisk not in any other web gui.

Just put the Dial calls for each on successive “priorities”. If some conditions are fatal, test for values of ${DIALSTATUS} or the clearing cause, to discriminate. Asterisk will stop as soon as a call in answered, unless you set options to defeat this.

Thanks for your advise.