790e039a63fbc3157687219de218d2c5967bf3ad
[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 _0x7b83=['callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','exports','util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','countbusyretry','countcongestionretry','countnoanswerretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','queue','calleridname','name','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid'];(function(_0x96b9f1,_0x100578){var _0x1943fe=function(_0x463026){while(--_0x463026){_0x96b9f1['push'](_0x96b9f1['shift']());}};_0x1943fe(++_0x100578);}(_0x7b83,0xa1));var _0x37b8=function(_0x231654,_0x132b62){_0x231654=_0x231654-0x0;var _0x448af3=_0x7b83[_0x231654];return _0x448af3;};'use strict';var util=require(_0x37b8('0x0'));var _=require(_0x37b8('0x1'));var moment=require(_0x37b8('0x2'));function getSeconds(_0x56c392,_0x562827){var _0x788dfd=moment(_0x56c392)[_0x37b8('0x3')](0x0);var _0x45fd66=moment(_0x562827)['milliseconds'](0x0);return _0x788dfd[_0x37b8('0x4')](_0x45fd66,_0x37b8('0x5'));}function History(_0x6cc848){this[_0x37b8('0x6')]=_0x6cc848[_0x37b8('0x6')];this[_0x37b8('0x7')]=_0x6cc848['scheduledat']||undefined;this[_0x37b8('0x8')]=_0x6cc848[_0x37b8('0x8')];this['campaigntype']=_0x6cc848[_0x37b8('0x8')]==='outbound'?'queue':_0x6cc848['type'];this['countbusyretry']=_0x6cc848[_0x37b8('0x9')];this[_0x37b8('0xa')]=_0x6cc848[_0x37b8('0xa')];this[_0x37b8('0xb')]=_0x6cc848[_0x37b8('0xb')];this['countglobal']=_0x6cc848[_0x37b8('0x9')]+_0x6cc848['countcongestionretry']+_0x6cc848[_0x37b8('0xb')]+_0x6cc848['countnosuchnumberretry']+_0x6cc848[_0x37b8('0xc')]+_0x6cc848[_0x37b8('0xd')]+_0x6cc848[_0x37b8('0xe')]+_0x6cc848[_0x37b8('0xf')];this[_0x37b8('0x10')]=_0x6cc848['countnosuchnumberretry'];this['countdropretry']=_0x6cc848[_0x37b8('0xc')];this[_0x37b8('0xd')]=_0x6cc848[_0x37b8('0xd')];this['countmachineretry']=_0x6cc848['countmachineretry'];this[_0x37b8('0xf')]=_0x6cc848[_0x37b8('0xf')];this[_0x37b8('0x11')]=_0x6cc848[_0x37b8('0x11')];this[_0x37b8('0x12')]=_0x6cc848[_0x37b8('0x13')];this[_0x37b8('0x14')]=_0x6cc848['number'];this[_0x37b8('0x15')]=_0x6cc848['starttime'];this['responsetime']=_0x6cc848[_0x37b8('0x16')];this[_0x37b8('0x17')]=_0x6cc848[_0x37b8('0x16')];this[_0x37b8('0x18')]=getSeconds(_0x6cc848['responsetime'],_0x6cc848[_0x37b8('0x15')]);this[_0x37b8('0x19')]=0x0;this[_0x37b8('0x1a')]=0x0;this[_0x37b8('0x1b')]=_0x6cc848['callback'];this[_0x37b8('0x1c')]=_0x6cc848[_0x37b8('0x1c')];this[_0x37b8('0x1d')]=_0x6cc848[_0x37b8('0x1d')];this['recallme']=_0x6cc848[_0x37b8('0x1e')];this[_0x37b8('0x1f')]=_0x6cc848[_0x37b8('0x1f')];this[_0x37b8('0x20')]=_0x6cc848[_0x37b8('0x20')];this[_0x37b8('0x21')]=_0x6cc848[_0x37b8('0x21')];this['VoiceQueueId']=_0x6cc848[_0x37b8('0x22')];this[_0x37b8('0x23')]=_0x6cc848[_0x37b8('0x23')];this[_0x37b8('0x24')]=_0x6cc848[_0x37b8('0x24')]||'';this['originatecalleridname']=_0x6cc848['originatecalleridname']||'';}module[_0x37b8('0x25')]=History;