3.17.4 Rates
The information on the cost of one minute connection to the OFFNET numbers is presented in three places:
- In the Rates menu in the Account screen
- On the dialpad screen
- In the contact details screen
In the Account menu a user can choose a country from the list. The request is sent to EMCD\rates.ashx with the ISO code of the country as parameter. In response the EMCD sends the json object with list of rates associated with descriptions.
The rates are read by the EMCD from the tariff assigned to the client who sent the request. The rates are selected based on the country ISO code. Therefore it is important to assign an ISO code to each row in the tariff which we want to show in the rates menu. The ISO code is not mandatory and the rows which do not have this value set will not be shown.
Note: the ISO code is not the same as country code. The ISO code is not used by the charging function, it is used only for presentation purposes to group the entries from the tariff which we want to show when a user requests rates for a given country.
Usually the tariff consists of hundreds or even thousands of detailed breakouts. For reporting and billing related tasks we need all of those prefixes, even if their selling price is the same for multiple entries. On the other hand we do not want to confuse a user with dozens of entries per one country. What you can do to limit the number of the presented entries is to choose the desired entries and only for them set the ISO code of the country to which the prefixes belong.
If you do not see the rates in the softphone even though they are in the assigned tariff it is probably the lack of the ISO codes as it is the most frequent reason.
The rates are also shown in the dialpad. When typing the number the app sends request to the EMCD\rates.ashx with the phone number as parameter. The EMCD checks if there is a matching prefix in the rates table and returns it to the app. In this request the ISO code is not used.
Another place is the Contact details view. When opened the application sends request with phone number as parameter, same as in the dialpad.