<div dir="ltr">Hi All ,<div><br></div><div>  Â  Â I am using opensips-1.11 . I have some scenario in which there is two or more gateways corresponding to a single group .</div><div><br></div><div>  Â  Â for example :</div><div><br></div><div>  Â  Â grp id : 1 , domain : <a href="http://mongodb1.sasmita.com">mongodb1.sasmita.com</a></div><div>  Â  Â gate ways : </div><div>  Â  Â  gw:1 , address : <a href="http://162.1.1.1:5090">162.1.1.1:5090</a></div><div>  Â  Â  gw:2 , address : <a href="http://162.10.1.1:5080">162.10.1.1:5080</a></div><div><br></div><div>  Â So , what I want is that when call get connected to gw1 , if its fail then call get routed to the next gateway . </div><div><br></div><div><br></div><div>  Â What I have done for this is bellow :</div><div><br></div><div><div>mysql&gt; select * from dr_groups;</div><div>+----+----------+-------------------------------+---------+--------------+</div><div>| id | username | domain Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â | groupid | description Â |</div><div>+----+----------+-------------------------------+---------+--------------+</div><div>| Â 1 | Â  Â  Â  Â  Â | <a href="http://mongodb1.sasmita.com">mongodb1.sasmita.com</a> Â  Â  Â  Â  Â | Â  Â  Â  9 | out Â  Â  Â  Â  Â |</div><div>+----+----------+-------------------------------+---------+--------------+</div><div><br></div><div>mysql&gt; select * from dr_gateways;</div><div>+----+------+------+---------------------+-------+------------+-------+------------+-------+--------+--------------+</div><div>| id | gwid | type | address Â  Â  Â  Â  Â  Â  | strip | pri_prefix | attrs | probe_mode | state | socket | description Â |</div><div>+----+------+------+---------------------+-------+------------+-------+------------+-------+--------+--------------+</div><div>| 10 | 4 Â  Â | Â  Â 2 | <a href="http://162.1.1.1:5090">162.1.1.1:5090</a> Â  Â  Â | Â  Â  0 | NULL Â  Â  Â  | NULL Â | Â  Â  Â  Â  Â 0 | Â  Â  0 | NULL Â  | sipp one Â  Â  |</div><div>| Â 8 | 2 Â  Â | Â  Â 2 | <a href="http://162.10.1.1:5080">162.10.1.1:5080</a> Â  Â  | Â  Â  0 | NULL Â  Â  Â  | NULL Â | Â  Â  Â  Â  Â 0 | Â  Â  0 | NULL Â  | asterisk Â  Â  |</div><div>+----+------+------+---------------------+-------+------------+-------+------------+-------+--------+--------------+</div><div>mysql&gt;</div><div>mysql&gt; select * from dr_rules;</div><div>+--------+---------+--------+---------+----------+---------+--------+-------+---------------+</div><div>| ruleid | groupid | prefix | timerec | priority | routeid | gwlist | attrs | description Â  |</div><div>+--------+---------+--------+---------+----------+---------+--------+-------+---------------+</div><div>| Â  Â  32 | 9 Â  Â  Â  | Â  Â  Â  Â | Â  Â  Â  Â  | Â  Â  Â  Â 0 | Â  Â  Â  Â  | 2 Â  Â  Â | NULL Â | fail route Â  Â |</div><div>| Â  Â  29 | 9 Â  Â  Â  | Â  Â  Â  Â | Â  Â  Â  Â  | Â  Â  Â  Â 1 | Â  Â  Â  Â  | 4 Â  Â  Â | NULL Â | out Â  Â  Â  Â  Â  |</div><div>+--------+---------+--------+---------+----------+---------+--------+-------+---------------+</div></div><div><br></div><div>This is my table of content .</div><div><br></div><div>  Â  Â  In my opensips script I have done the bellow things .</div><div><br></div><div>Starting I have loaded all the modules . then the below things happening .</div><div>  Â I have loaded drouting and dialplan , inaddition to this all the necessary modules .</div><div>  Â  Â  Â Â </div><div><br></div><div><br></div><div><font color="#0b5394">route{</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (!mf_process_maxfwd_header(&quot;10&quot;)) {</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>exit;</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>};</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (msg:len &gt;= Â 2048 ) {</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>exit;</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>};</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (method==&quot;SUBSCRIBE&quot;) {</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>sl_send_reply(&quot;405&quot;, &quot;Method not allowed&quot;);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>exit;</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>}</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (method==&quot;NOTIFY&quot;) {</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>sl_send_reply(&quot;405&quot;, &quot;Method not allowed&quot;);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>exit;</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>}</font></div><div><font color="#0b5394">  Â  Â  Â  if (method==&quot;OPTIONS&quot;) {</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>sl_send_reply(&quot;200&quot;, &quot;OK&quot;);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>exit;</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>}</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (!method==&quot;REGISTER&quot;)</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>record_route();</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (loose_route()) {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  setflag(2);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>route(1);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>};</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (!uri==myself) {</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span># drop packets, look at orig file for original config</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  route(1);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span>exit; </font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>}</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (uri==myself) {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  <span class="" style="white-space:pre">        </span>force_rport();</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  if ( is_method(&quot;REGISTER&quot;)) {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â </font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  if(($hdr(User-Agent)!~&quot;scanner&quot;)||($hdr(User-Agent)!~&quot;SJphone&quot;)) Â  # to stop scanners</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â { </font></div><div><span class="" style="white-space:pre"><font color="#0b5394">                </font></span></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  if(is_present_hf(&quot;X-Info&quot;))</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  $var(x)=$hdr(X-Info);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  $var(y)=$(var(x){s.select,0,;});</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  $var(z)=$(var(x){s.select,1,;});</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  $var(y)=$(var(y){s.select,1,=});</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  $var(z)=$(var(z){s.select,1,=});</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  if($(var(y){<a href="http://s.int">s.int</a>})!=0)</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  save(&quot;location&quot;,&quot;p1n$var(z)&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  exit;</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â }else{</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  save(&quot;location&quot;,&quot;rp1&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  append_to_reply(&quot;Contact: $ct \r\n&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  xlog( &quot;L_NOTICE&quot;, &quot;Contact &amp; $ct \n&quot; );</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  sl_send_reply(&quot;200&quot;,&quot;OK&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  exit;</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â }</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â }else{</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  save(&quot;location&quot;,&quot;p1n5&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  exit;</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â }</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â ; save(&quot;location&quot;,&quot;fc10p1&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  m_dump(&quot;$fu&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â }</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span>exit;</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>}</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  <span class="" style="white-space:pre">        </span> Â  Â if ( is_method(&quot;CANCEL&quot;) )</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  if ( t_check_trans() ){</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â t_relay();</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â }</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  else { </font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â t_reply(&quot;200&quot;,&quot;OK&quot;); </font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â } Â  Â </font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â exit;</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â }</font></div><div><font color="#0b5394">  Â </font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  if (is_method(&quot;BYE&quot;)) {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  setflag(2);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  setflag(TRACE_FLAG);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  t_relay();</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  exit; Â </font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  }</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  if (is_method(&quot;INVITE&quot;)) {</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  setflag(4);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span>setflag(2);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  xlog( &quot;L_NOTICE&quot;, &quot;CallCenter_Info &amp; $ci,$var(c) \n&quot; );</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  if(is_from_gw() || Â (to_uri=~&quot;@<a href="http://190.168.1.1">190.168.1.1</a>&quot;))</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span> Â  Â  Â  Â  {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â Â </font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span> Â  Â  Â  Â  Â  Â xlog( &quot;L_WARN&quot;, &quot;Source IP sas : $Ri To Uri : $tu From : $fU Request URI: $oU Call ID:$ci&quot; );</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â </font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span> Â  Â if ( !lookup(&quot;location&quot;)){</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                                </span>sl_send_reply(&quot;404&quot;,&quot;NO Match Found&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  exit;</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span> Â  Â  Â  Â  Â  Â }</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span> Â  Â #do lcr</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span> Â  Â if ( !serialize_branches(1)){</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                                </span>sl_send_reply(&quot;500&quot;,&quot;Internal Server Error&quot;);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                                </span>exit;</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span> Â  Â }</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â else{</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                                </span>next_branches();</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                                </span>t_on_failure(&quot;3&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  route(1);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â <span class="" style="white-space:pre">        </span>exit;<span class="" style="white-space:pre">        </span></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span> Â  Â  } </font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â }<span class="" style="white-space:pre">        </span></font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â #}</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                        </span>else{</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  }</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>}</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>route(10);</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>};</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">route[1] {</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (nat_uac_test(&quot;7&quot;)) {</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>fix_nated_contact();</font></div><div><font color="#0b5394">  Â  Â  Â  };</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>t_on_reply(&quot;1&quot;);</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (!t_relay()) {</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">                </span>sl_reply_error();</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>};</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>exit;</font></div><div><font color="#0b5394">}</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">route[10] {</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">$avp(src) = $rd;</font></div><div><font color="#0b5394">xlog(&quot;request domain,$avp(trl)&quot;);</font></div><div><font color="#0b5394">dp_translate(&quot;5&quot;, &quot;$avp(src)/$avp(trl)&quot;);</font></div><div><font color="#0b5394">$avp(grp)=$(avp(trl){<a href="http://s.int">s.int</a>});</font></div><div><font color="#0b5394">xlog(&quot;translated to Â $avp(grp) \n&quot;);</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  if (!do_routing(&quot;$avp(grp)&quot;,&quot;F&quot;)) {</font></div><div><font color="#0b5394">  Â  Â  Â  xlog(&quot;do_routing: No rules matching the URI\n&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  send_reply(&quot;503&quot;,&quot;No rules matching the URI&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  exit;</font></div><div><font color="#0b5394">  Â  }</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  if (is_method(&quot;INVITE&quot;)) {</font></div><div><font color="#0b5394">  Â  Â  Â  t_on_failure(&quot;10&quot;);</font></div><div><font color="#0b5394">  Â  }</font></div><div><font color="#0b5394">  Â  route(1);</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">}</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">onreply_route[1] {</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  Â  Â  if( status =~ &quot;18[0-9]&quot; ) {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  t_on_failure(&quot;4&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  }</font></div><div><font color="#0b5394"><span class="" style="white-space:pre">        </span>if (nat_uac_test(&quot;1&quot;)) {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  fix_nated_contact();</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  Â  Â  Â  };</font></div><div><font color="#0b5394">}</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">failure_route[10] {</font></div><div><font color="#0b5394">  Â  xlog(&quot;DEBUG: DROUTING failure route active\n&quot;);</font></div><div><font color="#0b5394">  Â  Â if (t_check_status(&quot;408|402|50[234]&quot;)) {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  # route to the next gateway</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â xlog(&quot;DEBUG: DROUTING use next gateway \n&quot;); </font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â if (use_next_gw()) {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  # prepare for lcr failover</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  xlog( &quot;L_NOTICE&quot;, &quot;[$Tf] ACC: $ci Next gateway $fU -&gt; $tU via $rd\n&quot; );</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  t_on_reply(&quot;1&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  t_on_failure(&quot;10&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  # send from 5060 for primus gateways</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  if (!t_relay()){</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  exit;</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  }</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  } else {</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  xlog( &quot;L_WARN&quot;, &quot;[$Tf] FR: $ci No more buscuits in the biscuit tin -&gt; 503.\n&quot; );</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  t_reply(&quot;503&quot;, &quot;Service unavailable -- no more gateways&quot;);</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  exit;</font></div><div><font color="#0b5394">  Â  Â  Â  Â  Â  Â  Â  };</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">  Â  Â  Â  };</font></div><div><font color="#0b5394">  Â  Â  Â  exit;</font></div><div><font color="#0b5394">}</font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394"><br></font></div><div><font color="#0b5394">failure_route[4] {</font></div><div><font color="#0b5394">  Â  Â xlog(&quot;L_NOTICE&quot;,&quot;could not complete&quot;);</font></div><div><font color="#0b5394">}</font></div><div><br></div><div><br></div><div>  Â  Â  Â  Â  Â I want to switch to the next gateway in the status codes defined in the failure route . But , now its not switching the gateway . Its just coming to the else loop and giving Â  503 error .  I think there is something missing in my script or in my dynamic routing table . Â  Â Â </div><div>  Â  Â </div><div>  Â  Please let me know if I need to change something . I am trying this from very long time but not getting any result . Any kind of help is appreciated .</div><div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><b><i>Thanks &amp; Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div>
</div></div>