On 25.09.2010 20:45, Stefano Sasso wrote: > In the OpenSIPS features we read "load balancing with failover", but > we could not find any useful and complete configuration example. > Is OpenSIPS able to know if an asterisk server is UP or DOWN, or must > we use a 3rd part tool, like mon? > > Anyone has experience in use OpenSIPS as SIP load balancer (not to > work as "real" SIP proxy)? > > Any hint/advice for this part, or for the global setup?
Stefano, I guess a lot of people here use OpenSIPS as a SIP load balancer. You may refer to the load balancer tutorial link suggested above. The load_balancer module is able to determine if an asterisk server is UP or DOWN by using gw probing (OPTIONS ping), as well as dispatcher module: http://www.opensips.org/html/docs/modules/1.6.x/load_balancer.html http://www.opensips.org/html/docs/modules/1.6.x/dispatcher.html However, since you say the call-center works both inbound and outbound you probably need to do not only dispatching of inbound calls to asterisk but also dynamic routing of some kind. In this case I recommend that you check the powerful drouting module: http://www.opensips.org/html/docs/modules/1.6.x/drouting.html It is able to accommodate both inbound and outbound calls routing. I can comment on its gateway probing implementation, though it's consistent with load_balancer. OpenSIPS will send an OPTIONS ping to each gateway each N seconds. If the gw doesn't respond to ping - mark it disabled; if it responds to the next ping successfully automatic reenabling kicks in. Also, if opensips fails to terminate the call through the gw - you can disable it from failure route. If the next ping succeeds the gw will be automatically re-enabled. I would only disable the gw from failure route on some response codes, that indicate a server error. 500 and 603 probably are the good candidates (but check your applications). Otherwise there is a good chance of false positive, if the number was misdialed or something. BTW You can still take the gateway out of service, which happens to respond to the OPTIONS ping, if you disable in manually via MI command (supported in all 3 modules). This will completely stop the probing hence automatic re-enabling will not occur. BTW2 Do you mean your asterisk servers are running behind NAT? If so how are they reached from outside? How do you send the calls in and out of your network? You may contact me with off the list if you need any further help or clarification. -- Sincerely, Andrew Pogrebennyk _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
