[Freeswitch-users] Optimal trunk capacity filling algorithm

Adam Raszynski netcentrica at gmail.com
Mon Oct 30 15:56:10 UTC 2017

Hi All,

I'm looking for a solution to a problem that is not FreeSWITCH specific,
but for sure some of you have dealt with this, and maybe someone can
suggest optimal solution, so I could not re-invent the wheel

It's all about proper filling of available termination trunk capacity, but
not the trivial one with simple LCR

Let's say we have two trunks:
- Trunk 1 - capacity 100 channels, termination cost 1 cent
- Trunk 2 - capacity 200 channels, termination cost 3 cent

And we have clients sending wholesale traffic with random number of
- Client 1 - sell rate 2 cent
- Client 2 - sell rate 4 cent

As you see we call only sell to client 1 with profit using trunk 1. If we
use LCR and client 2 has more traffic, than it will fill trunk 1 capacity
and client 2 will hit trunk 2 and we will start to loose

Sticking client 1 to trunk 1 and client 2 to trunk 2 is also not optimal.
Number of channels is more or less random. If we stick client 2 to trunk 2
when client 1 is not using all 100 channels, than we loose additional 1
cent of margin

I think about some form of capacity-aware dynamic routing - send client 2
traffic to trunk 1 only if client 1 cannot fill trunk 1, maybe using some
capacity averages from last X minutes.

Any suggestions how to approach this problem?

Kind Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20171030/c469aa30/attachment.html>

More information about the FreeSWITCH-users mailing list