Telephony Billing

It is possible to apply rates to call and set a billing credit limit. The credit units are calculated in real time.

The dialplan rule can control the action to execute when billing credit limit is reached or no credit is available.

Rates

To add a new rate group, go to the menu Telephony → Rate, click add:

  • Name: rateInternational
  • Description: rate rules for international calls
  • click Add

Rate rule

To add a new rate rule go to the menu Telephony → Rate, select the rate and then click add under the rate rule list table.

For example, create a rule to match all calls that begin with 00 and increase every minute 1 credit unit, it calculates the credit unit per 1 second:

  • Name: all
  • Prefix: 00
  • Rate: 0.01667
  • Connect fee: 0
  • Minimum time: 1
  • Increment: 1
  • click Add

Billing

Add a new billing for the clientX with 50credits units that are reset every day. Go to the menu Telephony → Rate, under the tab menu Billing and click add:

  • Accountcode: clientX
  • Credit: 50; Reset <daily>
  • Used credit: 0
  • click Add

Dialplan rule

Create a rule to match all calls that begin with 00 (international prefix) and apply the credit limit to account ${accountcode} value.

Add a new dialplan rule under the menu Telephony → Diaplan, select the context and add a new extension rule:

  • Name: Bill international calls
  • Priority: first
  • Conditions: x - custom; x - Destination number: x-Expression: ^00\d+$
  • Action: x - custom: Rate; ${destination_number} <rateInternational>
    • x - Billing
    • accountcode: ${accountcode}
  • click Add

Dialplan rule hangup on no credit

Create a rule to match all calls that begin with 00 (international prefix) and apply the credit limit to account ${accountcode} value, if no credit hangup the call.

Add a new dialplan rule under the menu Telephony → Diaplan, select the context and add a new extension rule:

  • Name: Bill international calls
  • Priority: first
  • Conditions: x - custom; x - Destination number: x-Expression: ^00\d+$
  • Action: x - custom: Rate; ${destination_number} <rateInternational>
    • x - Billing
    • accountcode: ${accountcode}
    • x - No credit: x - hangup
  • click Add
/home/www/wiki/data/pages/configuration/telephony/billing.txt · Last modified: 2024/06/21 09:47 by asilva
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki