|
|
@@ -212,6 +212,7 @@ async def newchannelCallback(mngr: Manager, msg: Message):
|
|
|
|
|
|
@manager.register_event('CEL')
|
|
|
async def celCallback(mngr: Manager, msg: Message):
|
|
|
+ #app.logger.warning('CEL {}'.format(msg));
|
|
|
if (msg.EventName == 'CHAN_START') and (msg.LinkedID == msg.UniqueID): #save first msg
|
|
|
app.cache['cel_calls'][msg.LinkedID] = msg
|
|
|
app.cache['cel_calls'][msg.LinkedID]['channels'] = {}
|
|
|
@@ -287,11 +288,12 @@ async def celCallback(mngr: Manager, msg: Message):
|
|
|
app.cache['cel_calls'].pop(msg.LinkedID,False);
|
|
|
app.cache['cel_queue_calls'].pop(msg.LinkedID,False);
|
|
|
app.logger.warning('Left Calls {}'.format(','.join(app.cache['cel_calls'].keys())))
|
|
|
- if (msg.EventName == 'USER_DEFINED') and (msg.AppData == 'SETVARIABLE'):
|
|
|
+ if (msg.EventName == 'USER_DEFINED') and (msg.UserDefType == 'SETVARIABLE') :
|
|
|
app.logger.warning('SETVARIABLE({})'.format(msg))
|
|
|
- varname = msg.Extra.split('=')[0]
|
|
|
- value = msg.Extra.split('=')[1]
|
|
|
- app.logger.warning('SETVARIABLE({}={})'.format(varname,value))
|
|
|
+ extra = msg.AppData.split(',')[1];
|
|
|
+ varname = extra.split('=')[0]
|
|
|
+ value = extra.split('=')[1]
|
|
|
+ app.logger.warning('SETVARIABLE({} is {})'.format(varname,value))
|
|
|
app.cache['cel_calls'][msg.linkedid][varname]=value
|
|
|
|
|
|
async def getCDR(start=None,
|