<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi,<br>
      in order to apply Rewrite Rules, in general you need to assign a
      Rewrite rules set the your Peers (to apply Outbound rewrite rules
      from outbound calls and inbound RR for incoming calls from that
      peer) and to your domain/subscriber (to apply inbound RR from your
      subscribers and outbound RR for on-net calls).<br>
      <br>
      Daniel<br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      On 07/15/2014 02:29 PM, Matthew Ogden wrote:<br>
    </div>
    <blockquote
      cite="mid:e88296598b7eebe6c8bb7ad8bf659fa7@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
      <div class="WordSection1">
        <p class="MsoNormal">Hi</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Is this a bug or a domain setting that I
          have incorrect: (and what else might break if I am not
          thinking clearly about it while changing settings)</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">I’m on 2.8 LTS.</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">PSTN calls the rewrite is perfect. But
          calls between users don’t seem to get applied. – just scared
          to willy nilly change a working setup.</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Sanitized section of logs is as follows:,
          but when dialing to PSTN,  last line does not over write back
          to main number</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Jul 15 13:27:00 spce
          /usr/sbin/kamailio[22901]: INFO: <script>: Rewriting
          user-provided CLI '2645' to 'e164_prefix_645' -
          R=sip:called_number@SPCE_PUBLIC_IP:5060
          ID=3b36f9a273bbcf8f79617ecf26498f14@4</p>
        <p class="MsoNormal">Jul 15 13:27:00 spce
          /usr/sbin/kamailio[22901]: INFO: <script>: Checking
          User-provided CLI against allowed CLIs -
          R=sip:called_number@SPCE_PUBLIC_IP:5060
          ID=3b36f9a273bbcf8f79617ecf26498f14@SPCE_PUBLIC_IP</p>
        <p class="MsoNormal">Jul 15 13:27:00 spce
          /usr/sbin/kamailio[22901]: INFO: <script>: User-provided
          CLI 'e164_prefix_645' accepted -
          R=sip:called_number@SPCE_PUBLIC_IP:5060
          ID=3b36f9a273bbcf8f79617ecf26498f14@SPCE_PUBLIC_IP</p>
        <p class="MsoNormal">Jul 15 13:27:00 spce
          /usr/sbin/kamailio[22901]: INFO: <script>: Setting
          'e164_prefix_645@SPCE_PUBLIC_IP' as initiating user-provided
          CLI - R=sip:called_number@SPCE_PUBLIC_IP:5060
          ID=3b36f9a273bbcf8f79617ecf26498f14@SPCE_PUBLIC_IP</p>
        <p class="MsoNormal">Jul 15 13:27:00 spce
          /usr/sbin/kamailio[22901]: INFO: <script>: Setting
          'subcrbier_mainE164@my_sip_Domain_name ' as initiating
          network-provided CLI - R=sip:called_number@SPCE_PUBLIC_IP:5060
          ID=3b36f9a273bbcf8f79617ecf26498f14@SPCE_PUBLIC_IP</p>
        <p class="MsoNormal">…</p>
        <p class="MsoNormal">…</p>
        <p class="MsoNormal">Jul 15 13:27:00 spce
          /usr/sbin/kamailio[22900]: INFO: <script>: Setting
          caller_cli_netprov/caller_domain_netprov
          'subcrbier_mainE164@my_sip_Domain_name' for npn -
          R=sip:test1@subscriber_B_IP:5060
          ID=3b36f9a273bbcf8f79617ecf26498f14@SPCE_PUBLIC_IP</p>
        <p class="MsoNormal">Jul 15 13:27:00 spce
          /usr/sbin/kamailio[22900]: INFO: <script>: Setting From
          to '<sip:subcrbier_mainE164@my_sip_Domain_name>' -
          R=sip:test1@subscriber_B_IP:5060
          ID=3b36f9a273bbcf8f79617ecf26498f14@SPCE_PUBLIC_IP</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">A public call from the same number has
          entries like</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Jul  7 14:37:29 spce
          /usr/sbin/kamailio[22898]: INFO: <script>: Prepare From
          display-name setting -
          R=sip:public_number@public_upstream_ip:5060;transport=udp
          ID=288525ee2f6026c77c625773756fade0@SPCE_PUBLIC_IP</p>
        <p class="MsoNormal">Jul  7 14:37:29 spce
          /usr/sbin/kamailio[22898]: INFO: <script>: No selector
          set, not setting CLI -
          R=sip:public_number@public_upstream_ip:5060;transport=udp
          ID=288525ee2f6026c77c625773756fade0@SPCE_PUBLIC_IP</p>
        <p class="MsoNormal">Jul  7 14:37:29 spce
          /usr/sbin/kamailio[22898]: INFO: <script>: Prepare From
          username setting -
          R=sip:public_number@public_upstream_ip:5060;transport=udp
          ID=288525ee2f6026c77c625773756fade0@SPCE_PUBLIC_IP</p>
        <p class="MsoNormal"><b>Jul  7 14:37:29 spce
            /usr/sbin/kamailio[22898]: INFO: <script>: Setting
            caller_cli_userprov/caller_domain_userprov
            'e164_prefix_645@SPCE_PUBLIC_IP' for upn -
            R=sip:public_number@public_upstream_ip:5060;transport=udp
            ID=288525ee2f6026c77c625773756fade0@SPCE_PUBLIC_IP</b></p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Last line be the part where the number is
          correctly set.</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">But there doesn’t seem to be the same thing
          when the call stays on the system?</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Thanks for your help</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal"><span style="font-size:10.0pt;color:gray"><img
              id="Picture_x0020_1"
              src="cid:part1.05000900.02010107@sipwise.com" height="86"
              width="264"></span><span
            style="font-size:10.0pt;color:gray" lang="EN-ZA"></span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;color:black"
            lang="EN-ZA"> </span></p>
        <p class="MsoNormal"><b><span
              style="font-size:12.0pt;color:#79ae52" lang="EN-ZA">Matthew
              Ogden</span></b></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;color:gray">Management</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;color:gray">TenacIT
          </span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;color:gray"> </span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;color:gray"> </span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;color:gray"> </span></p>
        <p class="MsoNormal"><b><span lang="EN-ZA">Strategic IT
              Consulting </span></b><span
            style="font-size:12.0pt;color:#79ae52" lang="EN-ZA">•</span><b><span
              lang="EN-ZA"> Advanced Networking </span></b><span
            style="font-size:12.0pt;color:#79ae52" lang="EN-ZA">• </span><b><span
              lang="EN-ZA">Virtualisation</span></b><span
            style="font-size:12.0pt;color:#79ae52" lang="EN-ZA"> </span><b><span
              lang="EN-ZA"></span></b></p>
        <p class="MsoNormal"><b><span lang="EN-ZA">Custom Development </span></b><span
            style="font-size:12.0pt;color:#79ae52" lang="EN-ZA">•</span><b><span
              lang="EN-ZA"> </span></b><b><span lang="EN-ZA">Hosting </span></b><span
            style="font-size:12.0pt;color:#79ae52" lang="EN-ZA">•</span><b><span
              lang="EN-ZA"> </span></b><b><span lang="EN-ZA">Syspro
              Support  </span></b><span
            style="font-size:12.0pt;color:#79ae52" lang="EN-ZA">• </span><b><span
              lang="EN-ZA">MS Licensing</span></b><span
            style="font-size:12.0pt;color:#79ae52" lang="EN-ZA"> </span><b><span
              lang="EN-ZA"></span></b></p>
        <p class="MsoNormal"><span style="font-size:9.0pt;color:#a6a6a6"
            lang="EN-ZA">National Tel: </span><span
            style="font-size:9.0pt;color:gray" lang="EN-ZA">041 10
            10 100 | </span><span style="font-size:9.0pt;color:#a6a6a6"
            lang="EN-ZA">Cell: </span><span
            style="font-size:9.0pt;color:gray" lang="EN-ZA">084 205 4445
            | </span><span style="font-size:9.0pt;color:#a6a6a6"
            lang="EN-ZA">Email: </span><span lang="EN-ZA"><a
              moz-do-not-send="true" href="mailto:matthew@tenacit.net"><span
                style="font-size:9.0pt;color:gray;text-decoration:none"
                lang="EN-US">matthew@tenacit.net</span></a></span><span
            style="font-size:9.0pt;color:#44546a">  </span><span
            style="font-size:9.0pt;color:gray"></span></p>
        <p class="MsoNormal"><span style="font-size:9.0pt;color:#a6a6a6"
            lang="EN-ZA">CT Tel: </span><span
            style="font-size:9.0pt;color:gray" lang="EN-ZA">021 201 0333
            | </span><span style="font-size:9.0pt;color:#a6a6a6"
            lang="EN-ZA">Skype Name: </span><span
            style="font-size:9.0pt;color:gray" lang="EN-ZA">matthew.ogden
            | </span><span style="font-size:9.0pt;color:#a6a6a6"
            lang="EN-ZA">Web: </span><span lang="EN-ZA"><a
              moz-do-not-send="true" href="http://www.tenacit.net/"><span
