[SR-Users] Loadbalancing authenticated agetways
shaheryarkh at gmail.com
Thu Nov 23 23:50:02 CET 2017
Here is a simpler easiler solution for your case.
1. Media gateways should register for somewhat longer period of time, e.g.
3600 seconds (shorter intervals would work too but longer is better).
2. All media gateways should register to kamailio through same kamailio
listen socket (if they register through different kamailio sockets then it
would add further complication since then you have to manage forced socket
too in dispatcher module).
1. Enable dispatcher module with db backend.
2. Enable received_avp in registrar module, (you can work without it but
then you need to create and manage received avp yourself).
3. When any media gateway registers with kamailio successfully. You should
have received_avp filled up. Use SQLOps module to insert this in dispatcher
4. Reload dispatcher db,
Now you have a working load balancing setup for your MGs valid till their
sip register expiry. You can choose whatever load balancing algorithm you
5. For media gateway re-register, step 4 & 5 are not required.
6. When any media gateway un-registers or registration expires, remove the
entry in dispatcher table and reload.
Hope this helps.
On Thu, Nov 23, 2017 at 5:57 PM, SamyGo <govoiper at gmail.com> wrote:
> So thats what I've done already before posting this question; even if I've
> to do loadbalancing I can use the "fetch_registered_contacts" function,
> loop over the online gateways on that 1 RURI and "append_branches()" with
> sorted "q" values...
> That all depends on the accurate measurement of the number of active
> calls, since requirement is to perform load-balancing based on call loads.
> Simple load-balancing can be achieved already by manipulating "q"
> values....again too complicated to work accurately 100% of the time.
> I'm trying to figure out way to totally avoid this use-case at all.
> On Thu, Nov 23, 2017 at 11:36 AM, Daniel Tryba <d.tryba at pocos.nl> wrote:
>> On Thu, Nov 23, 2017 at 12:14:36AM -0500, SamyGo wrote:
>> > I've a scenario where multiple mediaservers will be registered to
>> > and for any incoming call from Upstream provider I've to perform
>> > load-balancing to the actively registered media-servers.
>> > dispatcher module does load-balancing for IP endpoints, is there any
>> > module where I can perform load-balancing on registered
>> > clients(media-servers)?
>> If you have those mediaserver register with the same username you could
>> simply use lookup and serial forking to loadbalance. No idea how to
>> randomize the results from lookup though.
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sr-users