[OpenSER-Users] concurrent call limit per user / customer

Patrick Miccio patrick.miccio at inode.at
Thu Jun 12 19:01:31 CEST 2008


Hi,

that sounds promising, I like the 2nd example, limiting calls to PSTN is the idea.

The only problem is that OpenSER does only know about username/uuid, you cannot control if a customer with 1 contract
uses 2 or more usernames. Then again we could limit calls based on the source IP, but customers can have more than 1
contract. . .


I thought about saving it in the usr_preferences somewhat like this:


+--------+------------+--------+-----------+------+-------+---------------------+
| uuid   | username   | domain | attribute | type | value | modified            |
+--------+------------+--------+-----------+------+-------+---------------------+
| 109357 | 0123456789 |        | 100       |    2 | 1234  | 2008-06-09 18:09:37 | 
| 109357 | 0123456789 |        | 101       |    3 | 10    | 2008-06-09 18:09:37 |
| 102826 | 0987654321 |        | 100       |    2 | 1234  | 2008-06-09 18:09:37 | 
| 102826 | 0987654321 |        | 101       |    3 | 10    | 2008-06-09 18:09:37 |


this way you could have different uuids, but a common value of for example here 1234, and use that to identify the
caller/contract.



cheers,

Patrick.



> Hi Patrick,
> 
> Take a look at the dialog module and dialog profiling support - I think 
> it will help you:
>     http://lists.openser.org/pipermail/users/2008-June/017710.html
> 
> There is even an example similar to what you want to do.
> 
> Regards,
> Bogdan
> 
> Patrick Miccio wrote:
> > Hi @ all,
> >
> > I was wondering if anyone of you guys already implemented a system where one could limit the maximum number of
> > concurrent calls? With ISDN-terminaladapters or analog-telefon-adapters it is no problem because the hardware
> > itself is the limiting device, but with the growing amount of IP PBXs the need becomes obvious.
> >
> > I am playing with the thought of writing something myself, but I am more a copy&paste programmer, so it will take
> > quite some time :D
> >
> > Maybe someone here likes the idea?
> >
> >
> >
> > Here are my thoughts of how a module could provide a simple functionality:
> >
> > INVITE:         check
> > 200 OK:         create
> > Re-INVITE:      update
> > BYE:            delete
> >
> > must provide:
> >
> > create_call()
> > update_call()
> > delete call()
> > check_limit()
> >
> > create must save uuid,from,to,callid,timestamp in DB, from/to just for human readability ;)
> >
> > update must update timestamp with uuid/callid match ( we enforce 300sec re-invite call refresh )
> >
> > delete must delete the DB entry with uuid/callid match
> >
> > check must count DB entries with uuid match and return amount of active calls.
> >
> >
> > cheers,
> >
> > Patrick.
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.openser.org
> > http://lists.openser.org/cgi-bin/mailman/listinfo/users
> >
> >   
> 




More information about the sr-users mailing list