aboutsummaryrefslogtreecommitdiff
path: root/main.py
blob: 5485c9ccb2fb8f25632e876a230181a93342dca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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)
        finally:
            phone.clear_event()