route { # ... /* call to PSTN */ if( /* is phone call */ ) { if(!load_gws("1")) { sl_send_reply("500", "Internal server error, unable to load phone gateways"); break; } } else /* is fax call */ { if(!load_gws("2")) { sl_send_reply("500", "Internal server error, unable to load fax gateways"); break; } } if(!next_gw()) { sl_send_reply("503", "Service not available, no gateways found"); break; } t_on_failure("2"); t_relay(); } failure_route[2] { if(method == "INVITE" && t_check_status("408|500|503")) { if (!next_gw()) { t_reply("503", "Service not available, no more gateways"); break; } t_on_failure("2"); t_relay(); } }