Asterisk callingcard tips

app_prepaid setup


app_prepaid does work once you correctly setup the database etc.

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.

Steve


Go back to Asterisk callingcard

app_prepaid setup


app_prepaid does work once you correctly setup the database etc.

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.

Steve


Go back to Asterisk callingcard

Created by: JustRumours, Last modification: Fri 11 of Jun, 2004 (13:32 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+