-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.py
More file actions
24 lines (16 loc) · 792 Bytes
/
example.py
File metadata and controls
24 lines (16 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/python3
# This very basic example listens to the call monitor of the Fritz!Box.
# It does not need to utilize FritzConn(ection), just the ip address is enough.
# REQUIRED: To enable call monitor dial #96*5* and to disable dial #96*4.
# To see some action e.g. call from intern phone 1 to phone 2,
# or use your mobile phone to call the landline. This will print and log the calls.
from a1fbox.callmonitor import CallMonitor, CallMonitorLog
from config import FRITZ_IP_ADDRESS
if __name__ == "__main__":
print("To stop enter '!' (exclamation mark) followed by ENTER key..")
cm_log = CallMonitorLog(daily=True, anonymize=False)
cm = CallMonitor(host=FRITZ_IP_ADDRESS, logger=cm_log.log_line)
key = ""
while key != "!":
key = input()
cm.stop()