magnussolution / magnusbilling7

MagnusBilling is a fast, secure, efficient, high availability, VOIP Billing.
https://www.magnusbilling.org
GNU Lesser General Public License v3.0
182 stars 106 forks source link

Mass upload Prefixes/ProviderRates from CSV - ready CSV-2-SQL prefix/tariff converter (php) #608

Open Aminuxer opened 1 year ago

Aminuxer commented 1 year ago

Many ISP present prefixes/rates in CSV format like prefix;description;price

But current version of import/export rates subsystem rely to internal IDs of prefixes in magnus-DB and not comfortable for mass-management prefixes from many providers.

I make simple PHP-script which allow convert CSV-files from ISP to ready-to-upload SQL-dumps. It's first beta-version; Please test;

https://github.com/Aminuxer/Voipswitch-Additions/tree/master/MagnusBilling7

Main idea - select provider, csv-delimiter, upload ISP CSV to my php script and got ready to upload SQL-dumps.

Upload make in two pass - at first must be upload prefixes; At second step upload rates for prefixes for selected provider.

I release this script public; I hope this script will be useful for someone. If this feature will be added to main code - it will be nice.