<div dir="ltr">Hi Brooks, <div><br></div><div>While I was trying to figure issue out with my dispatcher issue here is something that I think might work for you. It do requires modifying little bit C code to pull some weight from a redis/memcache of remote destination and use that value instead. Somewhere in this function of dispatcher module possibly:<br><br>Ref: <a href="https://github.com/kamailio/kamailio/blob/master/modules/dispatcher/dispatch.c">https://github.com/kamailio/kamailio/blob/master/modules/dispatcher/dispatch.c</a><br><br><i>/*! \brief<br>* Timer for checking probing destinations<br>*<br>* This timer is regularly fired.<br>*/</i><br><font face="monospace, monospace">void ds_check_timer(unsigned int ticks, void* param)</font><br><br>Since this is probing at regular intervals, code is already there all it needs is to get a number and set it as the destination's weight. <br><br><br>Just my crazy idea, but Daniel or Kamailio team might suggest something much better than this. </div><div><br></div><div>Regards,</div><div>Sammy</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 24, 2016 at 12:30 PM, Brooks Bridges <span dir="ltr"><<a href="mailto:bbridges@o1.com" target="_blank">bbridges@o1.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">So I’m building a load balancer solution that needs to monitor remote devices at a specific interval via snmp for certain data (channels and cps) and use that data to create a dynamically updated weight for each of the destinations.  I
 can’t find any reasonable mechanism for updating the weight attribute in the dispatcher module itself without having to do some hacky “update the database column then trigger dispatcher.reload” script, which I very much want to avoid.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is this something I should just be thinking of ditching the dispatcher module and rolling my own design or am I missing something obvious?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:"Century Gothic","sans-serif";color:black">Brooks Bridges |
</span></b><span style="font-size:8.0pt;font-family:"Century Gothic","sans-serif";color:black">Sr. Voice Services Engineer<u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:8.0pt;font-family:"Century Gothic","sans-serif";color:maroon">O<sup>1</sup> Communications</span></b><span style="font-size:8.0pt;font-family:"Century Gothic","sans-serif";color:blue"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:gray">5190 Golden Foothill Pkwy
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:gray">El Dorado Hills, CA 95762</span><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:blue"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:maroon">office:</span></b><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:blue">
</span><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:black">916.235.2097 |</span><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:blue">
</span><b><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:maroon">main:</span></b><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:black"> 888.444.1111, Option 2</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:blue"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:maroon">email:</span></b><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:blue">
<a href="mailto:bbridges@o1.com" target="_blank"><span style="color:blue">bbridges@o1.com</span></a>
</span><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:black">| </span><b><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:maroon">web:</span></b><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:blue">
</span><span style="color:#1f497d"><a href="http://www.o1.com/" target="_blank"><span style="font-size:7.0pt;font-family:"Century Gothic","sans-serif";color:black">www.o1.com</span></a></span><span style="color:blue"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</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" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>