What Is Calling Card
International telephone calls are those made between different countries . These telephone calls are processed by international gateway exchanges (switches) . Charges for these calls were high initially but declined greatly during the 20th century due to advances in technology and liberalization . Originally they were placed via long-distance operators . The calls were transmitted by cable, communications satellite, radio, and more recently, fiber optics and Voice over Internet Protocol (VoIP) . International Direct Dialling was introduced in the 1970s, so calls can be dialed by country code without an operator .
Calling Card Setup Process
- Make install
- Copy prepaid.conf to your /etc/asterisk dir and modify to suit your needs
- Populate the database with cards, providers, tariffs, tariffrates etc.. to make it work.
- Record your own sound files (prepaid-card-expired,prepaid-zero-balance,prepaid-you-have,prepaid-and,prepaid-cents,prepaid-dollar,prepaid-dollars,prepaid-card-in-use,prepaid-no-aaa,prepaid-final)
- Configure an extension with the CallingCard app and you're in business!
Asterisk Calling Card Setup
This is open source - you've got the source code of app_prepaid. You've got the database schema, you've got the stored procedures used to do the authentications and number lookup. You need to study this stuff and reach enlightenment. Anyway, here are a few rather random hints and suggestions:
- You need to build the database and load in the functions etc.
prepaid-make.sh isn't right. Following the pattern in prepaid-make.sh, feed psql with prepaid-init.sql, prepaid-tables.sql and prepaid-functions-asterisk.sql
- Load in the example data by psql ... prepaid-data-country.sql, then prepaid-data-countryprefix.sql
- You need to make sure that you can access the database using the username/password that's configured in your prepaid.conf
- You need to add data to some other tables:
- at least a "blank" record to internationalprefix:
- insert into internationalprefix (prefix) values ('');
- You will also need to populate countrysubcode, provider, providerdestination, perhaps some of the other tables. Look at the prepaid-functions-asterisk.sql functions to see how they use the tables. From that you can understand what needs to go into the tables.
- You need to add some cards into the database
- It might help to go to your /etc/asterisk/logger.conf and add debug to the console=> line. Run asterisk with -vvvvv -ggggg.