aboutsummaryrefslogtreecommitdiff
path: root/main.py
blob: 7c41d7b4f6b60f0a29af7a178483d26cc360fe4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python3

from phone import Phone

if __name__ == "__main__":
    phone = Phone.get_instance()
    print("Ready")
    while True:
        try:
            # Wait for phone to be picked up
            phone.wait_until_answered()
            # Dial a number
            phone.process_dial()
        except Exception as e:
            print(e)
            raise e
        finally:
            phone.clear_event()