<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <tt>Matthi<tt>a<tt>s,<br>
          <tt><tt>using cf_loop you may skip also "normal" CF to <tt>external
                numbers.<br>
                <tt>So maybe you can use the check : <tt>!($rd =~
                    "^.+\.local$"</tt></tt><tt>) <br>
                  <br>
                  <tt>So <tt>check the number is the call is not to a <tt>*.local
                        domain.</tt></tt></tt><br>
                </tt><br>
                Daniel<br>
                <br>
                <br>
                <br>
              </tt></tt></tt></tt></tt></tt>
    <div class="moz-cite-prefix">On 08/29/2018 08:51 PM, Hohl Matthias
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:2121573200.6794009.1535568705607.JavaMail.zimbra@mx.telematica.at">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 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;
        color:black;
        mso-fareast-language:EN-US;}
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;}
code
        {mso-style-priority:99;
        font-family:"Courier New",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New",serif;
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New",serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage23
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.E-MailFormatvorlage24
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage25
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage26
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.pln
        {mso-style-name:pln;}
span.kwd
        {mso-style-name:kwd;}
span.pun
        {mso-style-name:pun;}
span.str
        {mso-style-name:str;}
span.E-MailFormatvorlage31
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage32
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage33
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.E-MailFormatvorlage34
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage35
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage36
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage37
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:115874863;
        mso-list-type:hybrid;
        mso-list-template-ids:1469475670 -902900130 201785369 201785371 201785359 201785369 201785371 201785359 201785369 201785371;}
@list l0:level1
        {mso-level-text:"%1\.\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:705760940;
        mso-list-template-ids:190898590;}
