NOTE: This post refers to Windows install, the same applies to Asterisk/Linux install - adjust your file paths.
Required:
- TNG version 1.1.1.12.
- Your subscription must be up to date. The creation date of your custom ratebook cannot be a date after the TNG subscription expiry date, else it will give an subscription error for your ratebook.
- Custom rates as per service provider per call prefix.
NOTE: Cost must be excluding VAT.
In this example we will use the following rates for per second billing:- Local calls 0.29c per minute(excluding VAT)
Long distance 0.42c per minute(excluding VAT)
Fixed to all mobile networks 0.84c per minute(excluding VAT)- Local calls R 0.004833 per second
Long distance R 0.007000 per second
Fixed to all mobile networks R 0.014000 per second
NOTE: If the amount included VAT, you need to first calculate the amount without VAT and then convert to per second. To calculate amount without VAT, if for example you VAT factor is 14%: multiply the per minute rate by 100/114. - Switchboard numbers and local area prefixes per switchboard number.
In this example we will use switchboard number 0215924033
Steps to follow:
- Configure your 'Area Information' under 'Communication Configuration' secution as follows:
In this example '0215924033' is the switchboard number and country is South-Africa(27):
Local Number : 0215924033
Local Code : 021
Country Code : 27
International Access Code : 00
GMT Time Offset : 2 - You subscription must be up to date, else you cannot create a new custom ratebook. Custom ratebook creation date must be within the expiry date.
- Log out of TNG and stop the TNG service.
How do I stop/start the TNG service in Windows? - Go to the folder 'C:\Program Files\Datatex\tng\rates'.
- Make a copy of the 'all_simple_custom.dll' and rename it to your custom ratebook name, for example 'za_custom_test.dll'.
NOTE: Make sure you have the lastest version of all_simple_custom - refer to forum post:
TNG - Simple Custom Rate - Create a second file and name it, for this example 'za_custom_test.ini'. This is a plain text file.
- Paste the following into the 'za_custom_test.ini' file:
- Code: Select all
;code=S,Cost PerSec,MinCost,RateType,Desc
RATE=za_telkom.dll
271=S,0.007000,0,N, TELKOM
2721592=S,0.004833,0,L, TELKOM
272=S,0.007000,0,N, TELKOM
273=S,0.007000,0,N, TELKOM
274=S,0.007000,0,N, TELKOM
275=S,0.007000,0,N, TELKOM
276=S,0.007000,0,N, TELKOM
27710=S,0.014000,0.0,M,MTN,
27711=S,0.014000,0.0,M,Vodacom,
27712=S,0.014000,0.0,M,Vodacom,
27713=S,0.014000,0.0,M,Vodacom,
27714=S,0.014000,0.0,M,Vodacom,
27715=S,0.014000,0.0,M,Vodacom,
27716=S,0.014000,0.0,M,Vodacom,
27717=S,0.014000,0.0,M,MTN,
27718=S,0.014000,0.0,M,MTN,
27719=S,0.014000,0.0,M,MTN,
2772=S,0.014000,0,M, VODACOM,
2773=S,0.014000,0,M, MTN,
27741=S,0.014000,0.0,M,Virgin Mobile,
2774=S,0.014000,0,M, CELLC,
27761=S,0.014000,0,M, VODACOM,
27762=S,0.014000,0,M, VODACOM,
27763=S,0.014000,0,M, VODACOM,
27764=S,0.014000,0,M, VODACOM,
27765=S,0.014000,0,M, VODACOM,
27766=S,0.014000,0,M, VODACOM,
27767=S,0.014000,0,M, MTN,
27768=S,0.014000,0,M, MTN,
27769=S,0.014000,0,M, MTN,
2776=S,0.014000,0,M, VODACOM,
2778=S,0.014000,0.0,M,MTN,
2779=S,0.014000,0.0,M,Vodacom,
27810=S,0.014000,0.0,M,MTN,
27811=S,0.014000,0.0,M,8TA,
27812=S,0.014000,0.0,M,8TA,
27813=S,0.014000,0.0,M,8TA,
27814=S,0.014000,0.0,M,8TA,
27815=S,0.014000,0.0,M,8TA,
27816:=S,0.014000,0.0,M,WBS Mobile,
27817=S,0.014000,0.0,M,8TA,
27818=S,0.014000,0.0,M,Vodacom,
2781=S,0.014000,0,M, 8TA,
2782=S,0.014000,0,M, VODACOM,
2783=S,0.014000,0,M, MTN,
2784=S,0.014000,0,M, CELLC,
2786=S,0,007000,0,N, TELKOM
2787=S,0.007000,0,N, CentraCom
279=S,0.007000,0,N, TELKOM
;27215924033=S,0,0,O,Interbranch
These entries contains all the known local, national and cellular prefixes. It can be used as a template. I have attached the file also. You need to download and rename the 'txt' file extension to 'ini':
This example has per second billing
The entry 'RATE=za_telkom.dll' means that it is the default ratebook. Call for all prefixes not specified in the file will default to the 'za_telkom' rate. You can change this if you have a different service provider.
NOTE: The costing in this example is without VAT. TNG will add the VAT as per VAT rate configured.
If you have any additional prefixes, you will need to add them. For more details on the simple custom all ratebook feature refer to forum post:
TNG - Simple Custom Rate
Save the changes to the file - if any made. - Start the TNG service.
- Log into TNG.
It might take longer than usual to startup, because it is creating the new exchange file. - Make a test Call Cost Calculation to check your rates.
- If happy with the rates, can now set your default ratebook as 'za_custom_test' or just add the required trunks that must be used with this custom ratebook. Go to 'Trunk Configuration' and click on the 'Ratebook' drop-down, you will see the 'za_custom_test' ratebook option.
You can try a 'Data Synchronization' for the required period to cost at custom rates.
Refer to forum post: How do I synchronize TNG data?
Custom rates at branches:
If you now do custom rates at a different branch, repeat the process and
configure the area information in TNG as per branch requirements
In the custom rates ini, the switchboard number is a local call and therefore configure this as 'L' and not national. Also change remove the 021592 entry and add the switchboard prefix for example 011787 for branche in Pretoria.
For switchboard 021 5924033:
- Code: Select all
271=S,0.007000,0,N, TELKOM
2721592=S,0.004833,0,L, TELKOM
272=S,0.007000,0,N, TELKOM
For switchboard 0117872000:
- Code: Select all
271=S,0.007000,0,N, TELKOM
2711787=S,0.004833,0,L, TELKOM
272=S, 0.007000,0,N, TELKOM