Hello,
I just pushed to remote GIT repository in master branch a bit of
refactoring about the states and ds_mark_dst().
Since with 3.2 seemed that it was lost capability to go inactive after a
certain number of failures (ds_probing_threshold), there is a new state
'trying' that can be used for it. Means that you can set a destination
in trying state couple of times and then it becomes inactive. In 3.1 it
was using a confusing mechanism based on probing mode.
So right now there are states: active, inactive, trying and disabled,
plus modes: probing, not-probing. A destination can be selected only if
it is active or trying. It will not be selected in inactive and
disabled. Probing mode specifies whether keepalives should be sent to
destinations, can be done per address or globally with the module
parameter ds_probing_mode. If a keepalive is not replied, the address is
marked as trying first and later will become inactive if keeps being
non-responsive.
The parameter for ds_mark_dst() can be now a combination between states
and probing mode, like ds_mark_dst("ip").
Maybe you can give it a try and let me know if it works -- I was not
able to test in my side yet -- remember this id master branch (devel
version 3.3.0-devX). Once this is ok and the internal states are clear
and acting properly, I will look into backporting the fixes to 3.2 branch.
Cheers,
Daniel
On 10/26/11 11:15 PM, Asgaroth wrote:
Hi Daniel,
On 26/10/2011 18:17, Daniel-Constantin Mierla wrote:
if you tried with 3.2.x, it was the case, since I
just backported from
master branch the commit I did to sort out better the behaviour based
on probing state. Try again now with latest 3.2 branch.
Thanks, the changes you made there for 3.2.x bring the behaviour into
the same operation as the devel branch. My findings so far are listed below:
Kamailio Version:
# sbin/kamailio -V
version: kamailio 3.2.0 (i386/linux) 7c241c
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 7c241c
compiled on 18:36:47 Oct 26 2011 with gcc 4.1.2
All the testing observations below is done with ds_probing_mode = 0 (A
gateway will only be "pinged" when it is set into probing mode). I
assume that the probing state needs to be manually set using fifo
command or ds_mark_dst()/ds_mark_dst("s") command.
Now I understand what you have been saying about the differentiation
between active/inactive/disabled state and probing enabled between the
states. However, I am still unable to set a destination into
inactive-probing state from within the routing script.
I understand that a gateway will only be selected when the state of the
destination gateway is in AX (Active) or AP (Active-Probing) state.
These states can be achieved by calling ds_mark_dst("a") for AX (Active)
state, or ds_mark_dst("p") for AP (Active-Probing) state from the
routing script.
I understand that a gateway will *not* be selected when the state of the
distination is in DX (Disabled), IX (Inactive) or IP (Inactive-Probing)
state. Only one of the three states in this case can be achieved via
routing script, IX (Inactive) can be achieved by calling ds_mark_dst()
or ds_mark_dst("i"). DX (Disabled) state can be achieved by calling
ds_set_state fifo command, this makes sense as it would be an
administrative down. However, IP (Inactive-Probing) cannot be called
from routing script, which, I think, is essential in some scenarios, for
example, say a destination crashes for some reason, and you want to
probe the gateway for when it becomes available again but you dont want
to use it while it is down, then you need to be able to set the state
from routing script to IP (Inactive-Probing).
To sum it all up, the states from fifo command all work as advertised,
the following states (AX/AP/IX) can be achieved from routing script, IP
state cannot be achieved from routing script (but can be achieved from
fifo command).
Disabled state is set manually using rpc/fifo command.
Is it intentional to not be able to set state to IP from routing script,
or is this also something that needs to be looked at?
Thanks for all the help thus far :)
Thanks
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users