@list l1:level1
        {mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2
        {mso-list-id:2107458571;
        mso-list-type:hybrid;
        mso-list-template-ids:426935194 201785359 201785369 201785371 201785359 201785369 201785371 201785359 201785369 201785371;}
@list l2:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l2:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">Hello Daniel,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">thanks
            for your answer, i tried this but it looks like it is not
            working:<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">it
            looks like it didn’t find the cf_loop variable in the invite
            so it doesn’t skip it…<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">if(is_method("INVITE")
            && !($rU =~ "^\+?[0-9]+$") && !has_totag()
            && !($var(cf_loop) == "1"))<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Reply
            CF loop - S=100 - Connecting M=INVITE<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">New
            request on proxy - M=INVITE
            <a class="moz-txt-link-abbreviated" href="mailto:R=sip:vmu43720560099@voicebox.local">R=sip:vmu43720560099@voicebox.local</a><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Dialed
            number is not numeric - 'vmu43720560099'<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Reply
            CF loop - S=403 - Dialed number is not numeric M=INVITE<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
                  style="color:windowtext;mso-fareast-language:DE-AT"
                  lang="DE">Von:</span></b><span
                style="color:windowtext;mso-fareast-language:DE-AT"
                lang="DE"> Spce-user
                <a class="moz-txt-link-rfc2396E" href="mailto:spce-user-bounces@lists.sipwise.com"><spce-user-bounces@lists.sipwise.com></a> <b>Im
                  Auftrag von </b>Daniel Grotti<br>
                <b>Gesendet:</b> Mittwoch, 29. August 2018 09:30<br>
                <b>An:</b> <a class="moz-txt-link-abbreviated" href="mailto:spce-user@lists.sipwise.com">spce-user@lists.sipwise.com</a><br>
                <b>Betreff:</b> Re: [Spce-user] How to deal with
                non-numeric characters in a dialed number<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><tt><span style="font-size:10.0pt">Hi,</span></tt><span
            style="font-size:10.0pt;font-family:"Courier
            New",serif"><br>
            <tt>you can try to use "$var(cf_loop) == 1" to skip INVITE
              after CF.</tt><br>
            <br>
            <br>
            <br>
            <tt> </tt><br>
            <br>
          </span><span
            style="font-size:12.0pt;mso-fareast-language:DE-AT"><o:p></o:p></span></p>
        <pre>-- <o:p></o:p></pre>
        <pre>Daniel Grotti<o:p></o:p></pre>
        <pre>Head of Customer Support<o:p></o:p></pre>
        <pre>Sipwise GmbH, Campus 21/Europaring F15<o:p></o:p></pre>
        <pre>AT-2345 Brunn am Gebirge<o:p></o:p></pre>
        <pre><o:p> </o:p></pre>
        <pre>Office: +43(0)130120332<o:p></o:p></pre>
        <pre>Email: <a href="mailto:dgrotti@sipwise.com" moz-do-not-send="true">dgrotti@sipwise.com</a><o:p></o:p></pre>
        <pre>Website: <a href="https://www.sipwise.com" moz-do-not-send="true">https://www.sipwise.com</a><o:p></o:p></pre>
        <div>
          <p class="MsoNormal">On 08/28/2018 09:31 PM, Daniel Grotti
            wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal">Ho Matthias, <o:p></o:p></p>
          <div>
            <p class="MsoNormal">There is a variable or avp called
              “cf_loop” and it’s set to one when a cf is set.<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal">You can use that one to skip invite
              after a cf. <o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal">I need check the code to tell you what
              is the variable name exactly.<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p> </o:p></p>
          </div>
          <div>
            <p class="MsoNormal">I can have a look tomorrow.<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p> </o:p></p>
          </div>
          <div>
            <p class="MsoNormal">Daniel<o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"><o:p> </o:p></p>
          </div>
          <div>
            <p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
            <div id="AppleMailSignature">
              <p class="MsoNormal">Sent from my iPhone<o:p></o:p></p>
            </div>
            <div>
              <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
                On 28.08.2018, at 20:35, Hohl Matthias <<a
                  href="mailto:matthias.hohl@telematica.at"
                  moz-do-not-send="true">matthias.hohl@telematica.at</a>>
                wrote:<o:p></o:p></p>
            </div>
            <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
              <div>
                <p class="MsoNormal"><span style="color:#1F497D">Hello
                    Daniel,</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">any update for me on this topic?</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">Thank you!</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US"> </span><o:p></o:p></p>
                <div>
                  <div style="border:none;border-top:solid #E1E1E1
                    1.0pt;padding:3.0pt 0cm 0cm 0cm">
                    <p class="MsoNormal"><b><span
                          style="color:windowtext;mso-fareast-language:DE-AT"
                          lang="DE">Von:</span></b><span
                        style="color:windowtext;mso-fareast-language:DE-AT"
                        lang="DE"> Spce-user <<a
                          href="mailto:spce-user-bounces@lists.sipwise.com"
                          moz-do-not-send="true">spce-user-bounces@lists.sipwise.com</a>>
                        <b>Im Auftrag von </b>Hohl Matthias<br>
                        <b>Gesendet:</b> Mittwoch, 22. August 2018 15:38<br>
                        <b>An:</b> 'Daniel Grotti' <<a
                          href="mailto:dgrotti@sipwise.com"
                          moz-do-not-send="true">dgrotti@sipwise.com</a>><br>
                        <b>Cc:</b> <a
                          href="mailto:spce-user@lists.sipwise.com"
                          moz-do-not-send="true">spce-user@lists.sipwise.com</a><br>
                        <b>Betreff:</b> Re: [Spce-user] How to deal with
                        non-numeric characters in a dialed number</span><o:p></o:p></p>
                  </div>
                </div>
                <p class="MsoNormal"> <o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">Hello
                    Daniel,</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">one
                    short thing left:</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">if there is a callforward to the local
                    mailbox, there there will be also a new INVITE for
                    this call forward.</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">How can i identify this one to exclude
                    this from my blocking code? Is there also something
                    like has_totag for that?</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">Failure route for local call,
                    code='408'</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">CFT to CF map id '1098' found</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">CFT to destination '<a
                      href="mailto:sip:vmu43662434111@voicebox.local"
                      moz-do-not-send="true">sip:vmu43662434111@voicebox.local</a>'
                    with timeout '300' and announcement '<null>'
                    activated</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">New request on proxy - M=INVITE <a
                      href="mailto:R=sip:vmu43662434111@voicebox.local"
                      moz-do-not-send="true">R=sip:vmu43662434111@voicebox.local</a></span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US"> </span><o:p></o:p></p>
                <div>
                  <div style="border:none;border-top:solid #E1E1E1
                    1.0pt;padding:3.0pt 0cm 0cm 0cm">
                    <p class="MsoNormal"><b><span
                          style="color:windowtext;mso-fareast-language:DE-AT"
                          lang="DE">Von:</span></b><span
                        style="color:windowtext;mso-fareast-language:DE-AT"
                        lang="DE"> Spce-user <<a
                          href="mailto:spce-user-bounces@lists.sipwise.com"
                          moz-do-not-send="true">spce-user-bounces@lists.sipwise.com</a>>
                        <b>Im Auftrag von </b>Hohl Matthias<br>
                        <b>Gesendet:</b> Dienstag, 21. August 2018 21:59<br>
                        <b>An:</b> 'Daniel Grotti' <<a
                          href="mailto:dgrotti@sipwise.com"
                          moz-do-not-send="true">dgrotti@sipwise.com</a>><br>
                        <b>Cc:</b> <a
                          href="mailto:spce-user@lists.sipwise.com"
                          moz-do-not-send="true">spce-user@lists.sipwise.com</a><br>
                        <b>Betreff:</b> Re: [Spce-user] How to deal with
                        non-numeric characters in a dialed number</span><o:p></o:p></p>
                  </div>
                </div>
                <p class="MsoNormal"> <o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">Hello,</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D">yes
                    this works now!</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">Hopfully the FINAL Version:</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US"> </span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">        if(is_method("INVITE")
                    && !($rU =~ "^\+?[0-9]+$") &&
                    !has_totag() )</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">        {</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">                xlog("L_WARN", "Dialed
                    number is not numeric - '$rU' - [% logreq -%]\n");</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">                sl_send_reply("403",
                    "Dialed number is not numeric");</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">                route(ROUTE_EXIT);</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"
                    lang="EN-US">        }</span><o:p></o:p></p>
                <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                <div>
                  <div style="border:none;border-top:solid #E1E1E1
                    1.0pt;padding:3.0pt 0cm 0cm 0cm">
                    <p class="MsoNormal"><b><span
                          style="color:windowtext;mso-fareast-language:DE-AT"
                          lang="DE">Von:</span></b><span
                        style="color:windowtext;mso-fareast-language:DE-AT"
                        lang="DE"> Daniel Grotti <<a
                          href="mailto:dgrotti@sipwise.com"
                          moz-do-not-send="true">dgrotti@sipwise.com</a>>
                        <br>
                        <b>Gesendet:</b> Dienstag, 21. August 2018 21:46<br>
                        <b>An:</b> Hohl Matthias <<a
                          href="mailto:matthias.hohl@telematica.at"
                          moz-do-not-send="true">matthias.hohl@telematica.at</a>><br>
                        <b>Cc:</b> <a
                          href="mailto:spce-user@lists.sipwise.com"
                          moz-do-not-send="true">spce-user@lists.sipwise.com</a><br>
                        <b>Betreff:</b> Re: AW: AW: AW: [Spce-user] How
                        to deal with non-numeric characters in a dialed
                        number</span><o:p></o:p></p>
                  </div>
                </div>
                <p class="MsoNormal"> <o:p></o:p></p>
                <p class="MsoNormal">You can use the has_totag() to
                  check if its a re-invite.<o:p></o:p></p>
                <div>
                  <p class="MsoNormal">Initial invites will have
                    has_totag() false.<o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal"> <o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal">Cheers<o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal"> <o:p></o:p></p>
                </div>
                <div>
                  <p class="MsoNormal">Daniel<o:p></o:p></p>
                  <div>
                    <p class="MsoNormal" style="margin-bottom:12.0pt"> <o:p></o:p></p>
                    <div id="AppleMailSignature">
                      <p class="MsoNormal">Sent from my iPhone<o:p></o:p></p>
                    </div>
                    <div>
                      <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
                        On 21.08.2018, at 21:37, Hohl Matthias <<a
                          href="mailto:matthias.hohl@telematica.at"
                          moz-do-not-send="true">matthias.hohl@telematica.at</a>>
                        wrote:<o:p></o:p></p>
                    </div>
                    <blockquote
                      style="margin-top:5.0pt;margin-bottom:5.0pt">
                      <div>
                        <p class="MsoNormal"><span style="color:#1F497D">Hello,</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">yes this is accepted as well
                            with this regex.</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">But we found another problem if
                            there will be a second invite within a call,
                            if there is for an example a fax behind:</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US"> </span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">Aug 21 20:34:31 spce
                            proxy[13116]: NOTICE: <script>:
                            NAT-Reply - S=200 - OK M=INVITE
                            IP=92.63.xxx.xx:5060 (127.0.0.1:5080)
                            ID=af397a3b-2013-1237-7089-002590386650
                            UA='3CXPhoneSystem 15.5.3849.1 (3849)'</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">Aug 21 20:34:31 spce
                            proxy[13116]: NOTICE: <script>:
                            [dialog:start]
                            lua_dlg_callid:[af397a3b-2013-1237-7089-002590386650] 
                            - R=<null>
                            ID=af397a3b-2013-1237-7089-002590386650
                            UA='3CXPhoneSystem 15.5.3849.1 (3849)'</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">Aug 21 20:34:31 spce
                            proxy[13119]: NOTICE: <script>: New
                            request on proxy - M=ACK
                            R=sip:127.0.0.1:5080;prxroute=1 <a
                              href="mailto:F=sip:4367677777777@92.63.xxx.xx"
                              moz-do-not-send="true">F=sip:4367677777777@92.63.xxx.xx</a>
                            <a
                              href="mailto:T=sip:80244311111112@92.63.xxx.xx"
                              moz-do-not-send="true">T=sip:80244311111112@92.63.xxx.xx</a>
                            IP=92.63.xxx.xx:5060 (127.0.0.1:5060)
                            ID=af397a3b-2013-1237-7089-002590386650
                            UA='<null>'</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">Aug 21 20:34:31 spce
                            proxy[13120]: NOTICE: <script>: New
                            request on proxy - M=INVITE <a
                              href="mailto:R=sip:mod_sofia@92.63.xxx.xx:5080"
                              moz-do-not-send="true">R=sip:mod_sofia@92.63.xxx.xx:5080</a>
                            <a href="mailto:F=sip:43112345@92.63.xxx.xx"
                              moz-do-not-send="true">F=sip:43112345@92.63.xxx.xx</a>
                            <a
                              href="mailto:T=sip:43676777777@sip.telematica.at"
                              moz-do-not-send="true">T=sip:43676777777@sip.telematica.at</a>
                            IP=127.0.0.1:5080 (127.0.0.1:5080)
                            ID=af397a3b-2013-1237-7089-002590386650
                            UA='3CXPhoneSystem 15.5.3849.1 (3849)'</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US"> </span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">It looks like this happens very
                            often, so I think matching again the $rU is
                            not the best thing, to solve this problem.</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">I am also wondering why
                            rate-o-mat has no problem with this invite
                            if this is inside a call. But I think maybe
                            cause rate o mat just look onto the initial
                            call.</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US"> </span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">Anyway: how can I solve this
                            problem?</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US">Is it possible and wise just to
                            look onto the “TO” Sip Header? And if yes,
                            whats the variable for this? We tried “$tu”
                            but it blocks then all incoming calls.</span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US"> </span><o:p></o:p></p>
                        <p class="MsoNormal"><span style="color:#1F497D"
                            lang="EN-US"> </span><o:p></o:p></p>
                        <div>
                          <div style="border:none;border-top:solid
                            #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
                            <p class="MsoNormal"><b><span
                                  style="color:windowtext;mso-fareast-language:DE-AT"
                                  lang="DE">Von:</span></b><span
                                style="color:windowtext;mso-fareast-language:DE-AT"
                                lang="DE"> Daniel Grotti <<a
                                  href="mailto:dgrotti@sipwise.com"
                                  moz-do-not-send="true">dgrotti@sipwise.com</a>>
                                <br>
                                <b>Gesendet:</b> Dienstag, 21. August
                                2018 20:22<br>
                                <b>An:</b> Hohl Matthias <<a
                                  href="mailto:matthias.hohl@telematica.at"
                                  moz-do-not-send="true">matthias.hohl@telematica.at</a>><br>
                                <b>Cc:</b> <a
                                  href="mailto:spce-user@lists.sipwise.com"
                                  moz-do-not-send="true">spce-user@lists.sipwise.com</a><br>
                                <b>Betreff:</b> Re: AW: AW: [Spce-user]
                                How to deal with non-numeric characters
                                in a dialed number</span><o:p></o:p></p>
                          </div>
                        </div>
                        <p class="MsoNormal"> <o:p></o:p></p>
                        <p class="MsoNormal">Probably you would need to
                          accept number starting with 0 and 00 as well.<o:p></o:p></p>
                        <div>
                          <p class="MsoNormal"> <o:p></o:p></p>
                        </div>
                        <div>
                          <p class="MsoNormal"
                            style="margin-bottom:12.0pt">Daniel<o:p></o:p></p>
                          <div id="AppleMailSignature">
                            <p class="MsoNormal">Sent from my iPhone<o:p></o:p></p>
                          </div>
                          <div>
                            <p class="MsoNormal"
                              style="margin-bottom:12.0pt"><br>
                              On 21.08.2018, at 20:14, Hohl Matthias
                              <<a
                                href="mailto:matthias.hohl@telematica.at"
                                moz-do-not-send="true">matthias.hohl@telematica.at</a>>
                              wrote:<o:p></o:p></p>
                          </div>
                          <blockquote
                            style="margin-top:5.0pt;margin-bottom:5.0pt">
                            <div>
                              <p class="MsoNormal"><span
                                  style="color:#1F497D" lang="EN-US">I
                                  tested it and i have to modificate it
                                  just a little but and now it is
                                  working </span><span
                                  style="font-family:Wingdings;color:#1F497D"
                                  lang="EN-US">J</span><o:p></o:p></p>
                              <p class="MsoNormal"><span
                                  style="color:#1F497D" lang="EN-US">If
                                  there is the number NOT in format +123
                                  or 1234 it will do a log entry and
                                  also reply with 403 – dialed number is
                                  not numeric</span><o:p></o:p></p>
                              <p class="MsoNormal"><span
                                  style="color:#1F497D" lang="EN-US"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
                                  style="color:#1F497D" lang="EN-US">This
                                  is the final working code under
                                  /etc/ngcp-config/templates/etc/kamailio/proxy/kamailio.cfg.customtt.tt2</span><o:p></o:p></p>
                              <p class="MsoNormal"><span
                                  style="color:#1F497D" lang="EN-US"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><i><span
                                    style="color:#1F497D" lang="EN-US">       
                                    if(is_method("INVITE") &&
                                    !($rU =~ "^\+?[0-9]+$"))</span></i><o:p></o:p></p>
                              <p class="MsoNormal"><i><span
                                    style="color:#1F497D" lang="EN-US">       
                                    {</span></i><o:p></o:p></p>
                              <p class="MsoNormal"><i><span
                                    style="color:#1F497D" lang="EN-US">               
                                    xlog("L_WARN", "Dialed number is not
                                    numeric - '$rU' - [% logreq -%]\n");</span></i><o:p></o:p></p>
                              <p class="MsoNormal"><i><span
                                    style="color:#1F497D" lang="EN-US">               
                                    sl_send_reply("403", "Dialed number
                                    is not numeric");</span></i><o:p></o:p></p>
                              <p class="MsoNormal"><i><span
                                    style="color:#1F497D" lang="EN-US">               
                                    route(ROUTE_EXIT);</span></i><o:p></o:p></p>
                              <p class="MsoNormal"><i><span
                                    style="color:#1F497D" lang="EN-US">       
                                    } </span></i><o:p></o:p></p>
                              <p class="MsoNormal"><span
                                  style="color:#1F497D" lang="EN-US"> </span><o:p></o:p></p>
                              <p class="MsoNormal"><span
                                  style="color:#1F497D" lang="EN-US"> </span><o:p></o:p></p>
                              <div>
                                <div style="border:none;border-top:solid
                                  #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm
                                  0cm">
                                  <p class="MsoNormal"><b><span
                                        style="color:windowtext;mso-fareast-language:DE-AT"
                                        lang="DE">Von:</span></b><span
                                      style="color:windowtext;mso-fareast-language:DE-AT"
                                      lang="DE"> Daniel Grotti <<a
                                        href="mailto:dgrotti@sipwise.com"
                                        moz-do-not-send="true">dgrotti@sipwise.com</a>>
                                      <br>
                                      <b>Gesendet:</b> Dienstag, 21.
                                      August 2018 19:43<br>
                                      <b>An:</b> Hohl Matthias <<a
                                        href="mailto:matthias.hohl@telematica.at"
                                        moz-do-not-send="true">matthias.hohl@telematica.at</a>><br>
                                      <b>Cc:</b> <a
                                        href="mailto:spce-user@lists.sipwise.com"
                                        moz-do-not-send="true">spce-user@lists.sipwise.com</a><br>
                                      <b>Betreff:</b> Re: AW:
                                      [Spce-user] How to deal with
                                      non-numeric characters in a dialed
                                      number</span><o:p></o:p></p>
                                </div>
                              </div>
                              <p class="MsoNormal"> <o:p></o:p></p>
                              <p class="MsoNormal">At a first sight it
                                looks good.<o:p></o:p></p>
                              <div>
                                <p class="MsoNormal">It worth a try.<o:p></o:p></p>
                              </div>
                              <div>
                                <p class="MsoNormal"> <o:p></o:p></p>
                              </div>
                              <div>
                                <p class="MsoNormal"
                                  style="margin-bottom:12.0pt">Daniel<o:p></o:p></p>
                                <div id="AppleMailSignature">
                                  <p class="MsoNormal">Sent from my
                                    iPhone<o:p></o:p></p>
                                </div>
                                <div>
                                  <p class="MsoNormal"
                                    style="margin-bottom:12.0pt"><br>
                                    On 21.08.2018, at 19:39, Hohl
                                    Matthias <<a
                                      href="mailto:matthias.hohl@telematica.at"
                                      moz-do-not-send="true">matthias.hohl@telematica.at</a>>
                                    wrote:<o:p></o:p></p>
                                </div>
                                <blockquote
                                  style="margin-top:5.0pt;margin-bottom:5.0pt">
                                  <div>
                                    <p class="MsoNormal"><span
                                        style="color:#1F497D"
                                        lang="EN-US">Hello Daniel,</span><o:p></o:p></p>
                                    <p class="MsoNormal"><span
                                        style="color:#1F497D"
                                        lang="EN-US"> </span><o:p></o:p></p>
                                    <p class="MsoNormal"><span
                                        style="color:#1F497D"
                                        lang="EN-US">i think this will
                                        work for reply 403 of the dialed
                                        number don’t match numeric
                                        number, right?</span><o:p></o:p></p>
                                    <p class="MsoNormal"><span
                                        style="color:#1F497D"
                                        lang="EN-US"> </span><o:p></o:p></p>
                                    <p class="MsoNormal"
                                      style="margin-left:0cm;text-indent:-18.0pt;mso-list:l1
                                      level1 lfo2;background:white"><!--[if !supportLists]--><span
                                        style="mso-list:Ignore">1.<span
                                          style="font:7.0pt "Times
                                          New Roman"">       </span></span><!--[endif]--><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">        </span><span
style="font-size:9.0pt;font-family:Consolas;color:#205081;mso-fareast-language:DE-AT"
                                        lang="EN-US">if</span><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">(is_method(</span><span
style="font-size:9.0pt;font-family:Consolas;color:#C42B44;mso-fareast-language:DE-AT"
                                        lang="EN-US">"INVITE"</span><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">) && ($rU
                                        !~ </span><span
style="font-size:9.0pt;font-family:Consolas;color:#C42B44;mso-fareast-language:DE-AT">"^\+?[0-9]+$"</span><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT">))</span><o:p></o:p></p>
                                    <p class="MsoNormal"
                                      style="margin-left:0cm;text-indent:-18.0pt;mso-list:l1
                                      level1 lfo2;background:white"><!--[if !supportLists]--><span
                                        style="mso-list:Ignore">2.<span
                                          style="font:7.0pt "Times
                                          New Roman"">       </span></span><!--[endif]--><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT">        {</span><o:p></o:p></p>
                                    <p class="MsoNormal"
                                      style="margin-left:0cm;text-indent:-18.0pt;mso-list:l1
                                      level1 lfo2;background:white"><!--[if !supportLists]--><span
                                        style="mso-list:Ignore">3.<span
                                          style="font:7.0pt "Times
                                          New Roman"">       </span></span><!--[endif]--><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">                xlog(</span><span
style="font-size:9.0pt;font-family:Consolas;color:#C42B44;mso-fareast-language:DE-AT"
                                        lang="EN-US">"L_WARN"</span><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">, </span><span
style="font-size:9.0pt;font-family:Consolas;color:#C42B44;mso-fareast-language:DE-AT"
                                        lang="EN-US">"Dialed number is
                                        not numeric - '$rU' - [%
                                        logreq_init -%]\n"</span><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">);</span><o:p></o:p></p>
                                    <p class="MsoNormal"
                                      style="margin-left:0cm;text-indent:-18.0pt;mso-list:l1
                                      level1 lfo2;background:white"><!--[if !supportLists]--><span
                                        style="mso-list:Ignore">4.<span
                                          style="font:7.0pt "Times
                                          New Roman"">       </span></span><!--[endif]--><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">                sl_send_reply(</span><span
style="font-size:9.0pt;font-family:Consolas;color:#C42B44;mso-fareast-language:DE-AT"
                                        lang="EN-US">"403"</span><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">, </span><span
style="font-size:9.0pt;font-family:Consolas;color:#C42B44;mso-fareast-language:DE-AT"
                                        lang="EN-US">"Dialed number is
                                        not numeric"</span><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">);</span><o:p></o:p></p>
                                    <p class="MsoNormal"
                                      style="margin-left:0cm;text-indent:-18.0pt;mso-list:l1
                                      level1 lfo2;background:white"><!--[if !supportLists]--><span
                                        style="mso-list:Ignore">5.<span
                                          style="font:7.0pt "Times
                                          New Roman"">       </span></span><!--[endif]--><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT"
                                        lang="EN-US">                </span><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT">route(ROUTE_EXIT);</span><o:p></o:p></p>
                                    <p class="MsoNormal"
                                      style="margin-left:0cm;text-indent:-18.0pt;mso-list:l1
                                      level1 lfo2;background:white"><!--[if !supportLists]--><span
                                        style="mso-list:Ignore">6.<span
                                          style="font:7.0pt "Times
                                          New Roman"">       </span></span><!--[endif]--><span
