Billing outboundcallrates: Difference between revisions

From MiRTA PBX documentation
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 19: Line 19:


The most important thing to understand is '''What number to use as prefix?'''. There is no general answer, it depends by you, your providers and your country habits. My suggestion is to use the international prefix + the country prefix, so for EU countries, use something like 0044 (for billing UK). For US, the suggested prefix for billing UK will be 01144. The billing is applied to the number being computed by the routing profile, with the Add digits/Remove digits. If you provider dialing prefix doesn't match, you can always use the Add digits/Remove digits in the Provider definition.
The most important thing to understand is '''What number to use as prefix?'''. There is no general answer, it depends by you, your providers and your country habits. My suggestion is to use the international prefix + the country prefix, so for EU countries, use something like 0044 (for billing UK). For US, the suggested prefix for billing UK will be 01144. The billing is applied to the number being computed by the routing profile, with the Add digits/Remove digits. If you provider dialing prefix doesn't match, you can always use the Add digits/Remove digits in the Provider definition.
== Custom rate script ==
Instead of providing a table with the rates, you can use a shell or AGI script to compute the billing for the call. When using a shell script you can provide on the command line all the values needed for the computation, like
/usr/local/bin/mybillingscript.php ${CDR(accountcode)} ${CDR(billsec)} ${CDR(lastdst)}
The script needs to return the billing for the call. When using an AGI script, you can retrieve all the needed variables from inside the AGI script. The billing for the call needs to be returned in the ${CALLPRICE} variable.

Latest revision as of 17:39, 1 August 2017

You can create as many as you like call rates to be assigned to single or multiple tenants and even to single extensions.

Outboundcallrates.png

A call rate lists all destinations to be dialed and assign some prices:

Outboundcallrate.png

You have available the following fields:

  • Country - A descriptive field for the rate
  • Network - Another descriptive field for the rate
  • Prefix - This is the prefix to match the call rate by the billing engine. The longest matching prefix is used. So for example, you can have 0044 for dialing to UK and 00447 for UK mobile phones.
  • Setup - The amount to be charged for each call setup
  • Cost/Minute - The billing for each minute of call
  • Minimum cost - The call total cannot be smaller than this cost
  • Rounding cost digits - How many digits to round the call cost
  • Routing time - This is the minimum billable time unit. For example, if you set this to 6 seconds, then a phone call lasting 10 seconds, will be billed as 12 seconds. A call lasting 36 seconds will be billed for 36 seconds, but a call lasting 37 seconds will be billed for 42.

The most important thing to understand is What number to use as prefix?. There is no general answer, it depends by you, your providers and your country habits. My suggestion is to use the international prefix + the country prefix, so for EU countries, use something like 0044 (for billing UK). For US, the suggested prefix for billing UK will be 01144. The billing is applied to the number being computed by the routing profile, with the Add digits/Remove digits. If you provider dialing prefix doesn't match, you can always use the Add digits/Remove digits in the Provider definition.

Custom rate script

Instead of providing a table with the rates, you can use a shell or AGI script to compute the billing for the call. When using a shell script you can provide on the command line all the values needed for the computation, like

/usr/local/bin/mybillingscript.php ${CDR(accountcode)} ${CDR(billsec)} ${CDR(lastdst)}

The script needs to return the billing for the call. When using an AGI script, you can retrieve all the needed variables from inside the AGI script. The billing for the call needs to be returned in the ${CALLPRICE} variable.