[Freeswitch-users] Sofia fails to detect offline gateway

Matteo mbrancaleoni at voismart.it
Thu Jan 3 11:36:14 MSK 2013


Hi,

looking to the ping-max and ping-min code into sofia.c
there's some "counter" logic broken.

I've submitted a patch here: http://jira.freeswitch.org/browse/FS-4985
which seems to work here.

With the patch applied, ping-min means "how many successful pings
we must have before declaring a gw up".

The interval between ping-min and ping-max is the "safe area"
where a gw is marked as UP.

so if we have, for example, min 3 and max 6, if the gw is
up and we move counter between 3,4,5,6 the gw will be up.

if from 6 we loose 4 (so counter == 2) pings in a row, the gw
will be declared down.

please note that on sofia startup the gw is always started as UP,
so it will be up even if ping-min is > 1 . the "right" way
starts when the gw goes down.

perhaps if a gw is configured as "pinged" is reasonable to start it as down,
but this is a different patch :)

regards,
matteo



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list