On Thu, Apr 06, 2006 at 01:27:18PM +0200, Tomasz Stafin wrote:
Helo everyone! I've a problem with forwarding. My gateway return a "480" response when line is offline and I'm trying to forward to another gateway when line is offline (480 is return). I don't want to use t_on_failure. I write something like this:
Why don't you like to use t_on_failure? You have to, you cannot check the status of the response processing the request. So your config should look like (not much deffering from your version :-)
if (uri="sip:0@.*"){ sethost("192.168.10.1"); t_on_failure("1"); t_relay(); }
failure_route[1] { if (t_check_status ("480")) { # final response received, we need to create new branch append_branch(); sethost("192.168.10.2"); t_on_failure("2"); t_relay(); break; } }
failure_route[2] { #your second gateway failed too.... }
Michal