Dear Asterisk community,
I’m very confused on making an extension in asterisk.
So the scenario is:
I want to route every 5 call to the extension to go to differnent peer. It is for load balancing purposes.
Ex: From 10 calls made to extension 1215 - 8 calls go to prov1 and 2 calls to go to provide prov2
Should look into something like Kamailio (recommended) or OpenSIPs (not much experience). They are both derivatives of the OpenSER (Open Sip Express Router) project.
When you want to get into complex SIP routing, failover, load balancing, etc… it is by far the best solution. You can, of course, “shoe-horn” asterisk into doing the work, but it anytime you need to work hacks into your dial plan, there is probably a better solution.