name facility information
[auerswald-callnotifier.git] / README.rst
1 ***************************************
2 Auerswald Callnotifier for COMpact 3000
3 ***************************************
4
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.
8
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.
11
12 Callnotifier is able to resolve the names of calls via LDAP and the
13 caller location city names via OpenGeoDb.
14
15 .. contents::
16
17 =============
18 Configuration
19 =============
20 Copy ``data/callnotifier.config.php.dist`` to ``data/callnotifier.config.php``
21 (same name, just no ``.dist``), open it in a text editor and adjust it to
22 your needs.
23
24 It contains examples for every plugin.
25 Adjust them as you need and remove the ones you do not need.
26
27
28
29 Call types
30 ==========
31 Logging plugins allow you to specify when calls shall be logged:
32
33 - ``startingCall`` - when the call is coming in, and the telephone rings
34 - ``finishedCall`` - when the call has ended
35
36 Furthermore you may decide which calls to log:
37
38 - ``i`` - Log incoming calls only
39 - ``o`` - Log outgoing calls only
40 - ``io`` - Log both incoming and outgoing calls
41
42
43 =======
44 Plugins
45 =======
46 There are two types of plugins: Detailler and Logger.
47 Detaillers load additional details to a call - e.g. a name - and loggers
48 can do anything, e.g. write a log file or send a XMPP message.
49
50 Detailler
51 =========
52 Plugins that fetch additional details to calls are named "detailler".
53
54 CallMonitor_Detailler_LDAP
55 --------------------------
56 The plugin determines the name for a telephone number by looking up a
57 LDAP directory.
58
59 It retrieves the name of the caller for incoming calls, and the name
60 of the telephonee for outgoing calls.
61
62 It searches the following LDAP attributes:
63
64 - ``companyPhone``
65 - ``homePhone``
66 - ``mobile``
67 - ``otherPhone``
68 - ``telephoneNumber``
69
70 Example configuration::
71
72     $callMonitor->addDetailler(
73         new CallMonitor_Detailler_LDAP(
74             array(
75                 'host' => 'ldap.home.cweiske.de',
76                 'basedn' => 'ou=adressbuch,dc=cweiske,dc=de',
77                 'binddn' => 'cn=readonly,ou=users,dc=cweiske,dc=de',
78                 'bindpw' => 'readonly'
79             )
80         )
81     );
82
83
84 CallMonitor_Detailler_OpenGeoDb
85 -------------------------------
86 The plugin determines the location (city) for a telephone number by
87 checking the area code (prefix number) against a OpenGeoDB SQL database.
88
89 If several locations share the same area code, the one with the most inhabitants
90 is used.
91
92 If you use this plugin, you need to run ``docs/opengeodb-create-my_orte.sql``
93 on the OpenGeoDB database to create an indexed table with all relevant
94 information needed by the plugin.
95
96 Example configuration::
97
98     $callMonitor->addDetailler(
99         new CallMonitor_Detailler_OpenGeoDb(
100             'mysql:host=dojo;dbname=opengeodb',
101             'opengeodb-read',
102             'opengeodb'
103         )
104     );
105
106
107 ====
108 TODO
109 ====
110 - multiple notification methods: XMPP, dreambox, notify-send
111
112
113 ============
114 Known issues
115 ============
116 Ctrl+C does not send the disconnect command.
117 This is a problem with PHP since pcntl_signal handling and blocking sockets
118 do not work together. The signal will not be handled.
119
120
121 ======
122 Source
123 ======
124 Original git website: http://git.cweiske.de/?p=auerswald-callnotifier.git
125
126 Mirror: https://github.com/cweiske/auerswald-callnotifier