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