Built motion from commit 753c950e.|2.5.42
[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 _0xe3bb=['exports','util','lodash','milliseconds','diff','uniqueid','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','calleridname','name','starttime','responsetime','endtime','ringtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname'];(function(_0x58e302,_0x1bb64a){var _0x17306b=function(_0x1ccc63){while(--_0x1ccc63){_0x58e302['push'](_0x58e302['shift']());}};_0x17306b(++_0x1bb64a);}(_0xe3bb,0x1bd));var _0xbe3b=function(_0xf70b9b,_0x5622da){_0xf70b9b=_0xf70b9b-0x0;var _0x2270f7=_0xe3bb[_0xf70b9b];return _0x2270f7;};'use strict';var util=require(_0xbe3b('0x0'));var _=require(_0xbe3b('0x1'));var moment=require('moment');function getSeconds(_0x1b7b38,_0x3dbf57){var _0x3b6308=moment(_0x1b7b38)[_0xbe3b('0x2')](0x0);var _0x26cd2c=moment(_0x3dbf57)['milliseconds'](0x0);return _0x3b6308[_0xbe3b('0x3')](_0x26cd2c,'seconds');}function History(_0x2b8766){this[_0xbe3b('0x4')]=_0x2b8766[_0xbe3b('0x4')];this[_0xbe3b('0x5')]=_0x2b8766[_0xbe3b('0x5')]||undefined;this['type']=_0x2b8766[_0xbe3b('0x6')];this['campaigntype']=_0x2b8766['type']===_0xbe3b('0x7')?_0xbe3b('0x8'):_0x2b8766['type'];this['countbusyretry']=_0x2b8766[_0xbe3b('0x9')];this[_0xbe3b('0xa')]=_0x2b8766[_0xbe3b('0xa')];this[_0xbe3b('0xb')]=_0x2b8766[_0xbe3b('0xb')];this[_0xbe3b('0xc')]=_0x2b8766[_0xbe3b('0x9')]+_0x2b8766[_0xbe3b('0xa')]+_0x2b8766[_0xbe3b('0xb')]+_0x2b8766['countnosuchnumberretry']+_0x2b8766[_0xbe3b('0xd')]+_0x2b8766[_0xbe3b('0xe')]+_0x2b8766[_0xbe3b('0xf')]+_0x2b8766[_0xbe3b('0x10')];this[_0xbe3b('0x11')]=_0x2b8766[_0xbe3b('0x11')];this[_0xbe3b('0xd')]=_0x2b8766[_0xbe3b('0xd')];this[_0xbe3b('0xe')]=_0x2b8766['countabandonedretry'];this['countmachineretry']=_0x2b8766[_0xbe3b('0xf')];this['countagentrejectretry']=_0x2b8766[_0xbe3b('0x10')];this[_0xbe3b('0x8')]=_0x2b8766[_0xbe3b('0x8')];this[_0xbe3b('0x12')]=_0x2b8766[_0xbe3b('0x13')];this['calleridnum']=_0x2b8766['number'];this[_0xbe3b('0x14')]=_0x2b8766['starttime'];this[_0xbe3b('0x15')]=_0x2b8766[_0xbe3b('0x15')];this[_0xbe3b('0x16')]=_0x2b8766[_0xbe3b('0x15')];this[_0xbe3b('0x17')]=getSeconds(_0x2b8766[_0xbe3b('0x15')],_0x2b8766[_0xbe3b('0x14')]);this['holdtime']=0x0;this[_0xbe3b('0x18')]=0x0;this[_0xbe3b('0x19')]=_0x2b8766[_0xbe3b('0x19')];this[_0xbe3b('0x1a')]=_0x2b8766[_0xbe3b('0x1a')];this['callbackat']=_0x2b8766[_0xbe3b('0x1b')];this[_0xbe3b('0x1c')]=_0x2b8766['recallme'];this['ContactId']=_0x2b8766[_0xbe3b('0x1d')];this[_0xbe3b('0x1e')]=_0x2b8766[_0xbe3b('0x1e')];this[_0xbe3b('0x1f')]=_0x2b8766[_0xbe3b('0x1f')];this[_0xbe3b('0x20')]=_0x2b8766['VoiceQueueId'];this[_0xbe3b('0x21')]=_0x2b8766[_0xbe3b('0x21')];this[_0xbe3b('0x22')]=_0x2b8766['originatecalleridnum']||'';this['originatecalleridname']=_0x2b8766[_0xbe3b('0x23')]||'';}module[_0xbe3b('0x24')]=History;