<div dir="ltr"><pre style><span style="font-family:arial">On Thu, Apr 18, 2013 at 9:47 AM, Daniel Grotti <</span><a href="http://lists.sipwise.com/listinfo/spce-user" style="font-family:arial" target="_blank">dgrotti at sipwise.com</a><span style="font-family:arial">> wrote:</span>
</pre><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<pre>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</pre></div></blockquote><div><br></div><div><br></div><div>Following on from this discussion, I too need to route differing domains/Accounts to different peers. I have tried this using two methods:</div><div>
<br></div><div>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.</div>
<div><br></div><div>However, this causes calls destined to locally registered subscribers to also be sent out to this peer, rather than connecting locally.</div><div><br></div><div>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. </div>
<div><br></div><div>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.</div><div><br></div>
<div>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?</div><div><br></div><div>Would it not make sense to have a setting to force an account or subscriber to a particular Peer Group?</div>
<div><br></div><div>Thanks.</div><div><br></div><div>-Barry Flanagan</div><div><br></div></div></div></div>