[Spce-user] peering rules priority

Jon Bonilla (Manwe) jbonilla at sipwise.com
Tue Nov 6 08:12:53 EST 2012


El Tue, 6 Nov 2012 12:13:49 +0200
Matthew Ogden <matthew at tenacit.net> escribió:

> How would I achieve this:
> 
> 
> 
> I have 3 peers, (currently as 3 separate peer groups)
> 
> 
> 
> For certain number prefixes, I would like equal load balancing if possible.
> 
> 
> 
> For everything else, I want them in a specific order of priority.
> 

The gw selection priority is like this:

- First match length
- Second group priority
- Third gw weight

So for balancing between you 3 groupd you could have same match length,
priority and weight in all three nodes.

For others where you want strict priority you can add the preffixes with
different match lenght if possible. An idea would be to use callee pattern.
something like this (example spain):

^34
^34[0-9]
^34[0-9][0-9]

There's another option if this is not possible but requires kamailio's lcr
module patching. I've just tested it in my last week's training in Madrid and
maybe could fit:

- Make gws not unique between peer groups
- Make gw weight behave as priority
- Make group priority third option, after gw weight

I could provide you with the patch if the default solution does not fit your
needs.


cheers,

Jon





More information about the Spce-user mailing list