style="font-size:9.0pt;font-family:Consolas;color:#333333;mso-fareast-language:DE-AT">        }</span><o:p></o:p></p>
                                    <p class="MsoNormal"><span
                                        style="color:#1F497D"> </span><o:p></o:p></p>
                                    <p class="MsoNormal"><span
                                        style="color:#1F497D"> </span><o:p></o:p></p>
                                    <div>
                                      <div
                                        style="border:none;border-top:solid
                                        #E1E1E1 1.0pt;padding:3.0pt 0cm
                                        0cm 0cm">
                                        <p class="MsoNormal"><b><span
                                              style="color:windowtext;mso-fareast-language:DE-AT"
                                              lang="DE">Von:</span></b><span
style="color:windowtext;mso-fareast-language:DE-AT" lang="DE"> Spce-user
                                            <<a
                                              href="mailto:spce-user-bounces@lists.sipwise.com"
                                              moz-do-not-send="true">spce-user-bounces@lists.sipwise.com</a>>
                                            <b>Im Auftrag von </b>Daniel
                                            Grotti<br>
                                            <b>Gesendet:</b> Dienstag,
                                            21. August 2018 14:01<br>
                                            <b>An:</b> <a
                                              href="mailto:spce-user@lists.sipwise.com"
                                              moz-do-not-send="true">spce-user@lists.sipwise.com</a><br>
                                            <b>Betreff:</b> Re:
                                            [Spce-user] How to deal with
                                            non-numeric characters in a
                                            dialed number</span><o:p></o:p></p>
                                      </div>
                                    </div>
                                    <p class="MsoNormal"> <o:p></o:p></p>
                                    <p class="MsoNormal"
                                      style="margin-bottom:12.0pt"><tt><span
                                          style="font-size:10.0pt">H
                                          Matthias,</span></tt><span
                                        style="font-size:10.0pt;font-family:"Courier
                                        New",serif"><br>
                                        <tt>another option, instead of
                                          trying to consume the
                                          non-numeric number, is to make
                                          sure in kamailio that the
                                          dialed number match a numeric
                                          number series, if not you just
                                          reply 403 - not a numeric
                                          number. This will avoid the
                                          system to parse the call any
                                          further.</tt><br>
                                        <br>
                                        <tt>Solution from Barry is also
                                          ok, but the system will parse
                                          the call until the peer
                                          selection, and call will fails
                                          with "no peering rule found"
                                          (I think it's a 500 error).</tt><br>
                                        <br>
                                        <br>
                                        <tt>Cheers,</tt><br>
                                        <tt>Daniel</tt><br>
                                        <br>
                                        <br>
                                        <br>
                                      </span>On 08/21/2018 01:42 PM,
                                      Hohl Matthias wrote:<br>
                                      <br>
                                      <br>
                                      <br>
                                      <o:p></o:p></p>
                                    <blockquote
                                      style="margin-top:5.0pt;margin-bottom:5.0pt">
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D">Hey
                                          Rene,</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"
                                          lang="EN-US">I already thought
                                          on this but this is no real
                                          deal, cause then we will loose
                                          the money for this calls. If
                                          someone find out this trick to
                                          add a “ABC” behind the number
                                          and this will be rated as 0
                                          cent then there will be a
                                          massive abuse potential.</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"
                                          lang="EN-US">So easier would
                                          be to block all calls to this
                                          dialed numbers or the clear it
                                          like I descripe in option 2,
                                          but I don’t know the right
                                          regex to clear all non-numeric
                                          characters except a “+” on the
                                          first sign.</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"
                                          lang="EN-US">Can you maybe
                                          help me with this solution
                                          too?</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"
                                          lang="EN-US">My solution is
                                          just working for for
                                          -%()&*.,!“$ but not for
                                          letters or
                                          /x;:_=~@#§:[]\^°`´‘|<>
                                          and not if there is a “+” on
                                          the first sign.</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"
                                          lang="EN-US">Thank you.</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <div>
                                        <div
                                          style="border:none;border-top:solid
                                          #E1E1E1 1.0pt;padding:3.0pt
                                          0cm 0cm 0cm">
                                          <p class="MsoNormal"><b><span
style="mso-fareast-language:DE-AT" lang="DE">Von:</span></b><span
                                              style="mso-fareast-language:DE-AT"
                                              lang="DE"> Rene Krenn <a
href="mailto:rkrenn@sipwise.com" moz-do-not-send="true"><rkrenn@sipwise.com></a>
                                              <br>
                                              <b>Gesendet:</b> Dienstag,
                                              21. August 2018 13:29<br>
                                              <b>An:</b> 'Hohl Matthias'
                                              <a
                                                href="mailto:matthias.hohl@telematica.at"
                                                moz-do-not-send="true"><matthias.hohl@telematica.at></a>;
                                              <a
                                                href="mailto:spce-user@lists.sipwise.com"
                                                moz-do-not-send="true">spce-user@lists.sipwise.com</a><br>
                                              <b>Betreff:</b> AW:
                                              [Spce-user] How to deal
                                              with non-numeric
                                              characters in a dialed
                                              number</span><o:p></o:p></p>
                                        </div>
                                      </div>
                                      <p class="MsoNormal"> <o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D">Hi,</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D">why not
                                          adding two 0cent fees to
                                          cover, ie.:</span><o:p></o:p></p>
                                      <p class="MsoListParagraph"><span
                                          style="color:#1F497D"> </span><o:p></o:p></p>
                                      <p class="MsoListParagraph"
                                        style="text-indent:-18.0pt;mso-list:l2
                                        level1 lfo4"><!--[if !supportLists]--><span
                                          style="mso-list:Ignore">1.<span
                                            style="font:7.0pt
                                            "Times New Roman"">      
                                          </span></span><!--[endif]--><span
                                          style="color:#1F497D">Non-digit
                                          source:</span><o:p></o:p></p>
                                      <p class="MsoListParagraph"><span
                                          style="color:#1F497D"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D">src:
                                          [^0-9+]+</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D">dst: .</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"> </span><o:p></o:p></p>
                                      <p class="MsoListParagraph"
                                        style="text-indent:-18.0pt;mso-list:l2
                                        level1 lfo4"><!--[if !supportLists]--><span
                                          style="mso-list:Ignore">2.<span
                                            style="font:7.0pt
                                            "Times New Roman"">      
                                          </span></span><!--[endif]--><span
                                          style="color:#1F497D">Non-digit
                                          destination:</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D">src: .</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D">dst:
                                          [^0-9+]+</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D">Note
                                          that 6.5 will bring fee „match
                                          modes“
                                          (regex_longest_pattern/legacy,
                                          regex_longest_pattern, prefix,
                                          exact, etc.) for way more
                                          speed and flexibility.</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D">regards</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="color:#1F497D"> </span><o:p></o:p></p>
                                      <div>
                                        <div
                                          style="border:none;border-top:solid
                                          #E1E1E1 1.0pt;padding:3.0pt
                                          0cm 0cm 0cm">
                                          <p class="MsoNormal"><b><span
style="mso-fareast-language:DE-AT" lang="DE">Von:</span></b><span
                                              style="mso-fareast-language:DE-AT"
                                              lang="DE"> Spce-user [<a
                                                href="mailto:spce-user-bounces@lists.sipwise.com"
                                                moz-do-not-send="true">mailto:spce-user-bounces@lists.sipwise.com</a>]
                                              <b>Im Auftrag von </b>Hohl
                                              Matthias<br>
                                              <b>Gesendet:</b> Dienstag,
                                              21. August 2018 13:17<br>
                                              <b>An:</b> <a
                                                href="mailto:spce-user@lists.sipwise.com"
                                                moz-do-not-send="true">spce-user@lists.sipwise.com</a><br>
                                              <b>Betreff:</b>
                                              [Spce-user] How to deal
                                              with non-numeric
                                              characters in a dialed
                                              number</span><o:p></o:p></p>
                                        </div>
                                      </div>
                                      <p class="MsoNormal"> <o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US">Hello,</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US">we often have the
                                          problem, that an UA of a
                                          subscriber is dialing a number
                                          with non-numeric characters
                                          like “-%/” or also letters
                                          like “ABCD” and so on.</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US">Everytime when
                                          this happens, our rate-o-mat
                                          stop working, cause there is
                                          no billing profile destination
                                          pattern for such kind of
                                          characters.</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US">Normally our
                                          billing profile pattern looks
                                          like this: Source Pattern: “.”
                                          Destination Pattern:  </span><span
                                          style="font-size:9.0pt"
                                          lang="EN-US">^431.+$</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US">My ideas to fix
                                          this problem:</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoListParagraph"
                                        style="text-indent:-18.0pt;mso-list:l0
                                        level1 lfo6"><!--[if !supportLists]--><span
                                          style="mso-list:Ignore">1.)<span
                                            style="font:7.0pt
                                            "Times New Roman"">   
                                          </span></span><!--[endif]--><span
                                          lang="EN-US">If a UA is
                                          calling a non-numeric number,
                                          except “+” in the front, then
                                          the call should be blocked by
                                          SPCE. <br>
                                          So calls not formatted like
                                          #4312345 or 012345 should be
                                          blocked, without trying to
                                          reach a peering.<br>
                                          Is this possible? It would the
                                          easiest way to force a
                                          subscriber to dial correct
                                          numbers, otherwise calling is
                                          not working.</span><o:p></o:p></p>
                                      <p class="MsoListParagraph"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoListParagraph"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoListParagraph"
                                        style="text-indent:-18.0pt;mso-list:l0
                                        level1 lfo6"><!--[if !supportLists]--><span
                                          style="mso-list:Ignore">2.)<span
                                            style="font:7.0pt
                                            "Times New Roman"">   
                                          </span></span><!--[endif]--><span
                                          lang="EN-US">Clear special
                                          characters in the INVITE: </span><span
