<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1">Hello !<br>
<br>
I'm using openser1.2.0 as a sip front-end to two asterisk servers. I
need Load Balancing and Failover, so I'm using the dispatcher module.<br>
I have a problem when I make a t_relay() since I have upgraded openser
from 1.1.1 to 1.2.0 (my openser.cfg was working in 1.1.1 version)<br>
<br>
Here are the modules and parameters I used :<br>
<br>
</font>
<blockquote>
  <blockquote><i><font size="-1">debug=5</font><br>
    <font size="-1">fork=yes</font><br>
    <font size="-1">log_stderror=no</font><br>
    <font size="-1">log_facility=LOG_LOCAL6</font><br>
    <font size="-1">children=4</font><br>
    <font size="-1">#check_via=no</font><br>
    <font size="-1">dns=off </font><br>
    <font size="-1">rev_dns=off</font><br>
    <font size="-1"></font><br>
    <font size="-1"># ------------------ module loading
----------------------------------</font><br>
    <font size="-1">loadmodule
"/usr/local/lib/openser/modules/maxfwd.so"</font><br>
    <font size="-1">loadmodule "/usr/local/lib/openser/modules/sl.so"</font><br>
    <font size="-1">loadmodule
"/usr/local/lib/openser/modules/dispatcher.so"</font><br>
    <font size="-1">loadmodule "/usr/local/lib/openser/modules/tm.so"</font><br>
    <font size="-1">loadmodule
"/usr/local/lib/openser/modules/avpops.so"</font><br>
    <font size="-1">loadmodule
"/usr/local/lib/openser/modules/mi_fifo.so"</font><br>
    <font size="-1">loadmodule
"/usr/local/lib/openser/modules/textops.so"</font><br>
    <font size="-1">loadmodule "/usr/local/lib/openser/modules/xlog.so"</font><br>
    <br>
    <font size="-1">#timer</font><br>
    <font size="-1">modparam("tm", "fr_timer", 5)</font><br>
    <br>
    <font size="-1">#dispatcher</font><br>
    <font size="-1">modparam("dispatcher", "list_file",
"/usr/local/etc/openser/dispatcher.cfg")</font><br>
    <font size="-1">modparam("dispatcher", "flags", 2)</font><br>
    <font size="-1">modparam("dispatcher", "dst_avp", "$avp(i:100)")</font><br>
    <font size="-1">modparam("dispatcher", "grp_avp", "$avp(i:101)")</font><br>
    <font size="-1">modparam("dispatcher", "cnt_avp", "$avp(i:102)")</font><br>
    <font size="-1">modparam("dispatcher", "force_dst", 1)</font><br>
    <font size="-1"></font><br>
    <font size="-1">#fifo</font><br>
    <font size="-1">modparam("mi_fifo","fifo_name", "/tmp/openser_fifo")</font></i><br>
  </blockquote>
</blockquote>
<font size="-1"><br>
<br>
<br>
Here is the route for REGISTER method :<br>
<br>
</font>
<blockquote>
  <blockquote><i><font size="-1">route[1]&nbsp;{</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds_select_dst("1", "0");</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_failure("1");</font><br>
    <font size="-1">}</font></i><br>
  </blockquote>
</blockquote>
<font size="-1"><br>
and my failure route :<br>
<br>
</font>
<blockquote>
  <blockquote><i><font size="-1">failure_route[1] {</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(t_check_status("408"){</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ds_mark_dst();</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(ds_next_dst) {</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; t_relay();</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else {</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; t_reply("503", "service not
available");</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</font><br>
    <font size="-1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</font><br>
    <font size="-1">}</font></i><br>
  </blockquote>
</blockquote>
<font size="-1"><br>
the fact is the t_relay() has no effect ... (users can't register on
Asterisk)<br>
for example when I make a forward() instead of a t_relay(), it's
working (register works, with load balancing) ! But the <i>t_on_failure("1")</i>
is never used, so I don't have failover ...<br>
<br>
Thanks for your help !<br>
<br>
</font>
<pre class="moz-signature" cols="72">-- 
Jean-Pierre Ramoul
El&egrave;ve Ing&eacute;nieur - Int&eacute;gration VoIP
TEAMLOG Grenoble
Telecom Lille 1
06.19.21.54.77</pre>
</body>
</html>