I’ve provided my users with a voicemail service - that’s all they can do through asterisk, call into voicemail, they can’t make any other calls.
Each user has their own voicemail extension, however, since I supply a shared toll-free number for them, I’d like to ensure that the total # of minutes for each mailbox doesn’t exceed “X”. That includes minutes spent recording and re-recording messages to the mailbox, and minutes spent calling into the mailbox and retrieving messages.
What’s the best way of metering the minutes used, and if possible tying it into a billing system so that people can up their package and purchasing more minutes if they need to?
Thanks in advance.
Your best bet here would probably be to wrap some AGI code around app_voincemail to get the desired effects.
instead of calling voicemailmain() to auth te users, send them to the AGI which auth’s them figures out time left, and then logs the time for that call
Contact me privately if you need some professional assistance with such a project
Another way that might work-
when they call in have them use Read() and VMAuthenticate() to select their mailbox and put in the password. After that, update their CDR accountcode with the resulting variables, and send the call into VoiceMailMain() without asking for a password again via the same method.
Then your billing software can pick through the CDR files and add up the total minutes per mailbox…
this solutions wont limit the call time it could be done but would require some serious dial plan work and a database thus my recommendation of using AGI.
the problem with batch processing the CDRs instead of rating them in near real time of hangup is you leave a race condition where someone could simply call back in before the next CDR processing run and use more minutes then they are supposed to use
From that point it would be trivial for anyone w/ LAMP/LAPP experience to add their own web front end.
i wouldnt cause it a race condition, but CDR processing won’t stop anybody from going over their limit. I’m thinking process the CDR once a day or whatever, so nobodys access will be cut off but they can be charged for overage.