[OpenSER-Users] Info about "TM/473 Filtered"?

Zahid Mehmood zm23 at columbia.edu
Tue Jul 31 17:53:49 CEST 2007


I am trying that but it seems like that when an IP is filtered it  
doesn't even go to failure route.

This is what i have in my config:

In route[4] I have:

     t_on_reply("4");            # grab replies so we can log reply  
code/status
     t_on_failure("4");          # if gateway unavail go to 4
     if (!next_gw()) {
         sl_send_reply("503", "Service not available - No gateways");
         return;
     };
    if (!t_relay()) {
         sl_reply_error();
     };
     xlog("L_INFO","$ci: leave route[4]: - M=$rm RURI=$ru F=$fu T=$tu  
IP=$si\n");
} # end of route[4]




failure_route[4] {
     xlog("L_INFO","$ci: failure_route[4] - M=$rm RURI=$ru F=$fu T= 
$tu IP=$si\n");
     if (t_check_status("(5..)|(6..)|(403)|(408)|(473)|(480)")) {  #  
gateway failure/refusal
         xlog("L_INFO","$ci: failure_route[4] gateway failure/refusal 
\n");
         if (!next_gw()) {
             xlog("L_CRIT","$ci: No more gateways for <$tu>\n");
             t_reply("503", "Service not available - No more gateways");
             return;
         } else {
             xlog("L_INFO","$ci: failure_route[4] next gw r-uri <$ru>  
\n");
             t_on_reply("4");
             t_on_failure("4");
             t_relay();  # send it off to try next gw.
             return;
         }
     }
     xlog("L_INFO","$ci: failure_route[4]: relaying normal error\n");
     t_relay();
}


First time around calls do make it to failure route, however, when an  
IP is blacklisted, it never makes it to to the failure route.


Debug=9 openser.log snippet:

First time around:

DEBUG: timer routine:0,tl=0xb6023120 next=(nil), timeout=53
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]: DEBUG:  
final_response_handler:stop retr. and send CANCEL (0xb6022fb8)
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]:  
DEBUG:tm:t_should_relay_response: T_code=100, new_code=408
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]:  
DEBUG:tm:t_pick_branch: picked branch 0, code 408
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]:  
DEBUG:tm:t_should_relay_response: dns-failover test: branch=0,  
last_recv=408, flags=1
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]:  
DEBUG:tm:t_should_relay_response: trying DNS-based failover
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]:  
DBG:add_list_to_head: adding to bl dns 0xb6025718,0xb6025718
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]:  
ZDZiZjJhOTAzYTY3ZTQ4ZTA0ZjhkZGUyMTE5MTUyMzc.: failure_route[4] -  
M=INVITE RURI=sip:16460000000 at 67.151.91.91:5060;transport=udp F=sip: 
10510 at host.columbia.edu T=sip:9316466756523 at host.columbia.edu  
IP=10.39.244.21
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]:  
DEBUG:t_check_status: checked status is <408>
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]:  
ZDZiZjJhOTAzYTY3ZTQ4ZTA0ZjhkZGUyMTE5MTUyMzc.: failure_route[4]  
gateway failure/refusal
Jul 31 11:36:50 mousse /usr/sbin/openser[22814]: ******* setting for  
branch 0 flags 0



After ip is blacklisted:

openserctl fifo list_blacklists
List:: dns owner=17 flags=6
         Rule::  flags=0
                 IP:: 72.10.111.22
                 Mask:: 255.255.255.255
                 Proto:: 1
                 Port:: 5060
                 Expire:: 293
         Rule::  flags=0
                 IP:: 67.151.91.91
                 Mask:: 255.255.255.255
                 Proto:: 1
                 Port:: 5060
                 Expire:: 293


openser.log:

Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: DEBUG:lcr:load_gws:  
add matched_gws[0]=[4,8]
Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: DEBUG:lcr:load_gws:  
add matched_gws[1]=[5,10]
Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: DEBUG:lcr:load_gws:  
add matched_gws[2]=[6,5]
Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: DEBUG:lcr:load_gws:  
add matched_gws[3]=[7,1]
Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: DEBUG:lcr:load_gws:  
add matched_gws[4]=[28,13]
Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: load_gws(): DEBUG:  
Added gw_uri_avp <sip:|7 at 10.10.9.32:5060;transport=udp>
Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: load_gws(): DEBUG:  
Added gw_uri_avp <sip:|7 at 10.10.9.13:5060;transport=udp>
Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: load_gws(): DEBUG:  
Added gw_uri_avp <sip:|7 at 10.10.9.14:5060;transport=udp>
Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: load_gws(): DEBUG:  
Added gw_uri_avp <sip:|7 at 72.10.111.22:5060;transport=udp>
Jul 31 11:24:36 mousse /usr/sbin/openser[22609]: load_gws(): DEBUG:  
Added gw_uri_avp <sip:|6 at 67.151.91.91:5060;transport=udp>
.
.
.

: DEBUG: noisy_timer set for accounting
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]: parse_headers:  
flags=ffffffffffffffff
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]: check_via_address 
(160.39.244.21, 160.39.244.21, 0)
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]: WARNING:vqm_resize:  
resize(0) called
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]:  
DEBUG:tm:_reply_light: reply sent out. buf=0x81a07c8: SIP/2.0 1...,  
shmem=0xb60c2fe0: SIP/2.0 1
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]:  
DEBUG:tm:_reply_light: finished
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]: DEBUG: mk_proxy:  
doing DNS lookup...
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]: check_via_address 
(10.39.244.21, 10.39.244.21, 0)
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]:  
DBG:check_against_rule_list: using list dns
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]:  
DBG:check_against_rule_list: matched list dns
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]:  
DEBUG:tm:t_forward_nonack: blocked by blacklists
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]: ERROR:tm:t_relay_to:  
t_forward_nonack returned error
Jul 31 11:25:41 mousse /usr/sbin/openser[22604]: parse_headers:  
flags=ffffffffffffffff




On Jul 31, 2007, at 10:14 AM, Henning Westerholt wrote:

> On Tuesday 31 July 2007, you wrote:
>> Hi,
>>     Can someone please comment on how to capture and act on this 473
>> filtered from within OpenSER config, i.e., ability to failover to
>> next gateway returned by the LCR.  I have tried to capture that with
>> no success.
>
> Hello,
>
> have tried to call next_gw() in the failure route?
>
> http://www.mail-archive.com/users%40openser.org/msg11829.html
>
> Cheers,
>
> Henning
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users





More information about the Users mailing list