d1204a89a1605d927798d2238425a8893a997642
[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 _0x6484=['originatecalleridnum','originatecalleridname','exports','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','queue','countcongestionretry','countnoanswerretry','countglobal','countbusyretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','calleridnum','number','starttime','responsetime','endtime','ringtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId'];(function(_0x28947d,_0x4cc9c6){var _0x12d2ee=function(_0x3f38fc){while(--_0x3f38fc){_0x28947d['push'](_0x28947d['shift']());}};_0x12d2ee(++_0x4cc9c6);}(_0x6484,0x1bb));var _0x4648=function(_0x449949,_0x4065ba){_0x449949=_0x449949-0x0;var _0x2e76fe=_0x6484[_0x449949];return _0x2e76fe;};'use strict';var util=require('util');var _=require(_0x4648('0x0'));var moment=require(_0x4648('0x1'));function getSeconds(_0xc79143,_0x12b916){var _0x5393c3=moment(_0xc79143)[_0x4648('0x2')](0x0);var _0x2f31f4=moment(_0x12b916)['milliseconds'](0x0);return _0x5393c3[_0x4648('0x3')](_0x2f31f4,_0x4648('0x4'));}function History(_0x16bd59){this['uniqueid']=_0x16bd59[_0x4648('0x5')];this[_0x4648('0x6')]=_0x16bd59[_0x4648('0x6')]||undefined;this[_0x4648('0x7')]=_0x16bd59[_0x4648('0x7')];this[_0x4648('0x8')]=_0x16bd59[_0x4648('0x7')]===_0x4648('0x9')?_0x4648('0xa'):_0x16bd59['type'];this['countbusyretry']=_0x16bd59['countbusyretry'];this[_0x4648('0xb')]=_0x16bd59[_0x4648('0xb')];this[_0x4648('0xc')]=_0x16bd59[_0x4648('0xc')];this[_0x4648('0xd')]=_0x16bd59[_0x4648('0xe')]+_0x16bd59[_0x4648('0xb')]+_0x16bd59[_0x4648('0xc')]+_0x16bd59[_0x4648('0xf')]+_0x16bd59[_0x4648('0x10')]+_0x16bd59[_0x4648('0x11')]+_0x16bd59[_0x4648('0x12')]+_0x16bd59[_0x4648('0x13')];this['countnosuchnumberretry']=_0x16bd59[_0x4648('0xf')];this['countdropretry']=_0x16bd59['countdropretry'];this[_0x4648('0x11')]=_0x16bd59[_0x4648('0x11')];this[_0x4648('0x12')]=_0x16bd59[_0x4648('0x12')];this[_0x4648('0x13')]=_0x16bd59[_0x4648('0x13')];this['queue']=_0x16bd59[_0x4648('0xa')];this[_0x4648('0x14')]=_0x16bd59['name'];this[_0x4648('0x15')]=_0x16bd59[_0x4648('0x16')];this[_0x4648('0x17')]=_0x16bd59['starttime'];this[_0x4648('0x18')]=_0x16bd59['responsetime'];this[_0x4648('0x19')]=_0x16bd59[_0x4648('0x18')];this[_0x4648('0x1a')]=getSeconds(_0x16bd59['responsetime'],_0x16bd59[_0x4648('0x17')]);this['holdtime']=0x0;this[_0x4648('0x1b')]=0x0;this['callback']=_0x16bd59[_0x4648('0x1c')];this[_0x4648('0x1d')]=_0x16bd59[_0x4648('0x1d')];this[_0x4648('0x1e')]=_0x16bd59[_0x4648('0x1e')];this[_0x4648('0x1f')]=_0x16bd59[_0x4648('0x1f')];this[_0x4648('0x20')]=_0x16bd59['ContactId'];this[_0x4648('0x21')]=_0x16bd59[_0x4648('0x21')];this['UserId']=_0x16bd59[_0x4648('0x22')];this['VoiceQueueId']=_0x16bd59[_0x4648('0x23')];this[_0x4648('0x24')]=_0x16bd59[_0x4648('0x24')];this[_0x4648('0x25')]=_0x16bd59[_0x4648('0x25')]||'';this[_0x4648('0x26')]=_0x16bd59[_0x4648('0x26')]||'';}module[_0x4648('0x27')]=History;