<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Rene,</p>
    <p>Then there is still a problem with the UI, it always inserts a
      "." in the source field if you leave the field empty.<br>
    </p>
    Regards,<br>
    Henk<br>
    <br>
    <div class="moz-cite-prefix">On 18-2-2019 10:12, Rene Krenn wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:006201d4c76a$0deaa7d0$29bff770$@sipwise.com">
      <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:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        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;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.E-MailFormatvorlage19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.E-MailFormatvorlage20
        {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;}
--></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">>So in prefix mode do you still use a
          REGEX source pattern?<o:p></o:p></p>
        <p class="MsoNormal">No, to match any source in prefix matching,
          leave it empty instead of „.“<o:p></o:p></p>
        <p class="MsoNormal">The form defaults are for regex modes only.<span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">></span>
          About the get_billing_fee problem, when do you expect a fix?<o:p></o:p></p>
        <p class="MsoNormal">An unintentional casting is happening,
          presumably because of missing quotes at some point.<o:p></o:p></p>
        <p class="MsoNormal">Not this sprint, i presume.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">br<o:p></o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language: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="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"
                  lang="DE">Von:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"
                lang="DE"> Spce-user
                [<a class="moz-txt-link-freetext" href="mailto:spce-user-bounces@lists.sipwise.com">mailto:spce-user-bounces@lists.sipwise.com</a>] <b>Im
                  Auftrag von </b>Henk<br>
                <b>Gesendet:</b> Montag, 18. Februar 2019 09:54<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] Prefix matching mode
                crashes with long numbers (mr6.5.3)<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt">Hi Rene,<br>
          <br>
          My question was about the <u>source</u> pattern, as I first
          suspected this had something to do with the error. I uploaded
          a csv with empty source pattern, but when editing the rate the
          GUI fills in "." which is a REGEX pattern. So in prefix mode
          do you still use a REGEX source pattern, or is prefix mode
          only for the destination?<br>
          <br>
          About the get_billing_fee problem, when do you expect a fix?<br>
          <br>
          Regards,<br>
          Henk<o:p></o:p></p>
        <div>
          <p class="MsoNormal">On 17-2-2019 21:41, Rene Krenn wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">></span>
            It looks to me like the stored procedure <tt><span
                style="font-size:10.0pt">get_billing_fee_id</span></tt>
            is the source of the problem.<o:p></o:p></p>
          <p class="MsoNormal">Thx for pointing.<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">></span>
            I also noticed that the default billing fee source pattern
            is "." in the UI if you save a fee with an empty field. Is
            this correct for match mode "prefix"?<o:p></o:p></p>
          <p class="MsoNormal">This is the default for destination, kept
            to not change the behaviour with (legacy) .csv uploads.<o:p></o:p></p>
          <p class="MsoNormal">For fee match modes other than regex,
            some dedicated destination (pefix) needs to be provided
            anyway to make sense.<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">regards <o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language: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="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"
                    lang="DE">Von:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"
                  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>Henk<br>
                  <b>Gesendet:</b> Sonntag, 17. Februar 2019 20:00<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] Prefix matching mode
                  crashes with long numbers (mr 6.5.3)</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p>Hi all,<o:p></o:p></p>
          <p class="MsoNormal">Just did a test with billing fees defined
            in prefix mode instead of regex_longest_match with I
            normally use (and works fine but slow). I noticed an error
            in the proxy log:<br>
            <tt><span style="font-size:10.0pt">Feb 17 17:36:31 spce
                proxy[6234]: NOTICE: <script>: Load gws matching
                calling part '<a href="sip:31652222222@0.0.0.0"
                  moz-do-not-send="true">sip:31652222222@0.0.0.0</a>'
                and called user '80131201111111' and called part '<a
                  href="sip:80131201111111@1.1.1.1:5060"
                  moz-do-not-send="true">sip:80131201111111@1.1.1.1:5060</a>'
                - R=<a href="sip:8013120111111@1.1.1.1:5060"
                  moz-do-not-send="true">sip:8013120111111@1.1.1.1:5060</a>
              </span></tt><span
              style="font-size:10.0pt;font-family:"Courier
              New""><br>
              <tt>Feb 17 17:36:31 spce proxy[6234]: ERROR:
                (src/swr_aux.c:133:swr_vqueryf_dbh_tx) - MySQL error
                code is 1690</tt><br>
              <tt>Feb 17 17:36:31 spce proxy[6234]: ERROR:
                (src/swr_aux.c:142:swr_vqueryf_dbh_tx) - MySQL query
                failed</tt><br>
              <tt>Feb 17 17:36:31 spce proxy[6234]: ERROR:
                (src/swr_logic.c:526:swr_get_profile_info) - Error
                executing profile info statement: BIGINT UNSIGNED value
                is out of range in '(_j@9 - 1)'</tt><br>
              <br>
            </span>Rate-o-mat also stops with an error. I'm using a
            prefix so that the number is 14 characters long, but this is
            not large enough for a BIGINT to get out of range. <br>
            <br>
            From the query log:<br>
            <tt><span style="font-size:10.0pt">278 Query    SELECT id,
                source, destination, onpeak_init_rate,
                onpeak_init_interval, onpeak_follow_rate,
                onpeak_follow_interval, offpeak_init_rate,
                offpeak_init_interval, offpeak_follow_rate,
                offpeak_follow_interval, billing_zones_history_id,
                use_free_time FROM billing.billing_fees_history WHERE id
                = billing.get_billing_fee_id('155','call','out','<a
                  href="mailto:31652222222@0.0.0.0"
                  moz-do-not-send="true">31652222222@0.0.0.0</a>','<a
                  href="mailto:80131201111111@1.1.1.1"
                  moz-do-not-send="true">80131201111111@1.1.1.1</a>',null)</span></tt><span
              style="font-size:10.0pt;font-family:"Courier
              New""><br>
              <tt>278 <b>Query    rollback</b></tt></span><br>
            <br>
            It looks to me like the stored procedure <tt><span
                style="font-size:10.0pt">get_billing_fee_id</span></tt>
            is the source of the problem.<br>
            <br>
            I also noticed that the default billing fee source pattern
            is "." in the UI if you save a fee with an empty field. Is
            this correct for match mode "prefix"? I tested this with an
            empty field and later on inserted the default "." again,
            with the same results.<br>
            <br>
            Regards,<br>
            Henk<o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
    </blockquote>
    <br>
  </body>
</html>