1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<?php
/**
* Callnotifier configuration file
* Copy that file to callnotifier.config.php and adjust it to your needs
*/
namespace callnotifier;
//IP of Auerswald COMpact 3000
$config->host = '192.168.1.2';
//Load caller names from LDAP
$callMonitor->addDetailler(
new CallMonitor_Detailler_LDAP(
array(
'host' => '192.168.1.10',
'basedn' => 'ou=adressbuch,dc=example,dc=org',
'binddn' => 'cn=readonly,ou=users,dc=example,dc=org',
'bindpw' => 'readonly'
)
)
);
//Load caller locations (city) from OpenGeoDb
$callMonitor->addDetailler(
new CallMonitor_Detailler_OpenGeoDb(
'mysql:host=192.168.1.10;dbname=opengeodb',
'opengeodb-read',
'opengeodb'
)
);
//Show starting and finished calls on the shell
$log->addLogger(
new Logger_CallEcho(), array('startingCall', 'finishedCall')
);
//Log incoming finished calls to MSN 12345 to file "incoming.log"
$log->addLogger(
new Logger_CallFile('incoming.log', 'i', '12345'),
array('finishedCall')
);
//Log all finished calls to file "all.log"
$log->addLogger(
new Logger_CallFile('all.log'),
array('finishedCall')
);
//Log finished calls into a SQL database
$log->addLogger(
new Logger_CallDb(
'mysql:host=192.168.1.10;dbname=callnotifier',
'username',
'password'
),
array('finishedCall')
);
//Log starting calls to the dreambox satellite receiver
$log->addLogger(
new Logger_CallDreambox('192.168.1.12', 'i', array('12345', '12346')),
array('startingCall')
);
//Show desktop notifications for calls (via notify-send)
$log->addLogger(
new Logger_CallNotifySend('i', array('40862', '40835')),
array('startingCall', 'finishedCall')
);
?>
|