<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Hi,<br>
      the problem is that the interception of the CLIR code is done
      BEFORE the rewrite rules, that's why *67 works, but *67* not, as
      it will not intercept the CLIR code and then rewrite the number
      and try to send the call to the VSC server, which should not be
      the case with CLIR code.<br>
      <br>
      I suggest to create a customtt for proxy.cfg.tt2 and chage these 2
      lines:<br>
      <br>
      <br>
              if($avp(s:from_pstn) == 0 && uri =~ "^sip:\*[%
      sems.vsc.clir_code %]\*")<br>
      <br>
      with<br>
      <b>        if($avp(s:from_pstn) == 0 && uri =~ "^sip:\*[%
        sems.vsc.clir_code %]")<br>
        <br>
        <br>
        <br>
      </b>and  a couple of lines later:<br>
      <br>
                      strip([% sems.vsc.clir_code.length + 2 %]);<br>
      <br>
      with:<br>
      <br>
      <b>                strip([% sems.vsc.clir_code.length + 1 %]);</b><br>
      <br>
      <br>
      <br>
      And then remove your rewrite rule.<br>
      This should work with *67XXXXXX<br>
      <br>
      Cheers,<br>
      <br>
    </tt>
    <pre class="moz-signature" cols="72">--
Daniel Grotti

Head of Customer Support                               Sipwise GmbH
e: <a class="moz-txt-link-abbreviated" href="mailto:dgrotti@sipwise.com">dgrotti@sipwise.com</a>                               Europaring F15
t: +43(0)130120332                          A-2345 Brunn Am Gebirge
w: <a class="moz-txt-link-abbreviated" href="http://www.sipwise.com">www.sipwise.com</a>          FN: 305595f      FG: LG Wiener Neustadt
</pre>
    <div class="moz-cite-prefix">On 3/11/19 6:18 PM, Andy Clark wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+-Ur-LvCQp2m96=nXZ_KTg9AD05EzjxhuD5hSSHq0tKELbjvA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">In the US - caller ID blocking is typically *67
            then the number
            <div><br>
            </div>
            <div>i've updated config.yml to reflect 67 clir_code: '67'</div>
            <div><br>
            </div>
            <div>when dialing *67* then the number, all is is working
              perfectly</div>
            <div><br>
            </div>
            <div>i've written a rewrite rule that takes *67XXXXXX ->
              *67*XXXXXX</div>
            <div><br>
            </div>
            <div>rewrite rule is working perfectly except the call is
              not actually being sent out and instead SPCE says "Invalid
              feature code"</div>
            <div><br>
            </div>
            <div>any reason why it's not working?</div>
            <div><br>
            </div>
            <div>---------------------</div>
            <div>
              <div>Mar 11 10:07:33 spce proxy[3110]: NOTICE:
                <script>: Rewriting called party '*6712125551212'
                to '*67*12125551212' - R=sip:*<a
                  href="mailto:6712125551212@spce.mydomain.com"
                  moz-do-not-send="true">6712125551212@spce.mydomain.com</a>;transport=TCP
                ID=4zzkITIpRRwrrXtl0WQFSw.. UA='Z 5.2.25 rv2.8.112'</div>
              <div>Mar 11 10:07:33 spce proxy[3110]: NOTICE:
                <script>: VSC request - R=sip:*67*<a
                  href="mailto:12125551212@spce.mydomain.com"
                  moz-do-not-send="true">12125551212@spce.mydomain.com</a>;transport=TCP
                ID=4zzkITIpRRwrrXtl0WQFSw.. UA='Z 5.2.25 rv2.8.112'</div>
              <div>Mar 11 10:07:33 spce proxy[3110]: NOTICE:
                <script>: Call to Application Server -
                <a class="moz-txt-link-abbreviated" href="mailto:R=sip:*67*12125551212@vsc.local;transport=TCP">R=sip:*67*12125551212@vsc.local;transport=TCP</a>
                ID=4zzkITIpRRwrrXtl0WQFSw.. UA='Z 5.2.25 rv2.8.112'</div>
              <div>Mar 11 10:07:33 spce proxy[3110]: NOTICE:
                <script>: Setting acc source-leg for uuid
                'dd049a2f-9686-4cac-bc35-49c9c5971fc7':
                'dd049a2f-9686-4cac-bc35-49c9c5971fc7|test-1|<a
                  href="http://spce.mydomain.com" moz-do-not-send="true">spce.mydomain.com</a>|19174561234|||3|||<null>|call|96.126.255.226|1552324053.689254||||||||||||19174561234||||'
                - <a class="moz-txt-link-abbreviated" href="mailto:R=sip:*67*12125551212@vsc.local;transport=TCP">R=sip:*67*12125551212@vsc.local;transport=TCP</a>
                ID=4zzkITIpRRwrrXtl0WQFSw.. UA='Z 5.2.25 rv2.8.112'</div>
              <div>Mar 11 10:07:33 spce proxy[3110]: NOTICE:
                <script>: Setting acc destination-leg for uuid
                'dd049a2f-9686-4cac-bc35-49c9c5971fc7':
