<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello again<br>
      <br>
      I tried to force heartbeat using dialplan and it's works: When the
      balance reach 0, my calls are hanged up and i can't place a new
      call. <br>
      <br>
      I don't understand why this did not work with <b>global_heartbeat</b>
      but it's not really annoying if i can bypass this.<br>
      <br>
      <tt>&lt;extension name="international" &gt;</tt><tt><br>
      </tt><tt>&nbsp;&nbsp; &lt;condition field="destination_number"
        expression="^00(\d{6,20})$" &gt;</tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set"
        data="nibble_account=${accountcode}"/&gt;</tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set"
        data="nibble_rate=0.1"/&gt;</tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>&lt;action application="nibblebill"
          data="heartbeat 30"/&gt;</b></tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="nibblebill"
        data="flush"/&gt;</tt><tt><br>
      </tt><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="bridge"
        data="sofia/gateway/gw_idt/$1" /&gt;</tt><tt><br>
      </tt><tt>&nbsp;&nbsp; &lt;/condition&gt;</tt><tt><br>
      </tt><tt>&lt;/extension&gt;</tt><br>
      <br>
      <br>
      On 11/04/2016 23:55, Sergey Safarov wrote:<br>
    </div>
    <blockquote
cite="mid:CAHtxdDfrtThmDh0GpETSiHDBwRFX4vy+-WhBXW6mb-pH3Q-nfw@mail.gmail.com"
      type="cite">
      <p dir="ltr">Probable. Yes.<br>
        On my servers, all work as documented in confluence. </p>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Tue, Apr 12, 2016, 00:24 Tanguy &lt;<a
            moz-do-not-send="true" href="mailto:phenix@vfemail.net">phenix@vfemail.net</a>&gt;
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000">
            <div>Hello Sergey<br>
              <br>
              Thanks for your advice, now i can't place a new call with
              a negative balance</div>
          </div>
          <div bgcolor="#FFFFFF" text="#000000">
            <div><br>
              <br>
              <tt>[DEBUG] mod_nibblebill.c:488 Attempting to bill at
                $0.1 per minute to account <a moz-do-not-send="true"
                  href="http://company.voip.domain.com" target="_blank">company.voip.domain.com</a></tt><tt><br>
              </tt></div>
          </div>
          <div bgcolor="#FFFFFF" text="#000000">
            <div><tt>[DEBUG] mod_nibblebill.c:500 Not billing account <a
                  moz-do-not-send="true"
                  href="http://company.voip.domain.com" target="_blank">company.voip.domain.com</a>
                - call is not in answered state</tt></div>
          </div>
          <div bgcolor="#FFFFFF" text="#000000">
            <div><tt><br>
              </tt><tt>[DEBUG] mod_nibblebill.c:420 Doing lookup query</tt><tt><br>
              </tt></div>
          </div>
          <div bgcolor="#FFFFFF" text="#000000">
            <div><tt>[DEBUG] mod_nibblebill.c:428 Retrieved current
                balance for account account <a moz-do-not-send="true"
                  href="http://company.voip.domain.com" target="_blank">company.voip.domain.com</a>
                (balance = -0.028433)</tt><tt><br>
              </tt><tt>[DEBUG] mod_nibblebill.c:504 Comparing -0.028433
                to hangup balance of 0.000000</tt><br>
              <br>
              But currents calls are not hanged up when my balance reach
              0 and the database is never updated during the call ( but
              only after hangup ), i probably have a issue with the
              "global_heartbeat" parameter.</div>
          </div>
          <div bgcolor="#FFFFFF" text="#000000">
            <div><br>
              <br>
              <br>
              <br>
              <br>
              <br>
              <br>
              On 11/04/2016 21:59, Sergey Safarov wrote:<br>
            </div>
          </div>
          <div bgcolor="#FFFFFF" text="#000000">
            <blockquote type="cite">
              <p dir="ltr">I think problem in order of flush command. To
                take effect nibble rate must be set before execution
                flush.</p>
              <br>
              <div class="gmail_quote">
                <div dir="ltr">On Mon, Apr 11, 2016, 22:50 tanguy &lt;<a
                    moz-do-not-send="true"
                    href="mailto:phenix@vfemail.net" target="_blank">phenix@vfemail.net</a>&gt;

                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt;
                  Sergey<br>
                  Thank you for your piece of dialplan but i don't think
                  it's the<br>
                  solution. You offer a different solution to set the
                  nibble_rate<br>
                  variable, but in my sample case this variable is
                  properly set because<br>
                  the call is billed.<br>
                  <br>
                  &gt; Luis<br>
                  A bug, maybe. I don't remember my freeswitch version (
                  i can't connect<br>
                  to my servers yet ) but i think it's 1.4 series.<br>
                  <br>
                  I can try the last 1.6 version, i will also try a
                  standard freeswitch<br>
                  sample configuration ( without config files provided
                  by fusionpbx )<br>
                  <br>
                </blockquote>
              </div>
            </blockquote>
            <br>
          </div>
_________________________________________________________________________<br>
          Professional FreeSWITCH Consulting Services:<br>
          <a moz-do-not-send="true"
            href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
          <a moz-do-not-send="true"
            href="http://www.freeswitchsolutions.com" rel="noreferrer"
            target="_blank">http://www.freeswitchsolutions.com</a><br>
          <br>
          Official FreeSWITCH Sites<br>
          <a moz-do-not-send="true" href="http://www.freeswitch.org"
            rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
          <a moz-do-not-send="true"
            href="http://confluence.freeswitch.org" rel="noreferrer"
            target="_blank">http://confluence.freeswitch.org</a><br>
          <a moz-do-not-send="true" href="http://www.cluecon.com"
            rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
          <br>
          FreeSWITCH-users mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:FreeSWITCH-users@lists.freeswitch.org"
            target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
          <a moz-do-not-send="true"
            href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
            rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
          UNSUBSCRIBE:<a moz-do-not-send="true"
            href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
            rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
          <a moz-do-not-send="true" href="http://www.freeswitch.org"
            rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://confluence.freeswitch.org">http://confluence.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a></pre>
    </blockquote>
    <br>
  </body>
</html>