|
@@ -221,6 +221,14 @@ async def celCallback(mngr: Manager, msg: Message):
|
|
|
firstMessage = app.cache['cel_calls'][lid]
|
|
firstMessage = app.cache['cel_calls'][lid]
|
|
|
cid = firstMessage.CallerIDnum
|
|
cid = firstMessage.CallerIDnum
|
|
|
uid = firstMessage.LinkedID
|
|
uid = firstMessage.LinkedID
|
|
|
|
|
+ if ((msg.Application == 'Queue') and
|
|
|
|
|
+ (msg.EventName == 'APP_START') and
|
|
|
|
|
+ (firstMessage.Context == 'from-internal')):
|
|
|
|
|
+ app.cache['cel_calls'][lid]['groupCall'] = True
|
|
|
|
|
+ if ((msg.Application == 'Queue') and
|
|
|
|
|
+ (msg.EventName == 'APP_END') and
|
|
|
|
|
+ (firstMessage.Context == 'from-internal')):
|
|
|
|
|
+ app.cache['cel_calls'][lid].pop('groupCall', False)
|
|
|
if (cid is not None) and (len(cid) < 7): #for local calls only
|
|
if (cid is not None) and (len(cid) < 7): #for local calls only
|
|
|
if msg.Context in ('from-queue'):
|
|
if msg.Context in ('from-queue'):
|
|
|
if ((msg.EventName == 'CHAN_START') or
|
|
if ((msg.EventName == 'CHAN_START') or
|
|
@@ -236,6 +244,7 @@ async def celCallback(mngr: Manager, msg: Message):
|
|
|
reply = await doCallback('groupRinging', _cb)
|
|
reply = await doCallback('groupRinging', _cb)
|
|
|
if ((msg.EventName == 'ANSWER') and
|
|
if ((msg.EventName == 'ANSWER') and
|
|
|
(msg.Application == 'AppDial') and
|
|
(msg.Application == 'AppDial') and
|
|
|
|
|
+ ('groupCall' in firstMessage) and
|
|
|
(lid in app.cache['cel_calls'])):
|
|
(lid in app.cache['cel_calls'])):
|
|
|
called = msg.Exten
|
|
called = msg.Exten
|
|
|
app.cache['cel_calls'][lid]['answered'] = True
|
|
app.cache['cel_calls'][lid]['answered'] = True
|
|
@@ -245,7 +254,7 @@ async def celCallback(mngr: Manager, msg: Message):
|
|
|
'callId': uid}
|
|
'callId': uid}
|
|
|
reply = await doCallback('groupAnswered', _cb)
|
|
reply = await doCallback('groupAnswered', _cb)
|
|
|
if ((msg.Application == 'Queue') and
|
|
if ((msg.Application == 'Queue') and
|
|
|
- (firstMessage.Context == 'from-pstn')):
|
|
|
|
|
|
|
+ (firstMessage.Context == 'from-pstn')):
|
|
|
queue_changed=False
|
|
queue_changed=False
|
|
|
if (msg.EventName == 'APP_START'):
|
|
if (msg.EventName == 'APP_START'):
|
|
|
app.cache['cel_queue_calls'][lid] = {'caller': msg.CallerIDnum, 'start': msg.EventTime}
|
|
app.cache['cel_queue_calls'][lid] = {'caller': msg.CallerIDnum, 'start': msg.EventTime}
|