[OpenSIPS-Users] Load balancing with fiture Bogdans mod, or how do i handle that call my way ?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Jun 5 19:08:07 CEST 2009


Hi Grygoriy,

Grygoriy Dobrovolskyy wrote:
> Good day everyone, i would like some advice & help for my unusial 
> setup, Bogdan Andrei helped me with very valuable advices, but i am 
> not sure if i understand all at Sip dialog level, so here is my story:
>
>
> Incoming>>opensips>>Dispatcher>>6 call centers.
> What i would like to do:
>
> Incoming>>opensips>>Load balancer>>6 call centers.
> Note: Bogdan told me that he will implement the feature of equal 
> distribution i.e :
> We have 2 call centers, one with 20 agents another with 10 so at 50% 
> load we will have 10 calls at first and 5 at second. So Lets imagine 
> that it is in place.
>
> The quantity of agents will be updated from asterisk to opensips 
> database(resources) every 10 min.

I said I will do it this week and I did it :) . There is a new parameter 
to the load_balance() function, the algorithm to be used for computing 
the load. See:
       
http://www.opensips.org/html/docs/modules/1.6.x/load_balancer.html#id227286


>
> The problem kick in when i have no more resources left, when all 
> agents are occupied i need to imagine a way to Queue all incoming 
> calls, and when a resource frees pass first in line to that 
> resource(agent)
>
> Bogdan told me that it is possible to do during early stage, something 
> like:
>
> Incoming calls >>>>> "INVITE" opensips
> Incoming calls <<<<< 183 "Session in Progress" opensips
> And well after i dont know :) In theory opensips need to pass a call 
> to someone who will generate the music on hold and get it back when 
> resource is free and distribute accordinly, and keep order(first in 
> line get resource first) But how ?
Try something like this:

1. If LB fails (no free operators), send the call to MEDIA SERVER with a 
timeout (fr_inv_timer) of 10 secs, let's say.
2. The media server does not accept the call (no 200 OK), but keeps 
sending the on wait audio via 183 Session in Progress
3. After 10 seconds, the branch to Media SERVER will timeout and you end 
up in failure route.
4. In failure route you can test the LB again.....if available, send the 
call to operator.
5. If LB still fails, from failure route, do again the same starting 
with step 1.


Regards,
Bogdan





More information about the Users mailing list