style="font-size:10.5pt;font-family:Consolas;color:white;background:#121212"
                                          lang="EN-US">/etc/ngcp-config/templates/etc/kamailio/proxy/kamailio.cfg.customtt.tt2</span><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="text-indent:35.4pt;line-height:15.0pt;vertical-align:baseline"><span
                                          lang="EN-US">I tried to edit
                                          the kamailio.cfg.tt2 and edit
                                          it to this:<br>
                                        </span><i><span
                                            style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT"
                                            lang="EN-US">        if(is_method("INVITE"))</span></i><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="line-height:15.0pt;vertical-align:baseline"><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT"
                                            lang="EN-US">        </span></i><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT">{</span></i><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="line-height:15.0pt;vertical-align:baseline"><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT">                $rU
                                            =
                                            $(rU{re.subst,/^(\+)?[:blank:]?\(?([0-9]*)\)?[
                                            -.]?\(?([0-9]*)\)?[
                                            -.]?\(?([0-9]*)\)?[
                                            -.]?\(?([0-9]*)\)?[
                                            -.]?\(?([0-9]*)\)?$/\1\2\3\4\5\6/});</span></i><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="line-height:15.0pt;vertical-align:baseline"><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT">                </span></i><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT"
                                            lang="EN-US">xlog("L_NOTICE", "Consume
                                            special chars in RURI -
                                            '$rU' - [% logreq_init
                                            -%]\n");</span></i><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="line-height:15.0pt;vertical-align:baseline"><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT"
                                            lang="EN-US">        </span></i><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT">}</span></i><o:p></o:p></p>
                                      <p class="MsoListParagraph"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoListParagraph"><span
                                          lang="EN-US">But this way,
                                          just working for
                                          -%()&*.,!“$ but not for
                                          letters or
                                          /x;:_=~@#§:[]\^°`´‘|<><br>
                                          How do I have to edit this to
                                          clear everything witch is a
                                          non-numeric character or a
                                          number with a “+” in the
                                          front?</span><o:p></o:p></p>
                                      <p class="MsoListParagraph"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoListParagraph"><span
                                          lang="EN-US">Will this do the
                                          trick?</span><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="text-indent:35.4pt;line-height:15.0pt;vertical-align:baseline"><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT"
                                            lang="EN-US">        if(is_method("INVITE"))</span></i><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="line-height:15.0pt;vertical-align:baseline"><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT"
                                            lang="EN-US">        {</span></i><o:p></o:p></p>
                                      <p class="MsoListParagraph"><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT">         
                                          </span>$rU =
                                          $(rU{re.subst,/[^0-9]//g});</i><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="line-height:15.0pt;vertical-align:baseline"><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT">                </span></i><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT"
                                            lang="EN-US">xlog("L_NOTICE", "Consume
                                            special chars in RURI -
                                            '$rU' - [% logreq_init
                                            -%]\n");</span></i><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="line-height:15.0pt;vertical-align:baseline"><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT"
                                            lang="EN-US">        </span></i><i><span
style="font-size:10.0pt;font-family:Consolas;color:#333333;border:none
                                            windowtext
                                            1.0pt;padding:0cm;mso-fareast-language:DE-AT">}</span></i><o:p></o:p></p>
                                      <p class="MsoListParagraph"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoListParagraph"> <o:p></o:p></p>
                                      <p class="MsoListParagraph"
                                        style="text-indent:-18.0pt;mso-list:l0
                                        level1 lfo6"><!--[if !supportLists]--><span
                                          style="mso-list:Ignore">3.)<span
                                            style="font:7.0pt
                                            "Times New Roman"">   
                                          </span></span><!--[endif]--><span
                                          lang="EN-US">Editing the
                                          Rewrite Rules to match also
                                          against non-numeric characters
                                          in a dialed number string. But
                                          I think this will cause more
                                          problems like it fix.</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US">How did you fix
                                          this problems? I think the
                                          easiest thing would be to
                                          block everything which is not
                                          perfect formatted (1.). Is
                                          this possible?</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US">It would be very
                                          nice if you could assist me
                                          with this problem.</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US">Thank you</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          lang="EN-US"> </span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="mso-fareast-language:DE-AT">Mit
                                          freundlichen Grüßen,</span><o:p></o:p></p>
                                      <p class="MsoNormal"><span
                                          style="mso-fareast-language:DE-AT">Matthias
                                          Hohl</span><o:p></o:p></p>
                                      <p class="MsoNormal"
                                        style="margin-bottom:12.0pt"><span
                                          style="font-size:12.0pt"><br>
                                          <br>
                                          <br>
                                          <br>
                                          <br>
                                        </span><o:p></o:p></p>
                                      <pre>_______________________________________________<o:p></o:p></pre>
                                      <pre>Spce-user mailing list<o:p></o:p></pre>
                                      <pre><a href="mailto:Spce-user@lists.sipwise.com" moz-do-not-send="true">Spce-user@lists.sipwise.com</a><o:p></o:p></pre>
                                      <pre><a href="https://lists.sipwise.com/listinfo/spce-user" moz-do-not-send="true">https://lists.sipwise.com/listinfo/spce-user</a><o:p></o:p></pre>
                                    </blockquote>
                                    <p class="MsoNormal"><span
                                        style="font-size:12.0pt"> </span><o:p></o:p></p>
                                  </div>
                                </blockquote>
                              </div>
                            </div>
                          </blockquote>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <p class="MsoNormal"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif;mso-fareast-language:DE-AT"><br>
              <br>
              <br>
              <o:p></o:p></span></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>Spce-user mailing list<o:p></o:p></pre>
          <pre><a href="mailto:Spce-user@lists.sipwise.com" moz-do-not-send="true">Spce-user@lists.sipwise.com</a><o:p></o:p></pre>
          <pre><a href="https://lists.sipwise.com/listinfo/spce-user" moz-do-not-send="true">https://lists.sipwise.com/listinfo/spce-user</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:DE-AT"><o:p> </o:p></span></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>