Built motion from commit (unavailable).|2.5.4
[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 _0x5e67=['outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','name','calleridnum','number','starttime','responsetime','endtime','ringtime','holdtime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','type','campaigntype'];(function(_0x1bc762,_0x523eb3){var _0x40f70c=function(_0x3c206e){while(--_0x3c206e){_0x1bc762['push'](_0x1bc762['shift']());}};_0x40f70c(++_0x523eb3);}(_0x5e67,0x70));var _0x75e6=function(_0x36f6b3,_0xfc71a6){_0x36f6b3=_0x36f6b3-0x0;var _0x4983d3=_0x5e67[_0x36f6b3];return _0x4983d3;};'use strict';var util=require(_0x75e6('0x0'));var _=require(_0x75e6('0x1'));var moment=require(_0x75e6('0x2'));function getSeconds(_0x307d03,_0x2f7528){var _0x2d5d89=moment(_0x307d03)[_0x75e6('0x3')](0x0);var _0x2f3320=moment(_0x2f7528)[_0x75e6('0x3')](0x0);return _0x2d5d89[_0x75e6('0x4')](_0x2f3320,_0x75e6('0x5'));}function History(_0x172f8a){this['uniqueid']=_0x172f8a['uniqueid'];this['scheduledat']=_0x172f8a['scheduledat']||undefined;this[_0x75e6('0x6')]=_0x172f8a['type'];this[_0x75e6('0x7')]=_0x172f8a[_0x75e6('0x6')]===_0x75e6('0x8')?_0x75e6('0x9'):_0x172f8a['type'];this[_0x75e6('0xa')]=_0x172f8a[_0x75e6('0xa')];this[_0x75e6('0xb')]=_0x172f8a['countcongestionretry'];this['countnoanswerretry']=_0x172f8a[_0x75e6('0xc')];this[_0x75e6('0xd')]=_0x172f8a['countbusyretry']+_0x172f8a['countcongestionretry']+_0x172f8a[_0x75e6('0xc')]+_0x172f8a[_0x75e6('0xe')]+_0x172f8a[_0x75e6('0xf')]+_0x172f8a[_0x75e6('0x10')]+_0x172f8a[_0x75e6('0x11')]+_0x172f8a[_0x75e6('0x12')];this[_0x75e6('0xe')]=_0x172f8a[_0x75e6('0xe')];this['countdropretry']=_0x172f8a[_0x75e6('0xf')];this[_0x75e6('0x10')]=_0x172f8a[_0x75e6('0x10')];this[_0x75e6('0x11')]=_0x172f8a['countmachineretry'];this[_0x75e6('0x12')]=_0x172f8a[_0x75e6('0x12')];this['queue']=_0x172f8a['queue'];this[_0x75e6('0x13')]=_0x172f8a[_0x75e6('0x14')];this[_0x75e6('0x15')]=_0x172f8a[_0x75e6('0x16')];this[_0x75e6('0x17')]=_0x172f8a[_0x75e6('0x17')];this[_0x75e6('0x18')]=_0x172f8a['responsetime'];this[_0x75e6('0x19')]=_0x172f8a[_0x75e6('0x18')];this[_0x75e6('0x1a')]=getSeconds(_0x172f8a['responsetime'],_0x172f8a[_0x75e6('0x17')]);this[_0x75e6('0x1b')]=0x0;this['talktime']=0x0;this[_0x75e6('0x1c')]=_0x172f8a[_0x75e6('0x1c')];this['callbackuniqueid']=_0x172f8a[_0x75e6('0x1d')];this[_0x75e6('0x1e')]=_0x172f8a['callbackat'];this[_0x75e6('0x1f')]=_0x172f8a[_0x75e6('0x1f')];this[_0x75e6('0x20')]=_0x172f8a['ContactId'];this[_0x75e6('0x21')]=_0x172f8a[_0x75e6('0x21')];this[_0x75e6('0x22')]=_0x172f8a[_0x75e6('0x22')];this[_0x75e6('0x23')]=_0x172f8a[_0x75e6('0x23')];this[_0x75e6('0x24')]=_0x172f8a[_0x75e6('0x24')];this[_0x75e6('0x25')]=_0x172f8a[_0x75e6('0x25')]||'';this[_0x75e6('0x26')]=_0x172f8a[_0x75e6('0x26')]||'';}module[_0x75e6('0x27')]=History;