diff --git a/sylk/applications/webrtcgateway/__init__.py b/sylk/applications/webrtcgateway/__init__.py index f9f5da0..5c9f0da 100644 --- a/sylk/applications/webrtcgateway/__init__.py +++ b/sylk/applications/webrtcgateway/__init__.py @@ -1,36 +1,39 @@ from sylk.applications import SylkApplication from .logger import log -from .storage import TokenStorage +from .storage import TokenStorage, MessageStorage from .web import WebHandler, AdminWebHandler class WebRTCGatewayApplication(SylkApplication): def __init__(self): self.web_handler = WebHandler() self.admin_web_handler = AdminWebHandler() def start(self): self.web_handler.start() self.admin_web_handler.start() # Load tokens from the storage token_storage = TokenStorage() token_storage.load() + # Setup message storage + message_storage = MessageStorage() + message_storage.load() def stop(self): self.web_handler.stop() self.admin_web_handler.stop() def incoming_session(self, session): log.debug('New incoming session {session.call_id} from sip:{uri.user}@{uri.host} rejected'.format(session=session, uri=session.remote_identity.uri)) session.reject(403) def incoming_subscription(self, request, data): request.answer(405) def incoming_referral(self, request, data): request.answer(405) def incoming_message(self, request, data): request.answer(405)