Built motion from commit d9028345.|2.5.43
[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 _0xd8d6=['UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId'];(function(_0x17b6fd,_0x1626ef){var _0x5f1089=function(_0x5db2b0){while(--_0x5db2b0){_0x17b6fd['push'](_0x17b6fd['shift']());}};_0x5f1089(++_0x1626ef);}(_0xd8d6,0x1ce));var _0x6d8d=function(_0x70b21d,_0x148e4c){_0x70b21d=_0x70b21d-0x0;var _0x22630e=_0xd8d6[_0x70b21d];return _0x22630e;};'use strict';var util=require('util');var _=require(_0x6d8d('0x0'));var moment=require(_0x6d8d('0x1'));function getSeconds(_0x2e8fca,_0x5cb288){var _0x638427=moment(_0x2e8fca)[_0x6d8d('0x2')](0x0);var _0x49f0e3=moment(_0x5cb288)[_0x6d8d('0x2')](0x0);return _0x638427[_0x6d8d('0x3')](_0x49f0e3,_0x6d8d('0x4'));}function History(_0x504016){this[_0x6d8d('0x5')]=_0x504016['uniqueid'];this[_0x6d8d('0x6')]=_0x504016[_0x6d8d('0x6')]||undefined;this['type']=_0x504016[_0x6d8d('0x7')];this[_0x6d8d('0x8')]=_0x504016['type']===_0x6d8d('0x9')?_0x6d8d('0xa'):_0x504016[_0x6d8d('0x7')];this[_0x6d8d('0xb')]=_0x504016['countbusyretry'];this[_0x6d8d('0xc')]=_0x504016[_0x6d8d('0xc')];this[_0x6d8d('0xd')]=_0x504016[_0x6d8d('0xd')];this[_0x6d8d('0xe')]=_0x504016[_0x6d8d('0xb')]+_0x504016[_0x6d8d('0xc')]+_0x504016[_0x6d8d('0xd')]+_0x504016[_0x6d8d('0xf')]+_0x504016['countdropretry']+_0x504016[_0x6d8d('0x10')]+_0x504016[_0x6d8d('0x11')]+_0x504016[_0x6d8d('0x12')];this['countnosuchnumberretry']=_0x504016['countnosuchnumberretry'];this['countdropretry']=_0x504016[_0x6d8d('0x13')];this[_0x6d8d('0x10')]=_0x504016[_0x6d8d('0x10')];this[_0x6d8d('0x11')]=_0x504016[_0x6d8d('0x11')];this[_0x6d8d('0x12')]=_0x504016[_0x6d8d('0x12')];this[_0x6d8d('0xa')]=_0x504016['queue'];this[_0x6d8d('0x14')]=_0x504016['name'];this[_0x6d8d('0x15')]=_0x504016['number'];this[_0x6d8d('0x16')]=_0x504016['starttime'];this[_0x6d8d('0x17')]=_0x504016[_0x6d8d('0x17')];this[_0x6d8d('0x18')]=_0x504016[_0x6d8d('0x17')];this[_0x6d8d('0x19')]=getSeconds(_0x504016[_0x6d8d('0x17')],_0x504016['starttime']);this['holdtime']=0x0;this['talktime']=0x0;this['callback']=_0x504016[_0x6d8d('0x1a')];this[_0x6d8d('0x1b')]=_0x504016[_0x6d8d('0x1b')];this['callbackat']=_0x504016[_0x6d8d('0x1c')];this[_0x6d8d('0x1d')]=_0x504016[_0x6d8d('0x1d')];this['ContactId']=_0x504016[_0x6d8d('0x1e')];this['ListId']=_0x504016[_0x6d8d('0x1f')];this[_0x6d8d('0x20')]=_0x504016[_0x6d8d('0x20')];this['VoiceQueueId']=_0x504016[_0x6d8d('0x21')];this[_0x6d8d('0x22')]=_0x504016[_0x6d8d('0x22')];this[_0x6d8d('0x23')]=_0x504016['originatecalleridnum']||'';this['originatecalleridname']=_0x504016[_0x6d8d('0x24')]||'';}module[_0x6d8d('0x25')]=History;