The API would need the ability to handle pre-billing by intercepting the dialed number, then our software will check the user's account for enough minutes to continue, if so, continue the call, monitor the call length, warn user of pending call termination, terminate the call.
Next the API would need to answer the call, our software will then read the inbound called DID, check the account status, ring the dialed extension, monitor the call for length, warn if minutes are running out, terminate the call.
outbound calls
3xc -> user dials
3xc API- intercepts the call
3cx API - gets call id/extension
Custom Pgm -> looks up account status/# of minutes
3cx API - call continues or is terminated
3cx API - monitors call length
Custom PGM - minutes almost used
3cx API - send voice message notify caller that minutes are used up
Custom Pgm - minutes depleted
3cx API - terminate the call
3xc API - call hung up get the # of minutes of the call
inbound calls
3cx API - inbound call, answer call
3cx API - reads called DID #
Custom pgm - check DID against users, get free minutes
3cx API - monitors call length
Custom PGM - minutes almost used
3cx API - send voice message notify caller that minutes are used up
Custom Pgm - minutes depleted
3cx API - terminate the call
3xc API - call hung up get the # of minutes of the call