style="font-size:9.0pt;color:#bce292;text-decoration:none">http://www.tenacit.net</span></a>
          </span><span style="font-size:9.0pt;color:#bce292"
            lang="EN-ZA"></span></p>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;color:#44546a" lang="EN-ZA"> </span></p>
        <p class="MsoNormal"><img id="Picture_x0020_2"
            src="cid:part4.02070900.06090300@sipwise.com" border="0"
            height="22" width="53">  <img id="Picture_x0020_3"
            src="cid:part5.02020607.07050403@sipwise.com" border="0"
            height="29" width="85"> <img id="Picture_x0020_4"
            src="cid:part6.03080702.03070106@sipwise.com" border="0"
            height="26" width="95"> <img id="Picture_x0020_5"
            src="cid:part7.01010100.03090209@sipwise.com" border="0"
            height="37" width="96"><span lang="EN-ZA">  </span><img
            id="Picture_x0020_6"
            src="cid:part8.02010108.01070607@sipwise.com" border="0"
            height="35" width="204"><span lang="EN-ZA">    </span></p>
        <p class="MsoNormal"> </p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Spce-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>
<a class="moz-txt-link-freetext" href="http://lists.sipwise.com/listinfo/spce-user">http://lists.sipwise.com/listinfo/spce-user</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>