[Freeswitch-users] mod_nibblebill. Can't check - channel is not initialized for billing!

Aqs Younas aqsyounas at gmail.com
Fri Sep 19 19:53:11 MSD 2014


Hello, Everybody

I am using mod_nibblebill for billing of realtime calls.Its heartbeat fire
does not fire after 1 second as i have specified in my nibblebill.conf.xml
file. After call is completed nibblebill update the database balance column
according to given formula.

[time call ended] - [time call answered] x [rate per minute] = $total bill
rate

Though this formula is used when  global_heartbeat is off.
Here is my nibblebill.conf.xml

<configuration name="nibblebill.conf" description="Nibble Billing">
  <settings>


        <param name="odbc-dsn" value="odbc://freeswitch"/>
<param name="db_table" value="users"/>

    <!-- The column name where we store the value of the account -->
    <param name="db_column_cash" value="balance"/>

    <!-- The column name for the unique ID identifying the account -->
    <param name="db_column_account" value="accountcode"/>

    <!-- Custom SQL for loading current balance - overrides column names
         channel vars are interpreted.
         field nibble_balance is used for balance info

    <param name="custom_sql_lookup" value="SELECT cash AS nibble_balance
FROM accounts WHERE account_code='${nibble_
account}'"/>
    -->

    <!-- Custom SQL for loading current balance - overrides column names
         channel vars are interpreted.
         nibble_increment is the amount to update

    <param name="custom_sql_save" value="UPDATE accounts SET
cash=cash-${nibble_increment} WHERE account_code='${nibble_account}'"/>
    -->
<!-- Default heartbeat interval. Set to 'off' for no heartbeat (i.e. bill
only at end of call) -->
    <param name="global_heartbeat" value="1"/>

    <!-- By default, warn a caller when their balance is at $5.00. You can
set this to a negative number. -->
    <param name="lowbal_amt" value="5"/>
    <param name="lowbal_action" value="play ding"/>

    <!-- By default, terminate a caller when their balance hits $0.00. You
can set this to a negative number. -->
    <param name="nobal_amt" value="0"/>
    <param name="nobal_action" value="hangup"/>

    <!-- If a call goes beyond a certain dollar amount, flag or terminate
it -->
    <param name="percall_max_amt" value="0"/>
    <param name="percall_action" value="hangup"/>

  </settings>
</configuration>

When i apply this on Freeswitch cli for channel uuid i get this..



freeswitch at internal> nibblebill 3f3f3b4a-fe4e-47d0-a43a-e1d8a54c6dfe check
-ERR no reply

2014-09-19 04:30:38.704124 [INFO] mod_nibblebill.c:793 Can't check -
channel is not initialized for billing!
2014-09-19 04:30:38.704124 [INFO] mod_nibblebill.c:888 Current billing is
at $-99999.000000


Can someone please tell where i am doing something wrong.:)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140919/81fd2996/attachment-0001.html 


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