dc418e4587f60be15618ac35addf4bdc83c1b917
[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 _0x12e8=['campaigntype','outbound','queue','countnoanswerretry','countglobal','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','name','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','moment','milliseconds','uniqueid','scheduledat','type'];(function(_0x91e6e8,_0x383562){var _0x416700=function(_0x59f588){while(--_0x59f588){_0x91e6e8['push'](_0x91e6e8['shift']());}};_0x416700(++_0x383562);}(_0x12e8,0x19c));var _0x812e=function(_0xccf0fc,_0x3bbd5a){_0xccf0fc=_0xccf0fc-0x0;var _0x406f58=_0x12e8[_0xccf0fc];return _0x406f58;};'use strict';var util=require('util');var _=require(_0x812e('0x0'));var moment=require(_0x812e('0x1'));function getSeconds(_0x424f02,_0x3bd9c0){var _0x58a1ee=moment(_0x424f02)[_0x812e('0x2')](0x0);var _0x1fd6ea=moment(_0x3bd9c0)[_0x812e('0x2')](0x0);return _0x58a1ee['diff'](_0x1fd6ea,'seconds');}function History(_0x34bfd5){this['uniqueid']=_0x34bfd5[_0x812e('0x3')];this[_0x812e('0x4')]=_0x34bfd5[_0x812e('0x4')]||undefined;this[_0x812e('0x5')]=_0x34bfd5['type'];this[_0x812e('0x6')]=_0x34bfd5[_0x812e('0x5')]===_0x812e('0x7')?_0x812e('0x8'):_0x34bfd5['type'];this['countbusyretry']=_0x34bfd5['countbusyretry'];this['countcongestionretry']=_0x34bfd5['countcongestionretry'];this[_0x812e('0x9')]=_0x34bfd5['countnoanswerretry'];this[_0x812e('0xa')]=_0x34bfd5['countbusyretry']+_0x34bfd5[_0x812e('0xb')]+_0x34bfd5[_0x812e('0x9')]+_0x34bfd5[_0x812e('0xc')]+_0x34bfd5[_0x812e('0xd')]+_0x34bfd5[_0x812e('0xe')]+_0x34bfd5[_0x812e('0xf')]+_0x34bfd5['countagentrejectretry'];this[_0x812e('0xc')]=_0x34bfd5['countnosuchnumberretry'];this['countdropretry']=_0x34bfd5['countdropretry'];this['countabandonedretry']=_0x34bfd5[_0x812e('0xe')];this[_0x812e('0xf')]=_0x34bfd5[_0x812e('0xf')];this[_0x812e('0x10')]=_0x34bfd5['countagentrejectretry'];this[_0x812e('0x8')]=_0x34bfd5[_0x812e('0x8')];this[_0x812e('0x11')]=_0x34bfd5[_0x812e('0x12')];this[_0x812e('0x13')]=_0x34bfd5['number'];this['starttime']=_0x34bfd5[_0x812e('0x14')];this[_0x812e('0x15')]=_0x34bfd5[_0x812e('0x15')];this[_0x812e('0x16')]=_0x34bfd5[_0x812e('0x15')];this[_0x812e('0x17')]=getSeconds(_0x34bfd5[_0x812e('0x15')],_0x34bfd5[_0x812e('0x14')]);this[_0x812e('0x18')]=0x0;this[_0x812e('0x19')]=0x0;this[_0x812e('0x1a')]=_0x34bfd5[_0x812e('0x1a')];this['callbackuniqueid']=_0x34bfd5[_0x812e('0x1b')];this[_0x812e('0x1c')]=_0x34bfd5['callbackat'];this['recallme']=_0x34bfd5[_0x812e('0x1d')];this[_0x812e('0x1e')]=_0x34bfd5[_0x812e('0x1e')];this[_0x812e('0x1f')]=_0x34bfd5[_0x812e('0x1f')];this[_0x812e('0x20')]=_0x34bfd5[_0x812e('0x20')];this[_0x812e('0x21')]=_0x34bfd5[_0x812e('0x21')];this[_0x812e('0x22')]=_0x34bfd5[_0x812e('0x22')];this['originatecalleridnum']=_0x34bfd5[_0x812e('0x23')]||'';this[_0x812e('0x24')]=_0x34bfd5[_0x812e('0x24')]||'';}module[_0x812e('0x25')]=History;