<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=Big5" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewritehostport("voice_gateway_1:5060");<br>
You rewrite the URI ready to be t_relayed.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; forward(uri:host, uri:port);</font><br>
Then you explicitly forward the message before setting t_on_failure.<br>
g-)<br>
<br>
AR. wrote:
<blockquote cite="mid005801c6d247$400d9220$0d3d6e8c@ad.nchc.org.tw"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.2900.2963" name="GENERATOR">
  <style></style>
  <div><font size="2">Hi all</font></div>
  <div><font size="2">&nbsp;&nbsp;&nbsp; I have a problme about the failure route</font></div>
  <div><font size="2">&nbsp;&nbsp;&nbsp; </font></div>
  <div><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;My scenario is that:</font></div>
  <div><font size="2">&nbsp;&nbsp;&nbsp; If voice gateway 1 is busy then forward the
call to the voice gateway 2</font></div>
  <div>&nbsp;</div>
  <div><font size="2">&nbsp;&nbsp; My config is :</font></div>
  <div><font size="2">&nbsp;&nbsp; route[5] {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewritehostport("voice_gateway_1:5060");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; forward(uri:host, uri:port);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_failure("2");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(isflagset(1))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_branch();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(1);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
}<br>
&nbsp;failure_route[2] {</font></div>
  <div><font size="2">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(6);</font></div>
  <div><font size="2">}</font></div>
  <div><font size="2">route[6] {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewritehostport("voice_gateway_2:5060");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; forward(uri:host, uri:port);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br>
}<br>
  </font></div>
  <div><font size="2">&nbsp;But it still doesn't work</font></div>
  <div><font size="2">&nbsp;anyone help?</font></div>
  <div>&nbsp;</div>
  <div><font size="2">Best Regards</font></div>
  <div><font size="2">AR.</font></div>
  <div>&nbsp;</div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Serusers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Serusers@lists.iptel.org">Serusers@lists.iptel.org</a>
<a class="moz-txt-link-freetext" href="http://lists.iptel.org/mailman/listinfo/serusers">http://lists.iptel.org/mailman/listinfo/serusers</a>
  </pre>
</blockquote>
</body>
</html>