[Spce-user] Rewrite rules
Daniel Grotti
dgrotti at sipwise.com
Wed Apr 17 11:14:27 EDT 2013
Hi Theo,
Here it is how the priority works:
>From the Handbook:
"The selection of peering servers for outbound calls is done in the
following order:
1. length of the matching peering rules for a call.
2. priority of the peering group.
3. weight of the peering servers in the selected peering group.
After one or more peering group(s) is matched for an outbound call, all
servers in this group are tried, according to their weight (lower weight
has more precedence). If a peering server replies with SIP codes 408,
500 or 503, or if a peering server doesn’t respond at all, the next
peering server in the current peering group is used as a fallback, one
after the other until the call succeeds. If no more servers are left in
the current peering group, the next group which matches the peering
rules is going to be used"
I think you can try the following solution:
Peer 1 - priority 1
Peeing rule 1
Callee Prefix: null
Caller pattern: XXX
Callee pattern: null
Peeing rule 2
Callee Prefix: null
Caller pattern: null
Callee pattern: null
Peer 2 - priority 1
Peeing rule 1
Callee Prefix: null
Caller pattern: YYY
Callee pattern: null
Peeing rule 2
Callee Prefix: null
Caller pattern: null
Callee pattern: null
In this configuration all calls from domain XXX will match Peer 1/Peeing
rule 1.
If it fails, the system should try and match to Peer 2/Peeing rule 2.
Same for domain YYY. It will match first Peer 2/Peeing rule 1.
If it fails, the system should try and match to Peer 1/Peeing rule 2.
br,
Daniel
On 04/17/2013 05:01 PM, Theo wrote:
> HI Daniel
>
> Thanks for that. I have used that part already but I don't think it
> solves this?
>
> domain xxx uses peer 1 and MUST try that peer first irrespective of
> number dialed. If it fails on peer 1, it needs to go to peer 2.
> domain yyy needs to go to peer 2, and MUST try that peer first
> irrespective of number dialed. If it fails on peer 2, it must go to peer 1.
>
> My understanding is that it will try a peer in the priority order that
> peers have been given. But what happens when priorities are dependent on
> the subscriber/domain?
>
>
> On Wed, Apr 17, 2013 at 4:16 PM, Daniel Grotti <dgrotti at sipwise.com
> <mailto:dgrotti at sipwise.com>> wrote:
>
> Hello Theo,
>
> Under peering rules you can use 'Callee Pattern' and 'Caller Pattern'
> fields.
>
> Under Caller Pattern you can set:
> "A POSIX regex matching against the full Request-URI (e.g.
> '^sip:.+ at example\.org$' or '^sip:431')"
>
>
> Under Caller Pattern you can set:
> "A POSIX regex matching against 'sip:user at domain' (e.g.
> '^sip:.+ at example\.org$' matching the whole URI, or '999' matching if the
> URI contains '999')"
>
> In this way you can route your calls to a specific peer based - for
> example - on caller domain.
>
>
> br,
> Daniel
>
>
>
>
> On 04/16/2013 02:02 PM, Theo wrote:
> > Hi
> >
> > Couple questions about peering rules. My understanding is that you set
> > peering rules for numbers. Is it possible to also specify a peer for a
> > specific subscriber or domain? I know you can specify a domain in a
> > peering rule, but what I would like to see is to simply state
> somewhere
> > for a domain "use this peer irrespective of number dialled"?
> >
> > Still on peering rules - we'd need millions of rules. Because of
> number
> > porting across providers, the prefix is no longer a sure way to
> indicate
> > to which carrier we must send the call. We have a base with
> prefixes and
> > an ever growing list of individual numbers that need to be routed to
> > various carriers. How would we deal with this?
> >
> > Cheers
> >
> >
> > _______________________________________________
> > Spce-user mailing list
> > Spce-user at lists.sipwise.com <mailto:Spce-user at lists.sipwise.com>
> > http://lists.sipwise.com/listinfo/spce-user
> >
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com <mailto:Spce-user at lists.sipwise.com>
> http://lists.sipwise.com/listinfo/spce-user
>
>
More information about the Spce-user
mailing list