<div dir="ltr">Hi Yuriy<div><br></div><div>Sounds great. I am glad to hear you got a good working solution.</div><div><br></div><div>I hope you have a great weekend.</div><div><br></div><div>All the best.</div><div><br></div><div>Will</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 29, 2015 at 2:52 AM, Yuriy Gorlichenko <span dir="ltr"><<a href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Will, thanks for your answer. I already implemented my own lgorithm without using dispatcher module. It works better for me. Now I try to implement it with REDIS for faster results.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-01-29 1:35 GMT+03:00 Will Ferrer <span dir="ltr"><<a href="mailto:will.ferrer@switchsoft.com" target="_blank">will.ferrer@switchsoft.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Yuri<div><br></div><div>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.</div><div><br></div><div>His response to your issue follows:</div><div><br></div><div><span style="font-size:12.8000001907349px">Looks like he is missing flags 8 and the trailing ; after weight in attrs. </span><div style="font-size:12.8000001907349px"><div>CREATE TABLE `dispatcher` (</div><div>`id`   `setid` `destination` `flags` `priority` `attrs`  `description` </div><div>1<span style="white-space:pre-wrap">  </span>1<span style="white-space:pre-wrap">       </span>sip:10.0.0.1<span style="white-space:pre-wrap">    </span>8<span style="white-space:pre-wrap">       </span>1<span style="white-space:pre-wrap">       </span>weight=50;<br></div></div><div style="font-size:12.8000001907349px">2<span style="white-space:pre-wrap"> </span>1<span style="white-space:pre-wrap">       </span>sip:10.0.0.2<span style="white-space:pre-wrap">    </span>8<span style="white-space:pre-wrap">       </span>2<span style="white-space:pre-wrap">       </span>weight=50;</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">To see if it changes is being used by Kamailio run:</div><div style="font-size:12.8000001907349px"><div>kamcmd dispatcher.list</div><div><br></div><div>BODY: weight=50  <-- this is the raw attrs <br></div><div>WEIGHT: 50 <-- this show that the attribute has been processed.</div><div><br></div><div>{</div><div>        NRSETS: 1 </div><div>        RECORDS: {</div><div>                SET: {</div><div>                        ID: 1</div><div>                        TARGETS: {</div><div>                                DEST: {</div><div>                                        URI: sip:10.0.0.1</div><div>                                        FLAGS: AP</div><div>                                        PRIORITY: 1</div><div>                                        ATTRS: {</div><div>                                                BODY: weight=50</div><div>                                                DUID:</div><div>                                                MAXLOAD: 0</div><div>                                                WEIGHT: 50</div><div>                                        }</div><div>                                }</div><div>                                DEST: {</div><div>                                        URI: sip:10.0.0.2</div><div>                                        FLAGS: AP</div><div>                                        PRIORITY: 1</div><div>                                        ATTRS: {</div><div>                                                BODY: weight=50</div><div>                                                DUID:</div><div>                                                MAXLOAD: 0</div><div>                                                WEIGHT: 50</div><div>                                        }</div><div>                                }</div><div>                        }</div><div>                }</div><div>        }</div><div>}</div><div><br></div><div>I hope that helps.</div><div><br></div><div>All the best.</div><div><br></div><div>Will</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Jan 27, 2015 at 3:12 AM, Yuriy Gorlichenko <span dir="ltr"><<a href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><span style="font-size:13.3333339691162px">Hello I use dipatcher  algorithm 8 that works with weight. I added  2 Asterisks and try to call its with my kam.</span><span style="font-size:13.3333339691162px">We use 4.3 version.</span><div><span style="font-size:13.3333339691162px"><br>Tthis config select needed dst from database with my scenario. </span><div><br style="font-size:13.3333339691162px"><span style="font-size:13.3333339691162px">if(!ds_select_dst("$var(setid)</span><span style="font-size:13.3333339691162px">", "8"))</span><br style="font-size:13.3333339691162px"><br style="font-size:13.3333339691162px"><span style="font-size:13.3333339691162px">$var(setid)- is variable for setting setid that i get from database with my own scenario. IT does not matter</span><span style="font-size:13.3333339691162px">.<br></span><br>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.<br style="font-size:13.3333339691162px"><br><div>root@Kamailio:~# kamailio -v</div><div>version: kamailio 4.3.0-dev3 (x86_64/linux) 8cdbe7</div><div>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</div><div>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB</div><div>poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.</div><div>id: 8cdbe7</div><div>compiled on 01:17:56 Jan 21 2015 with gcc 4.8.2</div><div><br></div><br style="font-size:13.3333339691162px"><span style="font-size:13.3333339691162px">id setid   destination                  flags priority attrs</span><br style="font-size:13.3333339691162px"><table style="font-size:13.3333339691162px"><tbody><tr><td>1</td><td>   2</td><td>   sip:<a href="http://34.25.123.45:50600/" target="_blank">34.25.123.45:50600</a></td><td>0</td><td>      0         </td><td>weight=10</td><td><br></td></tr><tr><td><br></td><td>  </td><td>  </td><td><br></td><td>      </td><td><br></td><td></td></tr><tr><td>2</td><td>   2</td><td>   sip:<a href="http://10.0.1.6:50600/" target="_blank">10.0.1.6:50600</a></td><td>0</td><td>      0</td><td>weight=90</td><td><br></td></tr></tbody></table><br style="font-size:13.3333339691162px"><div style="font-size:13.3333339691162px">modparam("dispatcher", "db_url",DBURL)</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "table_name", "dispatcher")</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "setid_col", "setid")</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "destination_col", "destination")</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "force_dst", 1)</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "flags", 3)</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "dst_avp", "$avp(i:271)")</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "grp_avp", "$avp(i:272)")</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "cnt_avp", "$avp(i:273)")</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "ds_ping_from", "<a href="mailto:sip%3Aproxy@10.0.1.1" target="_blank">sip:proxy@10.0.1.1</a>")</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "ds_ping_interval",15)</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "ds_probing_mode", 1)</div><div style="font-size:13.3333339691162px">modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=403;code=404;code=484;class=3")</div><div style="font-size:13.3333339691162px">modparam("tm", "reparse_on_dns_failover", 0)<br><br><br>Thanks</div></div></div></div>
<br></div></div>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>