瀏覽代碼

callback template implementaion

Hal De 4 年之前
父節點
當前提交
306143b076
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app/app.py

+ 2 - 1
app/app.py

@@ -144,6 +144,7 @@ async def reloadCallback(mngr: Manager, msg: Message):
 async def extensionStatusCallback(mngr: Manager, msg: Message):
 async def extensionStatusCallback(mngr: Manager, msg: Message):
   user = msg.exten
   user = msg.exten
   state = msg.statustext.lower()
   state = msg.statustext.lower()
+  app.logger.warning('ExtensionStatus({}, {})'.format(user, state))
   if user in app.cache['ustates']:
   if user in app.cache['ustates']:
     prevState = getUserStateCombined(user)
     prevState = getUserStateCombined(user)
     app.cache['ustates'][user] = state
     app.cache['ustates'][user] = state
@@ -296,8 +297,8 @@ async def amiPJSIPShowAuths():
     abort(401)
     abort(401)
   return successReply(app.cache['devices'])
   return successReply(app.cache['devices'])
 
 
-@authRequired
 @app.route('/ami/aors')
 @app.route('/ami/aors')
+@authRequired
 async def amiPJSIPShowAors():
 async def amiPJSIPShowAors():
   if not request.admin:
   if not request.admin:
     abort(401)
     abort(401)