Jelajahi Sumber

wecallid for group callbacks

svetlana 3 tahun lalu
induk
melakukan
0a4ce73f29
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      app/app.py

+ 4 - 0
app/app.py

@@ -241,6 +241,8 @@ async def celCallback(mngr: Manager, msg: Message):
           _cb = {'users': list(app.cache['cel_calls'][uid]['current_channels'].keys()),
                  'state': 'group_ringing',
                  'callId': uid}
+          if ('WebCallId' in app.cache['calls'][msg.linkedid]):
+            _cb['WebCallId'] = app.cache['calls'][msg.linkedid]['WebCallId']
           reply = await doCallback('groupRinging', _cb)
       if ((msg.EventName == 'ANSWER') and
           (msg.Application == 'AppDial') and
@@ -252,6 +254,8 @@ async def celCallback(mngr: Manager, msg: Message):
                'users': list(app.cache['cel_calls'][uid]['all_channels'].keys()),
                'state': 'group_answer',
                'callId': uid}
+        if ('WebCallId' in app.cache['cel_calls'][msg.linkedid]):
+          _cb['WebCallId'] = app.cache['cel_calls'][msg.linkedid]['WebCallId']
         reply = await doCallback('groupAnswered', _cb)
     if ((msg.Application == 'Queue') and
         (firstMessage.Context == 'from-pstn')):