<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://31/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>12 dec 2012 kl. 10:18 skrev Grant Bagdasarian &lt;<a href="mailto:GB@cm.nl">GB@cm.nl</a>&gt;:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="NL" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">Hello,<o:p></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">We have a cluster of three Asterisk machines. Each machine answers an incoming call and transfers it to unique remote destination.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">So, Asterisk01 transfers to Destination01, Asterisk02 to Destination02, Asterisk03 to Destination03.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">&nbsp;</span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">The Asterisk machines are allowed to receive and answer only 50 calls each.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">&nbsp;</span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">I have a Kamailio in front of these three machine. It is currently used to dispatch calls to the three machines using round-robin.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">But I need some way to equally dispatch a maximum of 50 calls to each device in the Asterisk dispatcher set.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">&nbsp;</span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">I was thinking of using the dispatcher module and using the 10 algorithm, to load balance based on call load. But I’m not sure if that will guarantee a maximum of 50 calls being dispatched to each Asterisk.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">Theoretically, if I set the ds_hash_size to 7, which is 128 slots, at some point two of them should have 43 calls and one 42 calls.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">Also the value of ds_hash_size should be the power of two. Are decimal values allowed, like 7,229 which equals to almost 150?<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">&nbsp;</span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">Perhaps I should use the ratelimit module for this?<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">&nbsp;</span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US">I’d appreciate it if someone could give me some advice on this.<o:p></o:p></span></div></div></div></blockquote><br></div><div>In addition, consider setting the maxcalls option in asterisk.conf and Asterisk will not accept any calls over that limit, leaving it up to Kamailio to handle where to send the call when Asterisk is filled with media.</div><div><br></div><div>/O</div><br></body></html>