Svetlana hace 3 años
padre
commit
b0f965a3a0
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      app/app.py

+ 3 - 1
app/app.py

@@ -258,7 +258,9 @@ async def celCallback(mngr: Manager, msg: Message):
     if (msg.EventName == 'CHAN_START') and (lid != msg.UniqueID) and (not msg.Channel.startswith('Local/')):
         if (msg.CallerIDnum!=''): # or (firstMessage.Context == 'from-pstn') or (firstMessage.get('groupCall',False))):#all calls 
            device = msg.CallerIDnum
-           user = app.cache['usermap'][device]
+           user = device
+           if device in app.cache['usermap']:
+             user = app.cache['usermap'][device]
            did = firstMessage.Exten
            _cb = {'user': user,
              'device': device,