Built motion from commit (unavailable).|2.5.3
[motion2.git] / server / services / ami / dialer / history.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x96c8=['ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countagentrejectretry','countabandonedretry','countmachineretry','calleridname','name','number','starttime','responsetime','endtime','ringtime','holdtime','callback','callbackuniqueid','callbackat','recallme'];(function(_0x5ab5e3,_0x3862ba){var _0x4200e4=function(_0x41eb38){while(--_0x41eb38){_0x5ab5e3['push'](_0x5ab5e3['shift']());}};_0x4200e4(++_0x3862ba);}(_0x96c8,0xa3));var _0x896c=function(_0x2f3808,_0x584dc8){_0x2f3808=_0x2f3808-0x0;var _0x48c811=_0x96c8[_0x2f3808];return _0x48c811;};'use strict';var util=require('util');var _=require(_0x896c('0x0'));var moment=require(_0x896c('0x1'));function getSeconds(_0x53809d,_0x2d7278){var _0x317cea=moment(_0x53809d)['milliseconds'](0x0);var _0x5e3506=moment(_0x2d7278)[_0x896c('0x2')](0x0);return _0x317cea[_0x896c('0x3')](_0x5e3506,_0x896c('0x4'));}function History(_0x28ad5c){this['uniqueid']=_0x28ad5c[_0x896c('0x5')];this[_0x896c('0x6')]=_0x28ad5c[_0x896c('0x6')]||undefined;this[_0x896c('0x7')]=_0x28ad5c[_0x896c('0x7')];this[_0x896c('0x8')]=_0x28ad5c['type']===_0x896c('0x9')?_0x896c('0xa'):_0x28ad5c[_0x896c('0x7')];this[_0x896c('0xb')]=_0x28ad5c[_0x896c('0xb')];this[_0x896c('0xc')]=_0x28ad5c[_0x896c('0xc')];this['countnoanswerretry']=_0x28ad5c[_0x896c('0xd')];this[_0x896c('0xe')]=_0x28ad5c[_0x896c('0xb')]+_0x28ad5c[_0x896c('0xc')]+_0x28ad5c['countnoanswerretry']+_0x28ad5c[_0x896c('0xf')]+_0x28ad5c[_0x896c('0x10')]+_0x28ad5c['countabandonedretry']+_0x28ad5c['countmachineretry']+_0x28ad5c[_0x896c('0x11')];this[_0x896c('0xf')]=_0x28ad5c[_0x896c('0xf')];this['countdropretry']=_0x28ad5c['countdropretry'];this[_0x896c('0x12')]=_0x28ad5c[_0x896c('0x12')];this['countmachineretry']=_0x28ad5c[_0x896c('0x13')];this[_0x896c('0x11')]=_0x28ad5c['countagentrejectretry'];this[_0x896c('0xa')]=_0x28ad5c[_0x896c('0xa')];this[_0x896c('0x14')]=_0x28ad5c[_0x896c('0x15')];this['calleridnum']=_0x28ad5c[_0x896c('0x16')];this[_0x896c('0x17')]=_0x28ad5c[_0x896c('0x17')];this[_0x896c('0x18')]=_0x28ad5c['responsetime'];this[_0x896c('0x19')]=_0x28ad5c[_0x896c('0x18')];this[_0x896c('0x1a')]=getSeconds(_0x28ad5c[_0x896c('0x18')],_0x28ad5c[_0x896c('0x17')]);this[_0x896c('0x1b')]=0x0;this['talktime']=0x0;this['callback']=_0x28ad5c[_0x896c('0x1c')];this[_0x896c('0x1d')]=_0x28ad5c['callbackuniqueid'];this[_0x896c('0x1e')]=_0x28ad5c[_0x896c('0x1e')];this[_0x896c('0x1f')]=_0x28ad5c['recallme'];this[_0x896c('0x20')]=_0x28ad5c[_0x896c('0x20')];this['ListId']=_0x28ad5c[_0x896c('0x21')];this[_0x896c('0x22')]=_0x28ad5c['UserId'];this[_0x896c('0x23')]=_0x28ad5c[_0x896c('0x23')];this[_0x896c('0x24')]=_0x28ad5c[_0x896c('0x24')];this[_0x896c('0x25')]=_0x28ad5c[_0x896c('0x25')]||'';this[_0x896c('0x26')]=_0x28ad5c[_0x896c('0x26')]||'';}module['exports']=History;