I’m developing a pay-per-minute call service with database integration via AGI/PHP scripting. I’ve got the integration part down pretty well, but I’m confused as to how to go about connecting clients with providers in a way that doesn’t expose either party’s personal information (e.g. CID info). Also, I must be able to track the time that the two parties are connected (for accurate billing).
Basically, here’s a rundown of the call flow:
- A client requests to talk to a provider on the app
- The app generates a 6-digit access code to be used when they call the 800 number
- The client calls the hotline and enters the access code
- The server connects to database via AGI and retrieves the provider’s mobile number associated with the access code
- The server calls the provider and announces that “user so-and-so is on the line.” User so-and-so only hears music on hold at this point
- The provider presses a key (e.g. pound) to accept the call or another to decline
- The server announces something like “Your call is being connected, billing will begin now” to both parties
- The server connects both parties and gets out of the way, yet begins timing the call until the channel is dropped
- When the call has ended, the timer value is recorded to the database via AGI
Any ideas? I have scoured the internet for hours and have not been able to find any examples even remotely close to what I want to do.
I would appreciate any help anyone can offer, or if anyone has any examples and has done something similar to this in the past.