Our PSTN provider has three servers. Two of them are located in our town,
and we prefer them, and the last one much further away. We can use them
interchangeably.
From our dispatcher file:
# 10: PSTN
10 sip:preferred1.example.com:7476 0 5
10 sip:preferred2.example.com:7476 0 5
10 sip:third.example.com:7476 0 4
In our dispatch router we use 'ds_select_dst("10","4")'. Then
the
round-robin algorithm evenly distributes the load on all three of them,
instead of round robin on the ones with priority 5 and fallbacking to
priority 4. Is the unconditional round robin as excepted?
When changing the selection algorithm to "8", «use first destination», the
dispatcher module correctly uses first "preferred2", then "preferred1"
and
then lastly "third".
Why «first destination» is not the first one listed in the dispatcher file
has always puzzled me..
# kamailio -V
version: kamailio 3.2.1 (i386/linux) 31c991
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: 31c991
compiled on 08:08:06 Dec 6 2011 with gcc 4.1.2
--
Øyvind Kolbu