In my project internet or voip is not involved. only PSTN.
Imagine I have a linux server with a gsm modem and a 24 port FXO card installed. All ports plugged with pstn lines
1. A user calls my server. (through gsm modem)
2. my server will detect users callerid and disconnect the call.
3. It will search this callerid in database (any free database preffered) for the authentication and check enough money available in his account. (there are approx 1000 users).
4. If callerid not present in db or no enough balance, server will ignore the request. Otherwise it will callback to the user through one of the fxo line and give him a dialtone
5. User will dial the destination number.
6. Server will dial destination number through the same fxo line as conferrence call.
7. User will hear the ringing tone at destination.
8. call will be disconnected when any of the party hangup.
9. A cdr line added to cdr file (txt) which specify time, date, callernumber, callee number and duration.
Billing part is very important. call must be disconnected even callers fund finished in middle of the call.
Call requests will be qued if all fxo ports are busy.
fund will be added to each users manually.