[Spce-user] rewrite rules

Barry Flanagan barry at flanagan.ie
Wed Apr 24 08:16:31 EDT 2013


On Thu, Apr 18, 2013 at 9:47 AM, Daniel Grotti <dgrotti at sipwise.com
<http://lists.sipwise.com/listinfo/spce-user>> wrote:

Hi Theo,
> I understand your problem now.
> What you can do, instead of assign a sip peer to a subscriber (that's
> not possible), you can play with Rewrite Rules.
>
> You can route calls based on callee or caller to a specific peer adding
> a prefix for callee (or caller) using the Subscriber's Inbound Rewrite
> rules.
> Then use that prefix in Peering Rules to match that call (so the call
> will follow that peer server) and then strip the prefix with Peer's
> Outbound Rewrite Rules.
>
> CALL --> SUBs REWIRTE RULES ---> FETCH GW ---> GW REWRITE RULES --->
> OUTBOUND
>
>

Following on from this discussion, I too need to route differing
domains/Accounts to different peers. I have tried this using two methods:

Method 1: Implementing a Callee Inbound Rewrite Rule  which prepends
steering digits to the called number, and then match these steering digits
on the peer's Callee Pattern. This works fine and the call is routed to the
correct peer.

However, this causes calls destined to locally registered subscribers to
also be sent out to this peer, rather than connecting locally.

Method 2: I then tried instead to prepend the steering digits to the Caller
CLI using Inbound Rewrite Rules for Caller but this falls foul of the CLI
allowed rules and the CLI is changed back to the system defined value prior
to routing taking place, and therefore the call will not be sent to the
correct peer. I fixed this by changing the sub's CLI to include the
steering digits and then remove these via rewrite rules before the call
gets sent to its destination.

Method 2 gets me local termination to connected subscribers again. However
this is also pretty messy, and I could see it becoming quite unmanageable
with many domains.

So, anyone know of a better way I can force a domain's PSTN calls to a
specific peer but still terminate to locally registered subscribers locally?

Would it not make sense to have a setting to force an account or subscriber
to a particular Peer Group?

Thanks.

-Barry Flanagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130424/b93e1eb1/attachment-0001.html>


More information about the Spce-user mailing list