[Freeswitch-users] nibblebill sql requests

Sergey Okhapkin sos at sokhapkin.dyndns.org
Tue Feb 8 22:05:04 MSK 2011


There is one more extra update. See http://jira.freeswitch.org/browse/FS-2890 

Mod_nibblebill updates balance in channel hangup and reporting states, but 
should update in hangup state only.

On Tuesday 08 February 2011, David Ponzone wrote:
> AFAIR, they are not unnecessary.
> 
> David Ponzone  Direction Technique
> email: david.ponzone at ipeva.fr
> tel:      01 74 03 18 97
> gsm:   06 66 98 76 34
> 
> Service Client IPeva
> tel:      0811 46 26 26
> www.ipeva.fr  -   www.ipeva-studio.com
> 
> Ce message et toutes les pièces jointes sont confidentiels et établis à
> l'intention exclusive de ses destinataires. Toute utilisation ou diffusion
> non autorisée est interdite. Tout message électronique est susceptible
> d'altération. IPeva décline toute responsabilité au titre de ce message
> s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de
> ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.
> 
> Le 08/02/2011 à 17:11, Madovsky a écrit :
> > after hangup,
> > nibblebill makes unnecessary duplicated SQL requests :
> > 
> > 2011-02-08 11:06:36.894238 [DEBUG] mod_sofia.c:457 Channel
> > sofia/internal/9999999999999 at domain.com hanging up, cause:
> > NORMAL_CLEARING 2011-02-08 11:06:37.018489 [DEBUG] mod_nibblebill.c:433
> > Attempting to bill at $0.03864 per minute to account 9999999999999
> > 2011-02-08 11:06:37.018489 [INFO] mod_nibblebill.c:485 Beginning new
> > billing on 461772290 at 12.34.56.78 2011-02-08 11:06:37.018489 [DEBUG]
> > mod_nibblebill.c:491 1 seconds passed since last bill time of 2011-02-08
> > 11:06:35 2011-02-08 11:06:37.018489 [DEBUG] mod_nibblebill.c:498 Billing
> > $0.000874 to 9999999999999 (Call: 461772290 at 12.34.56.78 / 0.000000 so
> > far) 2011-02-08 11:06:37.018489 [DEBUG] mod_nibblebill.c:321 Doing
> > update query [UPDATE accounts SET cash=cash-0.000874 WHERE
> > id='9999999999999'] 2011-02-08 11:06:37.074740 [DEBUG]
> > mod_nibblebill.c:366 Doing lookup query [SELECT cash AS nibble_balance
> > FROM accounts WHERE id='9999999999999'] 2011-02-08 11:06:37.082844
> > [DEBUG] mod_nibblebill.c:376 Retrieved current balance for account
> > 9999999999999 (balance = 9.579666) 2011-02-08 11:06:37.082844 [DEBUG]
> > switch_core_state_machine.c:46 sofia/internal/9999999999999 at domain.com
> > Standard HANGUP, cause: NORMAL_CLEARING 2011-02-08 11:06:37.082844
> > [DEBUG] switch_core_state_machine.c:557
> > (sofia/internal/9999999999999 at domain.com) State HANGUP going to sleep
> > 2011-02-08 11:06:37.082844 [DEBUG] switch_core_state_machine.c:351
> > (sofia/internal/9999999999999 at domain.com) State Change CS_HANGUP ->
> > CS_REPORTING 2011-02-08 11:06:37.082844 [DEBUG]
> > switch_core_session.c:1116 Send signal
> > sofia/internal/9999999999999 at domain.com [BREAK] 2011-02-08
> > 11:06:37.082844 [DEBUG] switch_core_state_machine.c:320
> > (sofia/internal/9999999999999 at domain.com) Running State Change
> > CS_REPORTING 2011-02-08 11:06:37.082844 [DEBUG]
> > switch_core_state_machine.c:617
> > (sofia/internal/9999999999999 at domain.com) State REPORTING 2011-02-08
> > 11:06:37.082844 [DEBUG] mod_nibblebill.c:433 Attempting to bill at
> > $0.03864 per minute to account 9999999999999 2011-02-08 11:06:37.082844
> > [DEBUG] mod_nibblebill.c:491 0 seconds passed since last bill time of
> > 2011-02-08 11:06:37 2011-02-08 11:06:37.082844 [DEBUG]
> > mod_nibblebill.c:498 Billing $0.000041 to 9999999999999 (Call:
> > 461772290 at 12.34.56.78 / 0.000874 so far) 2011-02-08 11:06:37.082844
> > [DEBUG] mod_nibblebill.c:321 Doing update query [UPDATE accounts SET
> > cash=cash-0.000041 WHERE id='9999999999999'] 2011-02-08 11:06:37.133170
> > [DEBUG] mod_nibblebill.c:366 Doing lookup query [SELECT cash AS
> > nibble_balance FROM accounts WHERE id='9999999999999'] 2011-02-08
> > 11:06:37.201557 [DEBUG] mod_nibblebill.c:376 Retrieved current balance
> > for account 9999999999999 (balance = 9.579625)
> > 
> > How to avoid duplicate SQL requests with nibblebill ?
> > 
> > Thanks
> > 
> > _______________________________________________
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org




More information about the FreeSWITCH-users mailing list