1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x50cf=['calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridname','util','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countagentrejectretry','countmachineretry'];(function(_0x2c627c,_0x7cb8d){var _0x4a1820=function(_0x5b3b71){while(--_0x5b3b71){_0x2c627c['push'](_0x2c627c['shift']());}};_0x4a1820(++_0x7cb8d);}(_0x50cf,0x1d9));var _0xf50c=function(_0xabb4a6,_0x463c5b){_0xabb4a6=_0xabb4a6-0x0;var _0x18f63a=_0x50cf[_0xabb4a6];return _0x18f63a;};'use strict';var util=require(_0xf50c('0x0'));var _=require('lodash');var moment=require('moment');function getSeconds(_0x12010e,_0x592aaa){var _0x140233=moment(_0x12010e)[_0xf50c('0x1')](0x0);var _0x43e07b=moment(_0x592aaa)[_0xf50c('0x1')](0x0);return _0x140233[_0xf50c('0x2')](_0x43e07b,_0xf50c('0x3'));}function Final(_0x172421){this[_0xf50c('0x4')]=_0x172421['uniqueid'];this[_0xf50c('0x5')]=_0x172421[_0xf50c('0x5')];this['type']=_0x172421[_0xf50c('0x6')];this[_0xf50c('0x7')]=_0x172421[_0xf50c('0x6')]==='outbound'?_0xf50c('0x8'):_0x172421['type'];this['countbusyretry']=_0x172421[_0xf50c('0x9')];this[_0xf50c('0xa')]=_0x172421[_0xf50c('0xa')];this['countnoanswerretry']=_0x172421[_0xf50c('0xb')];this[_0xf50c('0xc')]=_0x172421[_0xf50c('0x9')]+_0x172421[_0xf50c('0xa')]+_0x172421['countnoanswerretry']+_0x172421[_0xf50c('0xd')]+_0x172421['countdropretry']+_0x172421[_0xf50c('0xe')]+_0x172421['countmachineretry']+_0x172421[_0xf50c('0xf')];this['countnosuchnumberretry']=_0x172421[_0xf50c('0xd')];this['countdropretry']=_0x172421['countdropretry'];this['countabandonedretry']=_0x172421['countabandonedretry'];this[_0xf50c('0x10')]=_0x172421[_0xf50c('0x10')];this[_0xf50c('0xf')]=_0x172421[_0xf50c('0xf')];this[_0xf50c('0x8')]=_0x172421[_0xf50c('0x8')];this[_0xf50c('0x11')]=_0x172421['calleridname'];this[_0xf50c('0x12')]=_0x172421[_0xf50c('0x12')];this[_0xf50c('0x13')]=_0x172421['starttime'];this['responsetime']=_0x172421[_0xf50c('0x14')];this[_0xf50c('0x15')]=_0x172421[_0xf50c('0x14')];this[_0xf50c('0x16')]=_0x172421[_0xf50c('0x16')]||0x0;this[_0xf50c('0x17')]=_0x172421[_0xf50c('0x17')]||0x0;this[_0xf50c('0x18')]=_0x172421[_0xf50c('0x18')]||0x0;this[_0xf50c('0x19')]=_0x172421[_0xf50c('0x19')];this[_0xf50c('0x1a')]=_0x172421[_0xf50c('0x1a')];this[_0xf50c('0x1b')]=_0x172421[_0xf50c('0x1b')];this[_0xf50c('0x1c')]=_0x172421[_0xf50c('0x1c')];this[_0xf50c('0x1d')]=_0x172421[_0xf50c('0x1d')];this[_0xf50c('0x1e')]=_0x172421[_0xf50c('0x1e')];this['UserId']=_0x172421[_0xf50c('0x1f')];this[_0xf50c('0x20')]=_0x172421['VoiceQueueId'];this['CampaignId']=_0x172421[_0xf50c('0x21')];this['originatecalleridnum']=_0x172421['originatecalleridnum']||'';this[_0xf50c('0x22')]=_0x172421[_0xf50c('0x22')]||'';}module['exports']=Final;