[Kamailio-Users] [LCR] About ping
Iñaki Baz Castillo
ibc at aliax.net
Fri Mar 20 21:33:28 CET 2009
El Viernes, 20 de Marzo de 2009, Juha Heinanen escribió:
> Iñaki Baz Castillo writes:
> > - How to know which gws are down? The only I see is a NOTICE log:
> > ---------
> > NOTICE:lcr:gw_set_state: trunk "99.99.99.99:5060" from group: <2> is
> > OFFLINE ---------
> > Is not possible a MI command to list the down gateways?
>
> lcr_gw_dump should include information if gw is down:
>
> p = int2str((unsigned long)(*gws)[i].ping, &len);
> attr = add_mi_attr(node, MI_DUP_VALUE, "PING", 4, p, len);
> if (attr == NULL) goto err;
>
> value 2 is offline.
Right, I get the following line:
GW:: GRP_ID=2 IP_ADD=x.x.x.x HOSTNAME= PORT=5060 SCHEME=sip TRANSPORT=
STRIP=0 TAG= WEIGHT=1 FLAGS=0 PING=2
However it requires parsing as so...
> > - Why ping_interval cannot be less than 180 seconds?
>
> i don't know. the ping stuff was contributed by another author.
Ok, so could I submit a patch to just eliminate that requeriment?
> > - In case of failure_route and "next_gw()", is the used gw (failing gw)
> > automatically marked as down? (it would be useful so we don't need to
> > wait "fr_timer" seconds for each request during "ping_interval").
>
> it might be possible to write a function that you could call
> (from failure route) to mark the current gw offline.
ok, that's exactly what I was thinking about. I will try it.
Thanks.
> -- juha
--
Iñaki Baz Castillo
More information about the Users
mailing list