Built motion from commit (unavailable).|2.5.31
[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 _0x78cc=['CampaignId','originatecalleridnum','originatecalleridname','exports','util','moment','milliseconds','diff','uniqueid','scheduledat','outbound','queue','type','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','name','starttime','responsetime','endtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId'];(function(_0x3ce660,_0x2ff52d){var _0x47993d=function(_0x4be1af){while(--_0x4be1af){_0x3ce660['push'](_0x3ce660['shift']());}};_0x47993d(++_0x2ff52d);}(_0x78cc,0x11c));var _0xc78c=function(_0xe7805a,_0x3f86bc){_0xe7805a=_0xe7805a-0x0;var _0x21cfa7=_0x78cc[_0xe7805a];return _0x21cfa7;};'use strict';var util=require(_0xc78c('0x0'));var _=require('lodash');var moment=require(_0xc78c('0x1'));function getSeconds(_0x37ec2e,_0x34f708){var _0x3a87ca=moment(_0x37ec2e)[_0xc78c('0x2')](0x0);var _0x3bf800=moment(_0x34f708)[_0xc78c('0x2')](0x0);return _0x3a87ca[_0xc78c('0x3')](_0x3bf800,'seconds');}function History(_0x523ca9){this['uniqueid']=_0x523ca9[_0xc78c('0x4')];this['scheduledat']=_0x523ca9[_0xc78c('0x5')]||undefined;this['type']=_0x523ca9['type'];this['campaigntype']=_0x523ca9['type']===_0xc78c('0x6')?_0xc78c('0x7'):_0x523ca9[_0xc78c('0x8')];this['countbusyretry']=_0x523ca9[_0xc78c('0x9')];this[_0xc78c('0xa')]=_0x523ca9[_0xc78c('0xa')];this[_0xc78c('0xb')]=_0x523ca9['countnoanswerretry'];this[_0xc78c('0xc')]=_0x523ca9['countbusyretry']+_0x523ca9[_0xc78c('0xa')]+_0x523ca9['countnoanswerretry']+_0x523ca9[_0xc78c('0xd')]+_0x523ca9['countdropretry']+_0x523ca9[_0xc78c('0xe')]+_0x523ca9['countmachineretry']+_0x523ca9['countagentrejectretry'];this[_0xc78c('0xd')]=_0x523ca9[_0xc78c('0xd')];this['countdropretry']=_0x523ca9['countdropretry'];this['countabandonedretry']=_0x523ca9[_0xc78c('0xe')];this[_0xc78c('0xf')]=_0x523ca9[_0xc78c('0xf')];this[_0xc78c('0x10')]=_0x523ca9[_0xc78c('0x10')];this[_0xc78c('0x7')]=_0x523ca9[_0xc78c('0x7')];this['calleridname']=_0x523ca9[_0xc78c('0x11')];this['calleridnum']=_0x523ca9['number'];this[_0xc78c('0x12')]=_0x523ca9[_0xc78c('0x12')];this[_0xc78c('0x13')]=_0x523ca9[_0xc78c('0x13')];this[_0xc78c('0x14')]=_0x523ca9[_0xc78c('0x13')];this['ringtime']=getSeconds(_0x523ca9['responsetime'],_0x523ca9[_0xc78c('0x12')]);this[_0xc78c('0x15')]=0x0;this[_0xc78c('0x16')]=0x0;this[_0xc78c('0x17')]=_0x523ca9[_0xc78c('0x17')];this['callbackuniqueid']=_0x523ca9[_0xc78c('0x18')];this['callbackat']=_0x523ca9[_0xc78c('0x19')];this['recallme']=_0x523ca9[_0xc78c('0x1a')];this[_0xc78c('0x1b')]=_0x523ca9[_0xc78c('0x1b')];this[_0xc78c('0x1c')]=_0x523ca9[_0xc78c('0x1c')];this['UserId']=_0x523ca9[_0xc78c('0x1d')];this[_0xc78c('0x1e')]=_0x523ca9[_0xc78c('0x1e')];this[_0xc78c('0x1f')]=_0x523ca9[_0xc78c('0x1f')];this[_0xc78c('0x20')]=_0x523ca9[_0xc78c('0x20')]||'';this[_0xc78c('0x21')]=_0x523ca9[_0xc78c('0x21')]||'';}module[_0xc78c('0x22')]=History;