<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><pre>I am using FS with nibblebill.</pre><pre>I see that SQL queries are duplicated. I copied the debug log:</pre><pre><br></pre><pre>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:40 sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;"> Standard INIT</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:48 (sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;">) State Change CS_INIT -> CS_ROUTING</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:516 (sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;">) State INIT going to sleep</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:473 (sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;">) Running State Change CS_ROUTING</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] sofia.c:6715 Channel sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;"> entering state [calling][0]</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:532 (sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;">) State ROUTING</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_sofia.c:141 sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;"> SOFIA ROUTING</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_ivr_originate.c:67 (sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;">) State Change CS_ROUTING -> CS_CONSUME_MEDIA</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:506 Attempting to bill at $0.09139 per minute to account 16
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:518 Not billing 16 - call is not in answered state
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:422 Doing lookup query
[SELECT customer_balance AS nibble_balance FROM company WHERE id='16']
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:430 Retrieved current balance for account 16 (balance = 0.000000)
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:523 Comparing 0.000000 to hangup balance of -50.000000, taking into account minimum charge of 0.000000
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:422 Doing lookup query
[SELECT customer_balance AS nibble_balance FROM company WHERE id='16']
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:430 Retrieved current balance for account 16 (balance = 0.000000)
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:532 (sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;">) State ROUTING going to sleep</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:473 (sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;">) Running State Change CS_CONSUME_MEDIA</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:551 (sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;">) State CONSUME_MEDIA</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:506 Attempting to bill at $0.09139 per minute to account 16
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:518 Not billing 16 - call is not in answered state
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:422 Doing lookup query
[SELECT customer_balance AS nibble_balance FROM company WHERE id='16']
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:430 Retrieved current balance for account 16 (balance = 0.000000)
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:523 Comparing 0.000000 to hangup balance of -50.000000, taking into account minimum charge of 0.000000
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:422 Doing lookup query
[SELECT customer_balance AS nibble_balance FROM company WHERE id='16']
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_nibblebill.c:430 Retrieved current balance for account 16 (balance = 0.000000)
^[[m^[[35m2015-09-25 13:19:39.124073 [WARNING] switch_core_session.c:1579 sofia/external/<span style="font-family: Calibri, sans-serif; font-size: 12pt;">*****</span><span style="font-family: Calibri, sans-serif; font-size: 12pt;"> using scheduler due to bypass media or media is not established.</span><br>^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_scheduler.c:249 Added task 249745 switch_core_session_sched_heartbeat (4190b143-adef-4b34-aeed-1fbf592af187) to run at 144318117
9
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:551 (sofia/external/*****) State CONSUME_MEDIA going to sleep
^[[m^[[31m2015-09-25 13:19:39.124073 [ALERT] switch_core_state_machine.c:590 sofia/external/***** session thread sleep state: CS_CONSUME_MEDIA!
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_scheduler.c:144 Deleting task 249744 switch_core_session_sched_heartbeat (d9372f20-2d25-47c5-affa-238322f57100)
</pre><div><br></div><pre>In the same second, 4 requests!
As I see it after a "CS_ROUTING" or "CS_CONSUME_MEDIA". But many queries...
Any ideas?</pre>                                            </div></body>
</html>