<div dir="ltr">Thanks Daniel !!<div><br><div><br></div><div>Background:</div><div><br></div><div>In this instance - our SipWise server is ONLY acting as an SBC between peers.   There are client peers (usually running Asterisk/FreePBX or similar) and carrier peers (Level 3, Comcast, etc..).  There are no subscribers on the server.<br>
</div><div><br></div><div><br></div><div>One specific client/peer has 2 sites and we do not control the management of their FreePBX.</div><div>We are providing them with SIP Trunking only.</div><div><br></div><div>We have very high (Rougue E911) costs if we send a 911 call to our Carrier Peer, and the Caller Telephone Number is not in the carrier's E911 database.  We pay a price per number to have a 911 entry in the database, so for a client with 2 physical locations but 300 DIDs, we have only 2 entries in the database.   When we control the Client's Peer server, we can control how E911 flows and limit the "Emergency outbound CallerID" per extension/site.   In this instance, I'm concerned the client peer will send us a "Caller" telephone number that isn't in the database, and our costs could be significant.    </div>
<div><br></div><div>I want to have a way to re-write the Caller Number on an E911 call, if it isn't a recognized caller number.</div><div><br></div><div><br></div><div>As I write this, I may have a solution... Can I set up Multiple Peers with the Same Peer IP Address? (I'll probably test this later today)   If so, I could set up a my default carrier/peer 50.50.50.50 for default outbound calls, but then also set up an "Emergency Carrier/Peer" 50.50.50.50 with only a "callee pattern" of 911.    Then, I can apply a specific Caller re-write rule on the "Emergency Carrier/Peer"  The "match" of Callee is done with the Callee Pattern match of the peer, and the Caller pattern match of the applicable re-write rule.</div>
<div><br></div><div>What do you think?  Will this work?  Is there an easier way?</div><div><br></div><div>-Gary</div><div><br></div><div class="gmail_extra"><br clear="all"><div><br></div><div class="gmail_quote">On Fri, May 9, 2014 at 10:16 AM, Daniel Grotti <span dir="ltr"><<a href="mailto:dgrotti@sipwise.com" target="_blank">dgrotti@sipwise.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi Gary,<br>
      <br>
      there is no way imho to achieve that within rewrite rules.<br>
      Why you should do that? <br>
      Can you explain your problem with more details, maybe we can find
      another solution.<br>
      <br>
      <br>
      Daniel<div><div class="h5"><br>
       <br>
      <br>
      <br>
      <br>
      <br>
      On 05/09/2014 06:02 PM, Gary Nieboer wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>I would like to make a re-write rule based on matching of
          both the Caller and Callee.
          <div><br>
          </div>
          <div>If the Caller is +19015551212 and the Callee is 123, I'd
            Like to rewrite the Caller to +19015551213.  This would only
            occur on an exact match of Caller and Callee.</div>
          <div><br>
          </div>
          <div>Is there a way to match both caller and callee in the
            match portion of a rewrite rule?</div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div><br>
            Gary
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Spce-user mailing list
<a href="mailto:Spce-user@lists.sipwise.com" target="_blank">Spce-user@lists.sipwise.com</a>
<a href="http://lists.sipwise.com/listinfo/spce-user" target="_blank">http://lists.sipwise.com/listinfo/spce-user</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Spce-user mailing list<br>
<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br>
<a href="http://lists.sipwise.com/listinfo/spce-user" target="_blank">http://lists.sipwise.com/listinfo/spce-user</a><br>
<br></blockquote></div><br></div></div></div>