[OpenSIPS-Users] One dispatcher mystery solved; Doesn't seem to be "remembering" a gateway is failed however

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Apr 21 09:36:56 CEST 2010


Jock McKechnie wrote:
>
>
> On Tue, Apr 20, 2010 at 4:07 AM, Bogdan-Andrei Iancu 
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
>     Hi Jock,
>
>     Jock McKechnie wrote:
>     >
>     >
>     > On Fri, Apr 16, 2010 at 5:48 AM, Bogdan-Andrei Iancu
>     > <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>
>     <mailto:bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>>>
>     wrote:
>     >
>     >     Hi Jock,
>     >
>     >     ok, while investigating, I found a small harmless bug in the
>     >     ds_next_xxxx() functions - they were trying to populate the
>     ATTR avp
>     >     even if it was not set - this was the reason for the err
>     message you
>     >     were getting.
>     >
>     >     The bug was fixed, so if you update from SVN it should go away.
>     >
>     >
>     > That's great, Bogdan - however I'm guessing this doesn't help the
>     > ds_select_domain()'s inability to avoid marked entries.
>     >
>     > Any thoughts on that one? :/
>     >
>     First, are you sure your destination is in inactive state - please
>     check
>     via MI with "opensipsctl fifo ds_list" to see the "I" or "P" state for
>     the destination.
>
>
> Argh, no, the state remains "A". I -am- running the ds_mark_dst("p"), 
> and it isn't returning an error:
>
>         if( t_check_status("408") ){
>                 xlog( "L_NOTICE", "[$Tf] FR: $ci -- TIMEOUT for 
> Gateway $rd (marking as bad)\n" );
>                 if (!ds_mark_dst("p")) {
>                         xlog("L_NOTICE", "[$Tf] Panic! Not marked\n");
>                         }
>                 }
>  
> It correctly logs "marking as bad", so it is falling into the right if 
> {} block, but apparently, isn't working.
>
> I've done a bit more digging:
> I changed the "p" to a "i", and it correctly marks it as "Inactive".
> I enabled full debugging (level 4), set it back to "p" and restarted, 
> and then ran the call again. I see this in the logs:
> DBG:dispatcher:ds_mark_dst: mode [2] grp [1101] dst 
> [sip:192.168.0.20:5060 <http://192.168.0.20:5060>]
> I then searched for the phrase "probing set", which is what 
> dispatch.c's ds_check_timer() spits out when it attempts to check, 
> with no hits matching the probing message, so I also know that it 
> isn't somehow probing and deciding it is working between when it is 
> marked as "to probe" and when I run the opensipsctl 'ds_list' request. 
> This would suggest that ds_mark_dst() and/or ds_set_state() aren't 
> functioning correctly.
>
> I've read through the ds_mark_dst, ds_set_state() and I'm just not 
> seeing why this isn't being set - not that I'm a particularly great C 
> coder, but I know enough to be able to read it fairly well.
>
> I'm just not sure. Thanks, Bogdan, I appreciate your continued help.
The problem seams to be related to the "ds_probing_threshhold" parameter 
which you set to 3 - this means the you need to report 3 consecutive 
times a failure in order to disable the destination - see the docs on 
this param.

So, if you want to have the destination disabled on the first failure, 
set the "ds_probing_threshhold" param to 1.

Regards,
Bogdan



-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list