ff20c544074b248031765a9552b341b4582ca509
[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 _0x054c=['VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countmachineretry','countabandonedretry','countagentrejectretry','queue','calleridname','name','calleridnum','starttime','responsetime','endtime','ringtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId'];(function(_0x2edc11,_0x4f4d52){var _0x34ebf9=function(_0x1de868){while(--_0x1de868){_0x2edc11['push'](_0x2edc11['shift']());}};_0x34ebf9(++_0x4f4d52);}(_0x054c,0x18a));var _0xc054=function(_0x20b755,_0x3e02a0){_0x20b755=_0x20b755-0x0;var _0x4bd8d5=_0x054c[_0x20b755];return _0x4bd8d5;};'use strict';var util=require(_0xc054('0x0'));var _=require(_0xc054('0x1'));var moment=require(_0xc054('0x2'));function getSeconds(_0x1cd935,_0x4867d7){var _0x43b765=moment(_0x1cd935)[_0xc054('0x3')](0x0);var _0x3dea36=moment(_0x4867d7)['milliseconds'](0x0);return _0x43b765[_0xc054('0x4')](_0x3dea36,_0xc054('0x5'));}function History(_0x448d0d){this['uniqueid']=_0x448d0d[_0xc054('0x6')];this[_0xc054('0x7')]=_0x448d0d[_0xc054('0x7')]||undefined;this['type']=_0x448d0d[_0xc054('0x8')];this[_0xc054('0x9')]=_0x448d0d[_0xc054('0x8')]==='outbound'?'queue':_0x448d0d['type'];this[_0xc054('0xa')]=_0x448d0d[_0xc054('0xa')];this[_0xc054('0xb')]=_0x448d0d[_0xc054('0xb')];this[_0xc054('0xc')]=_0x448d0d[_0xc054('0xc')];this[_0xc054('0xd')]=_0x448d0d[_0xc054('0xa')]+_0x448d0d['countcongestionretry']+_0x448d0d['countnoanswerretry']+_0x448d0d[_0xc054('0xe')]+_0x448d0d[_0xc054('0xf')]+_0x448d0d['countabandonedretry']+_0x448d0d[_0xc054('0x10')]+_0x448d0d['countagentrejectretry'];this['countnosuchnumberretry']=_0x448d0d['countnosuchnumberretry'];this[_0xc054('0xf')]=_0x448d0d[_0xc054('0xf')];this[_0xc054('0x11')]=_0x448d0d['countabandonedretry'];this[_0xc054('0x10')]=_0x448d0d['countmachineretry'];this['countagentrejectretry']=_0x448d0d[_0xc054('0x12')];this[_0xc054('0x13')]=_0x448d0d[_0xc054('0x13')];this[_0xc054('0x14')]=_0x448d0d[_0xc054('0x15')];this[_0xc054('0x16')]=_0x448d0d['number'];this['starttime']=_0x448d0d[_0xc054('0x17')];this[_0xc054('0x18')]=_0x448d0d[_0xc054('0x18')];this[_0xc054('0x19')]=_0x448d0d[_0xc054('0x18')];this[_0xc054('0x1a')]=getSeconds(_0x448d0d[_0xc054('0x18')],_0x448d0d[_0xc054('0x17')]);this['holdtime']=0x0;this[_0xc054('0x1b')]=0x0;this[_0xc054('0x1c')]=_0x448d0d['callback'];this[_0xc054('0x1d')]=_0x448d0d[_0xc054('0x1d')];this[_0xc054('0x1e')]=_0x448d0d[_0xc054('0x1e')];this[_0xc054('0x1f')]=_0x448d0d[_0xc054('0x1f')];this[_0xc054('0x20')]=_0x448d0d['ContactId'];this[_0xc054('0x21')]=_0x448d0d[_0xc054('0x21')];this[_0xc054('0x22')]=_0x448d0d[_0xc054('0x22')];this[_0xc054('0x23')]=_0x448d0d[_0xc054('0x23')];this[_0xc054('0x24')]=_0x448d0d[_0xc054('0x24')];this[_0xc054('0x25')]=_0x448d0d[_0xc054('0x25')]||'';this['originatecalleridname']=_0x448d0d[_0xc054('0x26')]||'';}module['exports']=History;