« Previous - Version 16/56 (diff) - Next » - Current version
Adrian Georgescu, 12/16/2008 12:03 pm


Image(CallControl.png, align=right)

Call Control is an application that can be used together with OpenSIPS
callcontrol module and CDRTool rating engine to limit the duration of SIP
sessions based on a prepaid balance. It does this by sending BYE messages to both SIP end-points, if the session
exceeds its maximum session limit or if Call Control receives a command to
forcefully close the call from outside. It will however not send these fake
BYE messages if the call is normally terminated by either party involved in
the conversation, before the call maximum allowed time is exceeded.

The software is able to handle parallel sessions for a single user balance.


The software is available as a tar archive at:

[http://download.ag-projects.com/CallControl/ http://download.ag-projects.com/CallControl/]

For people running Debian testing or unstable there is an official public repository provided by AG Projects. To use it, add these lines in /etc/apt/sources.list

  1. AG Projects software
    deb http://ag-projects.com/debian unstable main
    deb-src http://ag-projects.com/debian unstable main

Install the AG Projects debian software signing key:

wget http://download.ag-projects.com/agp-debian-gpg.key
apt-key add agp-debian-gpg.key

After that, run:

apt-get update
apt-get install callcontrol


This software is licensed according to the GNU General Public License version 2.


You need to setup the following components:

  • OpenSIPS callcontrol module, version >=1.5
  • Call Control application (this project)
  • CDRTool rating engine, version >=6.7.0

=== OpenSIPS configuration === {{{
loadmodule "call_control.so"
modparam("call_control", "disable", 0)

route {
... # you need to call this function at the first INVITE # everything else is automatic
if ((method=="INVITE" && !has_totag())) {


=== Call Control configuration ===

For all configuration options and their description see [source:config.ini.sample config.ini.sample]

; detect sessions that have media timeout without BYE

; connection to cdrtool rating engine for MaxSessionTime() and DebitBalance()
address = cdrtool.hostname:9024

; connection to Radius database if timeout_detection=radius
; user = radius
; password = password
; host = db
; database = radius
; table = radacct%Y%m

; connection to OpenSIPS call_control module
; socket_path = /var/run/opensips/socket
; max_connections = 10

=== CDRTool configuration ===

Please see the documentation of CDRTool project to setup the rating engine.

=== Prepaid engine API ===


CallControl.png (46.8 kB) Adrian Georgescu, 01/09/2009 11:40 am