1 ***************************************
2 Auerswald Callnotifier for COMpact 3000
3 ***************************************
5 Connects to the debug port of your Auerswald Compact 3000 telephony switchboard
6 and listens for incoming calls.
7 It will notify you whenever a call comes in.
9 It also listens for outgoing calls if you want that, and you can log
10 incoming and/or outgoing calls into a file or a database.
12 Callnotifier is able to resolve the names of calls via LDAP and the
13 caller location city names via OpenGeoDb.
22 1. Clone the git repository
23 2. Install dependencies
25 4. Run ``./callnotifier.php``
30 - PEAR's Console_CommandLine package
31 - PEAR's Net_LDAP2 package for LDAP name resolution
32 - curl for the dreambox notifier
38 1. Copy ``scripts/systemd/auerswald-callnotifier.service`` to ``/etc/systemd/system/``
39 2. Adjust user and group name and callnotifier path
40 3. Enable the service::
42 $ systemctl daemon-reload
43 $ systemctl enable auerswald-callnotifier
44 $ systemctl start auerswald-callnotifier
45 $ systemctl status auerswald-callnotifier
54 Enable the debug port by activating
58 - Server configuration
60 - D channel output via IP D channel output via IP on/off
68 - D-Kanal über IP ausgeben D-Kanal über IP ausgeben ein-/ausschalten
73 Copy ``data/callnotifier.config.php.dist`` to ``data/callnotifier.config.php``
74 (same name, just no ``.dist``), open it in a text editor and adjust it to
77 It contains examples for every plugin.
78 Adjust them as you need and remove the ones you do not need.
84 Logging plugins allow you to specify when calls shall be logged:
86 - ``startingCall`` - when the call is coming in, and the telephone rings
87 - ``finishedCall`` - when the call has ended
89 Furthermore you may decide which calls to log:
91 - ``i`` - Log incoming calls only
92 - ``o`` - Log outgoing calls only
93 - ``io`` - Log both incoming and outgoing calls
99 There are two types of plugins: Detailler and Logger.
100 Detaillers load additional details to a call - e.g. a name - and loggers
101 can do anything, e.g. write a log file or send a XMPP message.
105 Plugins that fetch additional details to calls are named "detailler".
107 CallMonitor_Detailler_LDAP
108 --------------------------
109 The plugin determines the name for a telephone number by looking up a
112 It retrieves the name of the caller for incoming calls, and the name
113 of the telephonee for outgoing calls.
115 It searches the following LDAP attributes:
121 - ``telephoneNumber``
123 Example configuration::
125 $callMonitor->addDetailler(
126 new CallMonitor_Detailler_LDAP(
128 'host' => 'ldap.home.cweiske.de',
129 'basedn' => 'ou=adressbuch,dc=cweiske,dc=de',
130 'binddn' => 'cn=readonly,ou=users,dc=cweiske,dc=de',
131 'bindpw' => 'readonly'
137 CallMonitor_Detailler_OpenGeoDb
138 -------------------------------
139 The plugin determines the location (city) for a telephone number by
140 checking the area code (prefix number) against a OpenGeoDB SQL database.
142 If several locations share the same area code, the one with the most inhabitants
145 If you use this plugin, you need to run ``docs/opengeodb-create-my_orte.sql``
146 on the OpenGeoDB database to create an indexed table with all relevant
147 information needed by the plugin.
149 Example configuration::
151 $callMonitor->addDetailler(
152 new CallMonitor_Detailler_OpenGeoDb(
153 'mysql:host=dojo;dbname=opengeodb',
162 Logger handle react on events like incoming or outgoing calls,
163 if they start or finish, or on any data received from the ISDN bus.
168 Log calls in a SQL database
170 Send messages on incoming calls to the DreamBox satellite
173 Log to the command line. Helpful for debugging.
175 Log finished calls into a text file
177 Log finished calls into a text file, newest on top
179 Use the unix ``notify-send`` command on starting and finished calls
181 Send an XMPP headline message for incoming calls to one or multiple
188 Ctrl+C does not send the disconnect command.
189 This is a problem with PHP since pcntl_signal handling and blocking sockets
190 do not work together. The signal will not be handled.
196 Auerswald callnotifier is licensed under the terms of the GPLv3 or later.
202 Original git website: https://git.cweiske.de/auerswald-callnotifier.git
204 Mirror: https://github.com/cweiske/auerswald-callnotifier