From e3f4893b74b97e1de5e126761d9ec6a0f6585888 Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Mon, 12 Jul 2021 04:19:46 +0100 Subject: Add recording event placeholder --- main.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 674e644..db8b983 100755 --- a/main.py +++ b/main.py @@ -24,15 +24,18 @@ if __name__ == "__main__": hang_up_thread.start() while True: - # Wait for phone to be picked up - phone_held.wait() - # Dial a number try: - dialed = queue.get(block=True, timeout=0.1) - except: - continue - response = dial_manager.dial(dialed) - # If we matched a sequence, play out event - if response is not None: - response.speak() + # Wait for phone to be picked up + phone_held.wait() + # Dial a number + try: + dialed = queue.get(block=True, timeout=0.1) + except: + continue + response = dial_manager.dial(dialed) + # If we matched a sequence, play out event + if response is not None: + response.speak() + except Exception as e: + print(e) -- cgit v1.2.3