Commit f790a5fd authored by okhin's avatar okhin

Fixing the call to connect the websocket

parent d2093e2d
...@@ -170,7 +170,8 @@ async def listen(): ...@@ -170,7 +170,8 @@ async def listen():
''' '''
global running global running
global ws global ws
ws = await websockets.connect(config['webservice']['base_url'] + '?app={}&api_key{}:{}'.format( ws_logger.debug('Connecting to websocket: {}'.format(config['webservice']['base_url'] + '?app={}&api_key={}:{}'.format(config['asterisk']['app'], config['asterisk']['key'], config['asterisk']['password'])))
ws = await websockets.connect(config['webservice']['base_url'] + '?app={}&api_key={}:{}'.format(
config['asterisk']['app'], config['asterisk']['key'], config['asterisk']['password'])) config['asterisk']['app'], config['asterisk']['key'], config['asterisk']['password']))
ws_logger.debug('Websocket connected: {}'.format(type(ws))) ws_logger.debug('Websocket connected: {}'.format(type(ws)))
await hold_bridges() await hold_bridges()
...@@ -444,5 +445,5 @@ if __name__ == '__main__': ...@@ -444,5 +445,5 @@ if __name__ == '__main__':
phone_logger.info("Starting the piphone SIP backend") phone_logger.info("Starting the piphone SIP backend")
try: try:
start() start()
except (KeyboardException, SystemExit): except (KeyboardInterrupt, SystemExit):
stop() stop()
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