Built motion from commit 616d3211.|2.6.4
[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 _0x3af6=['callbackat','recallme','ContactId','ListId','UserId','CampaignId','originatecalleridnum','exports','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','name','calleridnum','starttime','responsetime','endtime','holdtime','talktime','callback','callbackuniqueid'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x3af6,0xfd));var _0x63af=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0x3af6[_0x2b4411];return _0x8e41ef;};'use strict';var util=require('util');var _=require(_0x63af('0x0'));var moment=require(_0x63af('0x1'));function getSeconds(_0x40c855,_0x4829b3){var _0x48eaec=moment(_0x40c855)[_0x63af('0x2')](0x0);var _0xa00a3d=moment(_0x4829b3)[_0x63af('0x2')](0x0);return _0x48eaec[_0x63af('0x3')](_0xa00a3d,_0x63af('0x4'));}function History(_0x5320a1){this[_0x63af('0x5')]=_0x5320a1[_0x63af('0x5')];this[_0x63af('0x6')]=_0x5320a1[_0x63af('0x6')]||undefined;this['type']=_0x5320a1[_0x63af('0x7')];this['campaigntype']=_0x5320a1['type']===_0x63af('0x8')?_0x63af('0x9'):_0x5320a1[_0x63af('0x7')];this[_0x63af('0xa')]=_0x5320a1['countbusyretry'];this[_0x63af('0xb')]=_0x5320a1[_0x63af('0xb')];this[_0x63af('0xc')]=_0x5320a1[_0x63af('0xc')];this['countglobal']=_0x5320a1[_0x63af('0xa')]+_0x5320a1[_0x63af('0xb')]+_0x5320a1[_0x63af('0xc')]+_0x5320a1[_0x63af('0xd')]+_0x5320a1[_0x63af('0xe')]+_0x5320a1[_0x63af('0xf')]+_0x5320a1[_0x63af('0x10')]+_0x5320a1[_0x63af('0x11')];this[_0x63af('0xd')]=_0x5320a1[_0x63af('0xd')];this[_0x63af('0xe')]=_0x5320a1[_0x63af('0xe')];this[_0x63af('0xf')]=_0x5320a1['countabandonedretry'];this[_0x63af('0x10')]=_0x5320a1['countmachineretry'];this[_0x63af('0x11')]=_0x5320a1[_0x63af('0x11')];this[_0x63af('0x9')]=_0x5320a1[_0x63af('0x9')];this['calleridname']=_0x5320a1[_0x63af('0x12')];this[_0x63af('0x13')]=_0x5320a1['number'];this['starttime']=_0x5320a1[_0x63af('0x14')];this[_0x63af('0x15')]=_0x5320a1[_0x63af('0x15')];this[_0x63af('0x16')]=_0x5320a1[_0x63af('0x15')];this['ringtime']=getSeconds(_0x5320a1[_0x63af('0x15')],_0x5320a1[_0x63af('0x14')]);this[_0x63af('0x17')]=0x0;this[_0x63af('0x18')]=0x0;this[_0x63af('0x19')]=_0x5320a1['callback'];this[_0x63af('0x1a')]=_0x5320a1[_0x63af('0x1a')];this[_0x63af('0x1b')]=_0x5320a1[_0x63af('0x1b')];this['recallme']=_0x5320a1[_0x63af('0x1c')];this[_0x63af('0x1d')]=_0x5320a1[_0x63af('0x1d')];this[_0x63af('0x1e')]=_0x5320a1['ListId'];this[_0x63af('0x1f')]=_0x5320a1[_0x63af('0x1f')];this['VoiceQueueId']=_0x5320a1['VoiceQueueId'];this[_0x63af('0x20')]=_0x5320a1['CampaignId'];this['originatecalleridnum']=_0x5320a1[_0x63af('0x21')]||'';this['originatecalleridname']=_0x5320a1['originatecalleridname']||'';}module[_0x63af('0x22')]=History;