'0|||0|*6712125551212|dd049a2f-9686-4cac-bc35-49c9c5971fc7|*67*12125551212|vsc.local|*67*12125551212|<a
                  href="http://spce.mydomain.com" moz-do-not-send="true">spce.mydomain.com</a>|0||||||||||||*67*12125551212|||'
                - <a class="moz-txt-link-abbreviated" href="mailto:R=sip:*67*12125551212@vsc.local;transport=TCP">R=sip:*67*12125551212@vsc.local;transport=TCP</a>
                ID=4zzkITIpRRwrrXtl0WQFSw.. UA='Z 5.2.25 rv2.8.112'</div>
              <div>Mar 11 10:07:33 spce proxy[3110]: NOTICE:
                <script>: Setting From to '<<a
                  href="mailto:sip%3A19174561234@spce.mydomain.com"
                  moz-do-not-send="true">sip:19174561234@spce.mydomain.com</a>>'
                - <a class="moz-txt-link-abbreviated" href="mailto:R=sip:*67*12125551212@vsc.local;transport=TCP">R=sip:*67*12125551212@vsc.local;transport=TCP</a>
                ID=4zzkITIpRRwrrXtl0WQFSw.. UA='Z 5.2.25 rv2.8.112'</div>
              <div>Mar 11 10:07:33 spce proxy[3110]: NOTICE:
                <script>: Request leaving server, M=INVITE fs='<a
                  href="http://127.0.0.1:5062" moz-do-not-send="true">127.0.0.1:5062</a>'
                du='<a href="http://127.0.0.1:5080"
                  moz-do-not-send="true">127.0.0.1:5080</a>' -
                <a class="moz-txt-link-abbreviated" href="mailto:R=sip:*67*12125551212@vsc.local;transport=TCP">R=sip:*67*12125551212@vsc.local;transport=TCP</a>
                ID=4zzkITIpRRwrrXtl0WQFSw.. UA='Z 5.2.25 rv2.8.112'</div>
              <div>Mar 11 10:07:33 spce proxy[3108]: NOTICE:
                <script>: New request on proxy - M=ACK
                R=sip:127.0.0.1:5080;prxroute=1 F=<a
                  href="mailto:sip%3Atest-1@spce.mydomain.com"
                  moz-do-not-send="true">sip:test-1@spce.mydomain.com</a>;transport=TCP
                T=sip:*<a href="mailto:6712125551212@spce.mydomain.com"
                  moz-do-not-send="true">6712125551212@spce.mydomain.com</a>;transport=TCP
                IP=<a href="http://96.126.255.226:39052"
                  moz-do-not-send="true">96.126.255.226:39052</a> (<a
                  href="http://127.0.0.1:5060" moz-do-not-send="true">127.0.0.1:5060</a>)
                ID=4zzkITIpRRwrrXtl0WQFSw.. UA='Z 5.2.25 rv2.8.112'
                DESTIP=<a href="http://127.0.0.1:5062"
                  moz-do-not-send="true">127.0.0.1:5062</a></div>
              <div>Mar 11 10:07:35 spce proxy[3103]: NOTICE:
                <script>: New request on proxy - M=BYE
                <a class="moz-txt-link-abbreviated" href="mailto:R=sip:test-1@96.126.255.226:39052;transport=TCP">R=sip:test-1@96.126.255.226:39052;transport=TCP</a> F=sip:*<a
                  href="mailto:6712125551212@spce.mydomain.com"
                  moz-do-not-send="true">6712125551212@spce.mydomain.com</a>;transport=TCP
                T=<a href="mailto:sip%3A19174561234@spce.mydomain.com"
                  moz-do-not-send="true">sip:19174561234@spce.mydomain.com</a>
                IP=<a href="http://127.0.0.1:5080"
                  moz-do-not-send="true">127.0.0.1:5080</a> (<a
                  href="http://127.0.0.1:5080" moz-do-not-send="true">127.0.0.1:5080</a>)
                ID=4zzkITIpRRwrrXtl0WQFSw.. UA='GoFIBER spce-TX
                Application Server 6.X' DESTIP=<a
                  href="http://127.0.0.1:5062" moz-do-not-send="true">127.0.0.1:5062</a></div>
              <div>root@spce:~#</div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-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="https://lists.sipwise.com/listinfo/spce-user">https://lists.sipwise.com/listinfo/spce-user</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>