<p>Yes it is a part of my scenario.</p>

<p>I have a flow of calls to many different DIDs, normally they are dispatched by a number of primary PBX servers(with possibility to dispatch each call to a different subsets of servers).<br>
So at first I try to LB calls to this primary location.<br>
I also have to cut excessive calls volume spikes to each server, so i additionally 'rate-limit' each destination's $(du) (after load_balance()).<br>
Then, if all destinations for a call are either blocked by load-balancer or rate-limit, I have to re-route this call to a different farm of servers serving 'too many calls' scenario (using a different resource).<br>
Also some high priority calls should be dispatched to primary group of PBX servers at all cost. No matter how busy they are.<br>
I also have a number of static call routes ('in' and 'out') to PBX servers and out from them. So i have to register them as a load.</p>

<p>So I need to be able to:</p>

<ol class="task-list">
<li>LB call over a number of groups of destinations, taking into account 'max calls limit' for a resource.</li>
<li>LB call over a number of groups of destinations <em>NOT</em> taking into account 'max calls limit' for a resource (just ensure equal load for all servers in the group).</li>
<li>LB call over one group of destinations and then over another group.</li>
<li>Register call as a load to destination and unregister it (if the primary location refuses call and we route it to 'fail-over' scenario). (it is too costly to emulate it using 'resource' per route).</li>
</ol>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/345#issuecomment-57704901">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/5479561__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNzkwMjQyMiwiZGF0YSI6eyJpZCI6NDQ0NDI0ODV9fQ==--d802a6b3db4dca9a0958b9e11c61b3c365262382.gif" width="1" /></p>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Pull Request on GitHub","action":{"@type":"ViewAction","url":"https://github.com/OpenSIPS/opensips/pull/345#issuecomment-57704901","name":"View Pull Request"}}</script>