[Asterisk-Users] FW: question about prepaid app_prepaid

steve at daviesfam.org steve at daviesfam.org
Thu Jun 10 11:57:06 MST 2004


> > I have compiled and installed app_prepaid module.
> > But have problem when
> > connect to postgres database.  I guess so because
> > after key in card number,
> > it always play prepaid-no-aaa voice file. 
> > 
> > Anyone succeeded in configuring the app_prepaid for
> > prepaid calling service
> > for asterisk?  Please help. 

Yes - 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 - 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




More information about the asterisk-users mailing list