<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hello, I'm using mod_nibblebill to bill my calls only for leg b and heartbeats set to 'off'.</div><div>After the hangup I see 3 different MySQL updates from nibblebill instead of just one.</div><div><br></div><div><div>This is my dial plan:</div><div><br></div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span><extension name="TEST"></div><div> <span class="Apple-tab-span" style="white-space: pre; ">        </span><condition field="destination_number" expression="^(1\d+)$"></div><div> <span class="Apple-tab-span" style="white-space: pre; ">        </span><action application="set" data="dialed_extension=$1"/></div><div> <action application="export" data="dialed_extension=$1"/></div><div> <action application="set" data="hangup_after_bridge=true"/></div><div> <action application="set" data="continue_on_fail=true"/></div><div><span class="Apple-tab-span" style="white-space: pre; ">                        </span><action application="bridge" data="{nibble_rate=5,nibble_account=13}sofia/gateway/xxxxxxx/$1"/></div><div> <action application="hangup"/></div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span></condition></div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span></extension></div></div><div><br></div><div>...this is the MySQL log:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>select 1</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>UPDATE web_account SET balance=balance-0.343372 WHERE id='13'</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>select 1</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>SELECT balance AS nibble_balance FROM web_account WHERE id='13'</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>select 1</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>UPDATE web_account SET balance=balance-0.001177 WHERE id='13'</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>select 1</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>SELECT balance AS nibble_balance FROM web_account WHERE id='13'</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>select 1</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>UPDATE web_account SET balance=balance-0.001197 WHERE id='13'</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>select 1</div><div><span class="Apple-tab-span" style="white-space: pre; ">                </span>68080 Query<span class="Apple-tab-span" style="white-space: pre; ">        </span>SELECT balance AS nibble_balance FROM web_account WHERE id='13'</div></div><div><br></div><div><br></div><div>...and here's the FS log: <a href="http://pastebin.freeswitch.org/16175">http://pastebin.freeswitch.org/16175</a> </div><div><br></div><div>The xml_cdr is saved after the second update, so the nibble_total_billed is different than the real total value debited from the account balance.</div><div><br></div><div>Is this normal? </div><div>Shouldn't nibblebill just do one update after the hangup?</div><div><br></div></body></html>