<div dir="ltr"><div>Hello, Everybody<br><br>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.<br><br>[time call ended] - [time call answered] x [rate per minute] = $total bill rate<br><br></div><div>Though this formula is used when global_heartbeat is off.<br></div><div>Here is my nibblebill.conf.xml<br><br><configuration name="nibblebill.conf" description="Nibble Billing"><br> <settings><br><br><br> <param name="odbc-dsn" value="odbc://freeswitch"/><br><param name="db_table" value="users"/><br><br> <!-- The column name where we store the value of the account --><br> <param name="db_column_cash" value="balance"/><br><br> <!-- The column name for the unique ID identifying the account --><br> <param name="db_column_account" value="accountcode"/><br><br> <!-- Custom SQL for loading current balance - overrides column names<br> channel vars are interpreted.<br> field nibble_balance is used for balance info<br><br> <param name="custom_sql_lookup" value="SELECT cash AS nibble_balance FROM accounts WHERE account_code='${nibble_<div dir="ltr">account}'"/><br> --><br><br> <!-- Custom SQL for loading current balance - overrides column names<br> channel vars are interpreted.<br> nibble_increment is the amount to update<br><br> <param name="custom_sql_save" value="UPDATE accounts SET cash=cash-${nibble_increment} WHERE account_code='${nibble_account}'"/><br> --><br> <!-- Default heartbeat interval. Set to 'off' for no heartbeat (i.e. bill only at end of call) --><br> <param name="global_heartbeat" value="1"/><br><br> <!-- By default, warn a caller when their balance is at $5.00. You can set this to a negative number. --><br> <param name="lowbal_amt" value="5"/><br> <param name="lowbal_action" value="play ding"/><br><br> <!-- By default, terminate a caller when their balance hits $0.00. You can set this to a negative number. --><br> <param name="nobal_amt" value="0"/><br> <param name="nobal_action" value="hangup"/><br><br> <!-- If a call goes beyond a certain dollar amount, flag or terminate it --><br> <param name="percall_max_amt" value="0"/><br> <param name="percall_action" value="hangup"/><br><br> </settings><br></configuration><br><br></div><div>When i apply this on Freeswitch cli for channel uuid i get this..<br><br></div><div dir="ltr"><br><br></div>freeswitch@internal> nibblebill 3f3f3b4a-fe4e-47d0-a43a-e1d8a54c6dfe check<br>-ERR no reply<br><br>2014-09-19 04:30:38.704124 [INFO] mod_nibblebill.c:793 Can't check - channel is not initialized for billing!<br>2014-09-19 04:30:38.704124 [INFO] mod_nibblebill.c:888 Current billing is at $-99999.000000<br><br><br></div><div>Can someone please tell where i am doing something wrong.:)<br><br></div></div>