so it will become like this?

failure_route[1] {
  # status is 408 if openser session timer fires
  if (t_check_status("408")) {
$ru = "sip:"+$rU + "@" + $avp(s:failure_ip) + ":" + $avp(s:failure_port);
append_branch();
t_relay();
}



On Fri, Aug 8, 2008 at 11:06 AM, Mouncif Benniane <mouncifbb@gmail.com> wrote:
I did add it but still not working;  my server sends a 500 error to the voip provider(216.120.x.x), and keeps trying to connect to the non-responsive ip:



U 206.225.x.x:5060 -> 216.120.x.x:5060
  SIP/2.0 500 Server error occurred (19/SL)..Via: SIP/2.0/UDP 216.120.x.x
  ;branch=z9hG4bKf42f.9549f9f5.0..Via: SIP/2.0/UDP 64.24.35.x;branch=z9hG4b
  Kf42f.96ada2e1.0..Via: SIP/2.0/UDP 64.24.35.x;rport=5060;branch=z9hG4bK972
  rXHc84KemN..From: "617947xxxx" <sip:617947xxxx@64.24.35.x>;tag=0H5H6t1g0mZ
  2N..To: <sip:617933xxxx@64.24.35.x>;tag=e7c1de645436136957f0348d11a34701.
  6d26..Call-ID: 59df6cc7-dffc-122b-cfad-0030487d3edc..CSeq: 102985214 INVITE
  ..Openser..Content-Length: 0....




On Fri, Aug 8, 2008 at 10:37 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,

after setting the $ru in failure route you need to call append_branch()

Cheers,
Daniel


On 08/08/08 16:58, Mouncif Benniane wrote:
I am using openser 1.3, I can't make the failure_route to work properly.

here is my config:

modparam("tm", "fr_timer", 2) # set fr_timer


route{

if (is_method("INVITE")) {

avp_delete("*");

if (avp_db_query("SELECT prefix,grp_id,priority,custid,did,ip,port,failure_set,failure_i
p,failure_port FROM test_table WHERE prefix='$rU'","$avp(s:prefix);$avp(s:grp_id);$avp(s:priority);$avp(s:custid);$avp(s:did);$avp(s:ip);$avp(s:port
);$avp(s:failure_set);$avp(s:failure_ip);$avp(s:failure_
port)")) {


$ru = "sip:"+$rU + "@" + $avp(s:ip) + ":" + $avp(s:port);



if ($avp(s:failure_set) == y ) {
$avp(i:3) = 3;
t_on_failure("1");
t_relay();

}


}

} else {
   xlog("L_NOTICE", "avp_db_query() returned no records or failed query\n");
 };

}
### END OF ROUTING



failure_route[1] {

  # status is 408 if openser session timer fires
  if (t_check_status("408")) {

$ru = "sip:"+$rU + "@" + $avp(s:failure_ip) + ":" + $avp(s:failure_port);
t_relay();

}

}


route[1] {
       # send it out now; use stateful forwarding as it works reliably
       # even for UDP2TCP
       if (!t_relay()) {
               sl_reply_error();
       };
       exit;
}









So I set ip field to no responsive one and failure_ip to responsive one,  but still the invite does not fail to the last one (failure_ip) after the timeout.
Am I doing something wrong?


cheers!!
------------------------------------------------------------------------

_______________________________________________
Users mailing list
Users@lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
 

--
Daniel-Constantin Mierla
http://www.asipto.com