Ejemplo n.º 1
0
    def __init__(self, sipphone):
        self.__phone = sipphone
        self.__ep = None

        conf = DoorPi().config
        self.__call_timeout = conf.get_int(SIPPHONE_SECTION, "call_timeout",
                                           15)
        self.__max_call_time = conf.get_int(SIPPHONE_SECTION, "max_call_time",
                                            120)

        self.running = True
        self.error = None
        self.ready = threading.Semaphore(0)
        self.wake = threading.Condition()
        self.hangup = 0
Ejemplo n.º 2
0
 def recorder_config() -> dict:
     conf = DoorPi().config
     return {
         "path": conf.get_string_parsed(SIPPHONE_SECTION, "record_path",
                                        ""),
         "early": conf.get_bool(SIPPHONE_SECTION, "record_while_dialing",
                                True),
         "keep": conf.get_int(SIPPHONE_SECTION, "record_keep", 10),
     }