Hi Yuri
I shared your issue with my business partner who works on the configs with
me. I had remembered he had some similar issue he pinged me about some time
back.
His response to your issue follows:
Looks like he is missing flags 8 and the trailing ; after weight in attrs.
CREATE TABLE `dispatcher` (
`id` `setid` `destination` `flags` `priority` `attrs` `description`
1 1 sip:10.0.0.1 8 1 weight=50;
2 1 sip:10.0.0.2 8 2 weight=50;
To see if it changes is being used by Kamailio run:
kamcmd dispatcher.list
BODY: weight=50 <-- this is the raw attrs
WEIGHT: 50 <-- this show that the attribute has been processed.
{
NRSETS: 1
RECORDS: {
SET: {
ID: 1
TARGETS: {
DEST: {
URI: sip:10.0.0.1
FLAGS: AP
PRIORITY: 1
ATTRS: {
BODY: weight=50
DUID:
MAXLOAD: 0
WEIGHT: 50
}
}
DEST: {
URI: sip:10.0.0.2
FLAGS: AP
PRIORITY: 1
ATTRS: {
BODY: weight=50
DUID:
MAXLOAD: 0
WEIGHT: 50
}
}
}
}
}
}
I hope that helps.
All the best.
Will
On Tue, Jan 27, 2015 at 3:12 AM, Yuriy Gorlichenko <ovoshlook(a)gmail.com>
wrote:
Hello I use dipatcher algorithm 8 that works
with weight. I added 2
Asterisks and try to call its with my kam.We use 4.3 version.
Tthis config select needed dst from database with my scenario.
if(!ds_select_dst("$var(setid)", "8"))
$var(setid)- is variable for setting setid that i get from database with
my own scenario. IT does not matter.
When running asterisk with weight 90 - all calls goes through it. When I
starting asterisk with weight 10 -calls going through asterisk 90. When I
shut down asterisk with weight 90 -calls goes through asterisk 10? but when
i start asterisk weight 90 all calls goes through sterisk 10 until I shut
down it.
root@Kamailio:~# kamailio -v
version: kamailio 4.3.0-dev3 (x86_64/linux) 8cdbe7
flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
F_MALLOC, DBG_F_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 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 8cdbe7
compiled on 01:17:56 Jan 21 2015 with gcc 4.8.2
id setid destination flags priority attrs
1 2 sip:34.25.123.45:506000 0 weight=10
2 2 sip:10.0.1.6:506000 0weight=90
modparam("dispatcher", "db_url",DBURL)
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "setid_col", "setid")
modparam("dispatcher", "destination_col", "destination")
modparam("dispatcher", "force_dst", 1)
modparam("dispatcher", "flags", 3)
modparam("dispatcher", "dst_avp", "$avp(i:271)")
modparam("dispatcher", "grp_avp", "$avp(i:272)")
modparam("dispatcher", "cnt_avp", "$avp(i:273)")
modparam("dispatcher", "ds_ping_from",
"sip:proxy@10.0.1.1")
modparam("dispatcher", "ds_ping_interval",15)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_ping_reply_codes",
"class=2;code=403;code=404;code=484;class=3")
modparam("tm", "reparse_on_dns_failover", 0)
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
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org