def run(self): self.call_handler = CallHandler(self) self.__program_handler = ProgramHandler(self.db, self) self.__program_handler.run() while True: time.sleep(1) return
def __init__(self, station, db, logger): self.logger = logger self.db = db self.station = station self.id = station.id self.__program_handler = ProgramHandler(self) self.call_handler = CallHandler(self) self.__community_handler = CommunityIVRMenu(self) self.logger.info("Starting up station {0}".format(self.station.name)) return
class RadioStation(Station): def run(self): self.call_handler = CallHandler(self) self.__program_handler = ProgramHandler(self.db, self) self.__program_handler.run() while True: time.sleep(1) return def stop(self): self.call_handler.stop() self.__program_handler.stop() pass def __init__(self, station_id): self.id = station_id self.db = SQLAlchemy(telephony_server) self.station = self.db.session.query(Station).filter(Station.id == station_id).one() return
class RadioStation(Station): def run(self): self.call_handler = CallHandler(self) self.__program_handler = ProgramHandler(self.db, self) self.__program_handler.run() while True: time.sleep(1) return def stop(self): self.call_handler.stop() self.__program_handler.stop() pass def __init__(self, station_id, logger): self.id = station_id self.logger = logger self.db = SQLAlchemy(telephony_server) self.station = self.db.session.query(Station).filter(Station.id == station_id).one() self.logger.info("Starting up station {0}".format(self.station.name)) return
def __init__(self, station, db, logger): self.logger = logger self.db = db self.station = station self.id = station.id self.__program_handler = ProgramHandler(self) self.call_handler = CallHandler(self) community_menu_gw = self.__get_gateway_used() if community_menu_gw is not None: self.call_handler.register_community_ivr_number( str(community_menu_gw)[-9:]) #self.__community_handler = CommunityIVRMenu(self) self.logger.info("Starting up station {0}".format(self.station.name)) return