|
|
@@ -230,7 +230,6 @@ async def celCallback(mngr: Manager, msg: Message):
|
|
|
app.cache['cel_calls'][lid]['all_channels'][msg.Exten] = msg.Channel
|
|
|
else: #end dial
|
|
|
app.cache['cel_calls'][uid]['current_channels'].pop(msg.CallerIDname, False)
|
|
|
- app.logger.warning(f'''NEW CALLING LIST: {','.join(app.cache['cel_calls'][uid]['current_channels'].keys())}''')
|
|
|
_cb = {'users': list(app.cache['cel_calls'][uid]['current_channels'].keys()),
|
|
|
'state': 'group_ringing',
|
|
|
'callId': uid}
|
|
|
@@ -240,14 +239,13 @@ async def celCallback(mngr: Manager, msg: Message):
|
|
|
(lid in app.cache['cel_calls'])):
|
|
|
called = msg.Exten
|
|
|
app.cache['cel_calls'][lid]['answered'] = True
|
|
|
- app.logger.warning(f'''answered {called}''')
|
|
|
_cb = {'user': called,
|
|
|
'users': list(app.cache['cel_calls'][uid]['all_channels'].keys()),
|
|
|
'state': 'group_answer',
|
|
|
'callId': uid}
|
|
|
reply = await doCallback('groupAnswered', _cb)
|
|
|
if ((msg.Application == 'Queue') and
|
|
|
- (msg.Exten in ('1','2200'))): #shouldn't be hardcoded! I Agree!
|
|
|
+ (firstMessage.Exten == 'from-pstn')):
|
|
|
queue_changed=False
|
|
|
if (msg.EventName == 'APP_START'):
|
|
|
app.cache['cel_queue_calls'][lid] = {'caller': msg.CallerIDnum, 'start': msg.EventTime}
|
|
|
@@ -255,7 +253,6 @@ async def celCallback(mngr: Manager, msg: Message):
|
|
|
if (msg.EventName in ('APP_END', 'BRIDGE_ENTER')):
|
|
|
call = app.cache['cel_queue_calls'].pop(lid,False)
|
|
|
queue_changed = (call != None)
|
|
|
- app.logger.warning(f'''EVENT:{msg} changed:{queue_changed}''')
|
|
|
if queue_changed :
|
|
|
_cb = {'caller': msg.CallerIDnum,
|
|
|
'all': app.cache['cel_queue_calls'],
|
|
|
@@ -267,11 +264,8 @@ async def celCallback(mngr: Manager, msg: Message):
|
|
|
if (msg.EventName == 'LINKEDID_END'):
|
|
|
app.cache['cel_calls'].pop(lid, False)
|
|
|
app.cache['cel_queue_calls'].pop(lid, False)
|
|
|
- app.logger.warning(f'''Left Calls {','.join(app.cache['cel_calls'].keys())}''')
|
|
|
if (msg.EventName == 'USER_DEFINED') and (msg.UserDefType == 'SETVARIABLE'):
|
|
|
- app.logger.warning(f'''SETVARIABLE({str(msg)})''')
|
|
|
varname, value = msg.AppData.split(',')[1].split('=')[0:2]
|
|
|
- app.logger.warning(f'''SETVARIABLE({varname} is {value})''')
|
|
|
app.cache['cel_calls'][lid][varname]=value
|
|
|
if (lid in app.cache['calls']):
|
|
|
app.cache['calls'][lid][varname]=value
|