[SR-Users] Call limiting with Kamailio

Olli Attila attiolli at gmail.com
Thu Nov 25 09:57:23 CET 2021


What choices do I have to implement a feature to Kamailio which would
limit calls per customer?

The environment:
Two kamailio nodes sitting in different sites and they are not aware
of each others sessions/dialogs  and thus serving customer calls
independently. Configurations on the nodes are identical excluding ip
addresses. Customer call can be routed through either one of these Kam
nodes. The two nodes share a common external mysql database from which
all dialplan and htable entries are loaded (used in call routing for
Customers are identified based on IP address & tel numbering and as a
final result we are populating an variable which holds the customer id
$var(REALM_NAME) when the identification has been done. The call
limiting should be "tagged/profiled" somehow with this information if

Any suggestions which way to go with this?

Initial ideas if one of these are worth of setting a starting point:
-> Counting calls with htable and replicating with DMQ to other node
(can the data survive from a restart?)
-> Using the common mysql database to hold the counted calls from
where both kam nodes could load data? (database load increasing?)
-> Some new exciting module for this job?


More information about the sr-users mailing list