Built motion from commit 67e5df37.|2.0.66
[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 _0xcecc=['endtime','holdtime','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','CampaignId','util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','name','calleridnum','number','starttime','responsetime'];(function(_0x8d8e80,_0x52918b){var _0x1675ed=function(_0x308770){while(--_0x308770){_0x8d8e80['push'](_0x8d8e80['shift']());}};_0x1675ed(++_0x52918b);}(_0xcecc,0x118));var _0xccec=function(_0x45c68e,_0x1335f6){_0x45c68e=_0x45c68e-0x0;var _0x19d97a=_0xcecc[_0x45c68e];return _0x19d97a;};'use strict';var util=require(_0xccec('0x0'));var _=require(_0xccec('0x1'));var moment=require(_0xccec('0x2'));function getSeconds(_0x3a48d5,_0x1958fe){var _0x5f030f=moment(_0x3a48d5)['milliseconds'](0x0);var _0x369ea0=moment(_0x1958fe)[_0xccec('0x3')](0x0);return _0x5f030f[_0xccec('0x4')](_0x369ea0,_0xccec('0x5'));}function History(_0x31ade7){this[_0xccec('0x6')]=_0x31ade7[_0xccec('0x6')];this[_0xccec('0x7')]=_0x31ade7['scheduledat']||undefined;this[_0xccec('0x8')]=_0x31ade7['type'];this['campaigntype']=_0x31ade7[_0xccec('0x8')]===_0xccec('0x9')?_0xccec('0xa'):_0x31ade7['type'];this['countbusyretry']=_0x31ade7[_0xccec('0xb')];this[_0xccec('0xc')]=_0x31ade7[_0xccec('0xc')];this[_0xccec('0xd')]=_0x31ade7['countnoanswerretry'];this[_0xccec('0xe')]=_0x31ade7[_0xccec('0xb')]+_0x31ade7[_0xccec('0xc')]+_0x31ade7['countnoanswerretry'];this[_0xccec('0xa')]=_0x31ade7[_0xccec('0xa')];this['calleridname']=_0x31ade7[_0xccec('0xf')];this[_0xccec('0x10')]=_0x31ade7[_0xccec('0x11')];this['starttime']=_0x31ade7[_0xccec('0x12')];this[_0xccec('0x13')]=_0x31ade7[_0xccec('0x13')];this[_0xccec('0x14')]=_0x31ade7[_0xccec('0x13')];this['ringtime']=getSeconds(_0x31ade7['responsetime'],_0x31ade7[_0xccec('0x12')]);this[_0xccec('0x15')]=0x0;this['talktime']=0x0;this[_0xccec('0x16')]=_0x31ade7[_0xccec('0x16')];this['callbackuniqueid']=_0x31ade7[_0xccec('0x17')];this[_0xccec('0x18')]=_0x31ade7['callbackat'];this[_0xccec('0x19')]=_0x31ade7[_0xccec('0x19')];this[_0xccec('0x1a')]=_0x31ade7[_0xccec('0x1a')];this['ListId']=_0x31ade7['ListId'];this[_0xccec('0x1b')]=_0x31ade7['UserId'];this[_0xccec('0x1c')]=_0x31ade7['VoiceQueueId'];this[_0xccec('0x1d')]=_0x31ade7[_0xccec('0x1d')];}module['exports']=History;