[OpenSIPS-Users] Limiting calls from users in prepaid scenerio
Aft nix
aftnix at gmail.com
Tue Jun 5 11:17:50 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
We are thinking about launching a different "usage policy". The usage
policy will be prepaid in some sense.
but instead of limiting "number of minutes" we are thinking about
limiting "number of calls".
That means if you pay this X amount of doller, you can make Y amount
of calls. calls can last whatever the
user wants given that its under 1 hr.
I've seen how to limit concurrent calls using SER, but the usage i
have described, is not seen by me.
So please help me out with this thing.
My initial understanding about how it can be done :
1) when a dialog is confirmed with ACK(we have both callid, from tag,
to tag), we can make an entry to the database
by increasing "number of calls" field by one.
2) A field in database will be used as flag for usage limit. when
"number of calls" exceeds the usage limit, it will flag it
as "finished usage limit".
3) when a INVITE arrives, a check will be made with $fU against DB.
With this framework in mind, I have read "db_mysql" module. And to my
surprise, no direct the database
functions are not exported to the cfg.
I don't know if any module in kamailio exports mysql_queury() to cfg,
which i need for my purpose.
And may be there is some built in module which provides a higher level
layer which will enable myself achieving
my goal.
If in the end i need "exported" mysql functions, then i can develop it myself.
So which way i should go?
Thanks in advance
- --
- -aft
-----BEGIN PGP SIGNATURE-----
Version: OpenPGP.js v0.1
Comment: http://openpgpjs.org
wsBcBAEBAgAQBQJPzc6dCRCJVJ6A/SK8awAARAkH/R5rqfiTPqBP+zZr8rgM
0JE42l9jxYq5OteD13U4CvcrUklXZlgDf2jwr1F7ndd1rlV3yKXAT2u61Bz5
LwNneRZydl3xnPmt2+TV6Qkcgy8RXgyRMntP9iLeQOXWJNW7D637h7tLL11d
O50s86ofgJT+dfTICbomNZjLZRr1DvYOdcByG3LHcYx033G6bIFlMqJ0ZO+G
cBdgtJcLrwo6iPn8Gv+5aJDy2kRUphrF7cVCzFzLPnNVZpvXNNcv7LB9bkUH
cClcLDVAbsdw0TPd9Z6DNJSxFlHy2uzwNWB9mhpVJD1toT8Geb4iCOi+ZG8P
WT5fgNwSoZlEm0BBBHwMUdk=
=fcdD
-----END PGP SIGNATURE-----
More information about the Users
mailing list