[Freeswitch-users] Nibblebill multiple sql requests

Ximo Peral ximop_22 at hotmail.com
Fri Sep 25 15:32:37 MSD 2015


I am using FS with nibblebill.I see that SQL queries are duplicated. I copied the debug log:
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:40 sofia/external/***** Standard INIT
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:48 (sofia/external/*****) State Change CS_INIT -> CS_ROUTING
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:516 (sofia/external/*****) State INIT going to sleep
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:473 (sofia/external/*****) Running State Change CS_ROUTING
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] sofia.c:6715 Channel sofia/external/***** entering state [calling][0]
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:532 (sofia/external/*****) State ROUTING
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] mod_sofia.c:141 sofia/external/***** SOFIA ROUTING
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_ivr_originate.c:67 (sofia/external/*****) State Change CS_ROUTING -> CS_CONSUME_MEDIA
^[[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/*****) State ROUTING going to sleep
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:473 (sofia/external/*****) Running State Change CS_CONSUME_MEDIA
^[[m^[[33m2015-09-25 13:19:39.124073 [DEBUG] switch_core_state_machine.c:551 (sofia/external/*****) State CONSUME_MEDIA
^[[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/***** using scheduler due to bypass media or media is not established.
^[[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)

In the same second, 4 requests!

As I see it after a "CS_ROUTING" or "CS_CONSUME_MEDIA". But many queries...

Any ideas? 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150925/e2f4c918/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list