Built motion from commit ab870f9e.|2.5.44
[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 _0x78f5=['CampaignId','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','name','calleridnum','number','starttime','responsetime','holdtime','talktime','callback','callbackuniqueid','callbackat','ListId','UserId','VoiceQueueId'];(function(_0x4ee508,_0xec5ce8){var _0x37981d=function(_0x3b857c){while(--_0x3b857c){_0x4ee508['push'](_0x4ee508['shift']());}};_0x37981d(++_0xec5ce8);}(_0x78f5,0xbc));var _0x578f=function(_0x5c9d6e,_0x1f4b05){_0x5c9d6e=_0x5c9d6e-0x0;var _0x2c69d2=_0x78f5[_0x5c9d6e];return _0x2c69d2;};'use strict';var util=require(_0x578f('0x0'));var _=require(_0x578f('0x1'));var moment=require(_0x578f('0x2'));function getSeconds(_0x408f44,_0x15ebce){var _0x15b085=moment(_0x408f44)[_0x578f('0x3')](0x0);var _0x5030b2=moment(_0x15ebce)[_0x578f('0x3')](0x0);return _0x15b085[_0x578f('0x4')](_0x5030b2,_0x578f('0x5'));}function History(_0x54f87f){this['uniqueid']=_0x54f87f[_0x578f('0x6')];this['scheduledat']=_0x54f87f[_0x578f('0x7')]||undefined;this[_0x578f('0x8')]=_0x54f87f[_0x578f('0x8')];this[_0x578f('0x9')]=_0x54f87f[_0x578f('0x8')]==='outbound'?_0x578f('0xa'):_0x54f87f[_0x578f('0x8')];this[_0x578f('0xb')]=_0x54f87f[_0x578f('0xb')];this[_0x578f('0xc')]=_0x54f87f[_0x578f('0xc')];this[_0x578f('0xd')]=_0x54f87f[_0x578f('0xd')];this[_0x578f('0xe')]=_0x54f87f[_0x578f('0xb')]+_0x54f87f['countcongestionretry']+_0x54f87f[_0x578f('0xd')]+_0x54f87f[_0x578f('0xf')]+_0x54f87f[_0x578f('0x10')]+_0x54f87f[_0x578f('0x11')]+_0x54f87f['countmachineretry']+_0x54f87f['countagentrejectretry'];this[_0x578f('0xf')]=_0x54f87f['countnosuchnumberretry'];this[_0x578f('0x10')]=_0x54f87f[_0x578f('0x10')];this[_0x578f('0x11')]=_0x54f87f[_0x578f('0x11')];this[_0x578f('0x12')]=_0x54f87f[_0x578f('0x12')];this[_0x578f('0x13')]=_0x54f87f[_0x578f('0x13')];this[_0x578f('0xa')]=_0x54f87f[_0x578f('0xa')];this[_0x578f('0x14')]=_0x54f87f[_0x578f('0x15')];this[_0x578f('0x16')]=_0x54f87f[_0x578f('0x17')];this[_0x578f('0x18')]=_0x54f87f[_0x578f('0x18')];this[_0x578f('0x19')]=_0x54f87f[_0x578f('0x19')];this['endtime']=_0x54f87f[_0x578f('0x19')];this['ringtime']=getSeconds(_0x54f87f['responsetime'],_0x54f87f[_0x578f('0x18')]);this[_0x578f('0x1a')]=0x0;this[_0x578f('0x1b')]=0x0;this['callback']=_0x54f87f[_0x578f('0x1c')];this['callbackuniqueid']=_0x54f87f[_0x578f('0x1d')];this[_0x578f('0x1e')]=_0x54f87f['callbackat'];this['recallme']=_0x54f87f['recallme'];this['ContactId']=_0x54f87f['ContactId'];this[_0x578f('0x1f')]=_0x54f87f[_0x578f('0x1f')];this[_0x578f('0x20')]=_0x54f87f[_0x578f('0x20')];this[_0x578f('0x21')]=_0x54f87f['VoiceQueueId'];this['CampaignId']=_0x54f87f[_0x578f('0x22')];this['originatecalleridnum']=_0x54f87f['originatecalleridnum']||'';this[_0x578f('0x23')]=_0x54f87f[_0x578f('0x23')]||'';}module[_0x578f('0x24')]=History;