Commit aaffcc33 authored by Johannes Barthel's avatar Johannes Barthel
Browse files

auto restart timer

parent 97430e04
Pipeline #5790 passed with stage
in 40 seconds
......@@ -7,7 +7,7 @@ import redis
import json
import logging
import subprocess
import sys, os
import threading, time, os, sys
logging.basicConfig(level=logging.DEBUG)
class ModeratedMic:
......@@ -81,6 +81,9 @@ class ModeratedMic:
print(e)
def run_as_zero_key_handler(self):
# auto timed suicide/reincarnate thread because probably freeswitch or greenswitch are broken
threading.Thread(target=lambda: time.sleep(30) or os.execv(sys.argv[0], sys.argv)).start()
# register handler
print(self.fs.send('EVENTS PLAIN DTMF').data)
self.fs.register_handle("DTMF", self._handle_dtmf_key)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment