hi ,<div>i have successfully installed the nibble bill and trying to test billing depending on the destination , but even though the Cash goes to negetive the call never hangs up ! </div><div><br></div><div>here are my conf :</div>
<div><br></div><div>nibblebill.conf</div><div>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div><div><div><br></div></div></div><div><br></div><div><div><configuration name="nibblebill.conf" description="Nibble Billing"></div><div> <settings></div><div> <!-- See <a href="http://wiki.freeswitch.org/wiki/Mod_nibblebill">http://wiki.freeswitch.org/wiki/Mod_nibblebill</a> for help with these options --></div>
<div><br></div><div> <!-- Information for connecting to your database --></div><div> <param name="db_username" value="root"/></div><div> <param name="db_password" value="fusionpbx"/></div>
<div> <param name="db_dsn" value="freeswitch_odbc"/></div><div><br></div><div> <!-- The database table where your CASH column is located --></div><div> <param name="db_table" value="v_extensions"/></div>
<div><br></div><div> <!-- The column name where we store the value of the account --></div><div> <param name="db_column_cash" value="Cash"/></div><div><br></div><div> <!-- The column name for the unique ID identifying the account --></div>
<div> <param name="db_column_account" value="extension"/></div><div><br></div><div> <!-- Custom SQL for loading current balance - overrides column names</div><div> channel vars are interpreted.</div>
<div> field nibble_balance is used for balance info</div><div><br></div><div> <param name="custom_sql_lookup" value="SELECT cash AS nibble_balance FROM accounts WHERE account_code='${nibble_account}'"/></div>
<div> --></div><div><br></div><div> <!-- Custom SQL for loading current balance - overrides column names</div><div> channel vars are interpreted.</div><div> nibble_increment is the amount to update</div>
<div><br></div><div> <param name="custom_sql_save" value="UPDATE accounts SET cash=cash-${nibble_increment} WHERE account_code='${nibble_account}'"/></div><div> --></div><div><br>
</div><div><br></div><div> <!-- Default heartbeat interval. Set to 'off' for no heartbeat (i.e. bill only at end of call) --></div><div> <param name="global_heartbeat" value="30"/></div>
<div><br></div><div> <!-- By default, warn a caller when their balance is at $5.00. You can set this to a negative number. --></div><div> <param name="lowbal_amt" value="5"/></div><div>
<param name="lowbal_action" value="play ding"/></div><div><br></div><div> <!-- By default, terminate a caller when their balance hits $0.00. You can set this to a negative number. --></div>
<div> <font class="Apple-style-span" color="#FF0000"> <param name="nobal_amt" value="0.00"/></font></div><div><font class="Apple-style-span" color="#FF0000"> <param name="nobal_action" value="hangup"/></font></div>
<div><br></div><div> <!-- If a call goes beyond a certain dollar amount, flag or terminate it --></div><div> <param name="percall_max_amt" value="100"/></div><div> <param name="percall_action" value="hangup"/></div>
<div><br></div><div> </settings></div><div></configuration></div><div>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div><br></div><div>an extension called 5400</div><div><br></div><div><div><include></div><div> <user id="5400"></div><div> <params></div><div> <param name="password" value="5400"/></div>
<div> <param name="vm-password" value="8975"/></div><div> </params></div><div> <variables></div><div> <variable name="toll_allow" value="domestic,international,local"/></div>
<div> <variable name="accountcode" value="5400"/></div><div> <variable name="user_context" value="default"/></div><div> <font class="Apple-style-span" color="#FF0000"><variable name="nibble_account" value="5400"/></font></div>
<div> </variables></div><div> </user></div><div></include></div><div><br></div><div>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
</div></div><div><br></div><div><br></div><div>finally in the dial plan :</div><div><br></div><div><div><extension name="ToIcelandPBX.58d2" ></div><div> <condition field="destination_number" expression="^(58.*)"></div>
<div> <font class="Apple-style-span" color="#FF0000"><action application="set" data="$${nibble_account}"/></font></div><div> </condition></div><div> <font class="Apple-style-span" color="#FF0000"> <condition field="destination_number" expression="^(5807)$"></font></div>
<div><font class="Apple-style-span" color="#FF0000"> <action application="set" data="nibble_rate=30"/></font></div><div><font class="Apple-style-span" color="#FF0000"> <action application="bridge" data="sofia/gateway/ToIcelandPBX/$1"/></font></div>
<div><font class="Apple-style-span" color="#FF0000"> </condition></font></div><div><br></div><div> <font class="Apple-style-span" color="#FF6600"><condition field="destination_number" expression="^(5812)$"></font></div>
<div><font class="Apple-style-span" color="#FF6600"> <action application="set" data="nibble_rate=15"/></font></div><div><font class="Apple-style-span" color="#FF6600"> <action application="bridge" data="sofia/gateway/ToIcelandPBX/$1"/></font></div>
<div><font class="Apple-style-span" color="#FF6600"> </condition></font></div><div><font class="Apple-style-span" color="#FF6600"><br></font></div><div></extension></div><div><br></div><div><br></div><div>right now the Cash balance for the extension is -192.00 and the extension can still make calls jsut fine. </div>
<div>Am I missing something here ?</div><div><br></div>-- <br>Regards<br><br>Shrouk Khan (Khan)<br><br><br>
</div>