[sr-dev] Call/Credit control module
Carlos Ruiz Díaz
carlos.ruizdiaz at gmail.com
Mon Jun 11 21:08:05 CEST 2012
Hello list.
I am developing a module that keeps track of all calls passing through the
server. The goal is to maintain a state in order to be able to hang up the
calls that run out of credit when the time comes. The module makes use of
the tm public interface and shared memory mechanism to maintain all the
relevant data in shared memory and precisely this was the motivation for
building this module from scratch instead of writing a client for the
dialog module with an external app doing the credit control logic and a
MySQL database in the backend.
Basically, this is how it works:
- In the config script it receives a unique identifier of the client along
with the credit available for it and the discount that should be made every
second.
- A loop iterates over the current calls and when the credit is exhausted,
a BYE message is sent to both legs.
- Everything is kept in shared memory, no need to having an external
database nor dialog module.
- It is transaction-oriented.
The project needs to implement some business-specific (private) logic and
before that to happen I would like to know if the raw version of the
module, with its features, could be useful to the community?, or I just
reinvented the wheel?
Regards.
Carlos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20120611/689c0165/attachment.htm>
More information about the sr-dev
mailing list