|
|
@@ -201,9 +201,9 @@ async def newchannelCallback(mngr: Manager, msg: Message):
|
|
|
cid = msg.calleridnum
|
|
|
uid = msg.uniqueid
|
|
|
if device is not None:
|
|
|
- app.logger.warning('gonna make callback')
|
|
|
row = await db.fetch_one(query='SELECT url FROM callback_urls WHERE device = :device',
|
|
|
- values={'device': app.cache['devicemap'][user]})
|
|
|
+ values={'device': device})
|
|
|
+ app.logger.warning('{}-{}-{}'.format((row is not None), ('url' in row), (row['url'].startswith('http'))))
|
|
|
if (row is not None) and ('url' in row) and (row['url'].startswith('http')):
|
|
|
reply = await app.config['HTTP_CLIENT'].post(row['url'],
|
|
|
json={'user': user,
|
|
|
@@ -212,6 +212,7 @@ async def newchannelCallback(mngr: Manager, msg: Message):
|
|
|
'callerId': cid,
|
|
|
'did': did,
|
|
|
'callId': uid})
|
|
|
+ app.logger.warning('callback done')
|
|
|
|
|
|
async def getCDR(start=None,
|
|
|
end=None,
|