How to import rates

Discussion in 'General' started by fozzygomad, Aug 21, 2008.

  1. fozzygomad

    Aug 21, 2008
    Likes Received:
    Hi all hope this info helps. I have successfully managed to import 3000 + rates into my Elastix box. Here is how I did it.
    IMPORTANT - MAKE SURE TO MAKE A BACKUP COPY OF THE "rate.db" FILE IN "var/www/db/rate.db" This way you will have a blank database file just incase you import a whole bunch of rubish in your database. Just replace the file with the blank file if that happens.

    1. The rates must be in the following format within a text file (.txt)
    prefix;name;rate;rate offset;trunk

    a. Prefix format: It is pretty simple but here is the general rule. Use numbers from 1 to whatever. If using a zero (0) then it has to have another digit.
    E.g. 01, 012, 021 etc. Just using 0 will give an error.
    b. Name format: I think anything can be used here but I found it was having a problem with spaces so I used a program like Dreamweaver to find and replace the spaces with spaces. Makes no sense at all but it worked.
    c. Rate format: rates are on decimal format like 0.00 or sometimes even 0.000
    d. Rate Offset format: I found that using 0.000 format to be safe. It has a problem with 0, 0.0, 0.00 so do yourself a favour and put in an extra zero.
    e. Trunk format: The trunks are important because it calculates your rates based on trunks and if the spelling or format is wrong it won

Share This Page