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 _0x40c6=['starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','uniqueid','type','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countnosuchnumberretry','countmachineretry','countagentrejectretry','calleridname','name','calleridnum'];(function(_0x2c1aa8,_0x3e0609){var _0x4019f5=function(_0x916eac){while(--_0x916eac){_0x2c1aa8['push'](_0x2c1aa8['shift']());}};_0x4019f5(++_0x3e0609);}(_0x40c6,0xf5));var _0x640c=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x40c6[_0x17d9e3];return _0x14192d;};'use strict';var util=require(_0x640c('0x0'));var _=require(_0x640c('0x1'));var moment=require(_0x640c('0x2'));function getSeconds(_0x15fa87,_0x333ff5){var _0x18ec13=moment(_0x15fa87)[_0x640c('0x3')](0x0);var _0x48e206=moment(_0x333ff5)['milliseconds'](0x0);return _0x18ec13[_0x640c('0x4')](_0x48e206,_0x640c('0x5'));}function History(_0xc28ea9){this[_0x640c('0x6')]=_0xc28ea9[_0x640c('0x6')];this['scheduledat']=_0xc28ea9['scheduledat']||undefined;this[_0x640c('0x7')]=_0xc28ea9['type'];this['campaigntype']=_0xc28ea9[_0x640c('0x7')]===_0x640c('0x8')?'queue':_0xc28ea9['type'];this[_0x640c('0x9')]=_0xc28ea9[_0x640c('0x9')];this[_0x640c('0xa')]=_0xc28ea9[_0x640c('0xa')];this['countnoanswerretry']=_0xc28ea9[_0x640c('0xb')];this[_0x640c('0xc')]=_0xc28ea9[_0x640c('0x9')]+_0xc28ea9[_0x640c('0xa')]+_0xc28ea9[_0x640c('0xb')]+_0xc28ea9['countnosuchnumberretry']+_0xc28ea9[_0x640c('0xd')]+_0xc28ea9[_0x640c('0xe')]+_0xc28ea9['countmachineretry']+_0xc28ea9['countagentrejectretry'];this['countnosuchnumberretry']=_0xc28ea9[_0x640c('0xf')];this[_0x640c('0xd')]=_0xc28ea9['countdropretry'];this[_0x640c('0xe')]=_0xc28ea9['countabandonedretry'];this[_0x640c('0x10')]=_0xc28ea9[_0x640c('0x10')];this[_0x640c('0x11')]=_0xc28ea9[_0x640c('0x11')];this['queue']=_0xc28ea9['queue'];this[_0x640c('0x12')]=_0xc28ea9[_0x640c('0x13')];this[_0x640c('0x14')]=_0xc28ea9['number'];this[_0x640c('0x15')]=_0xc28ea9[_0x640c('0x15')];this[_0x640c('0x16')]=_0xc28ea9[_0x640c('0x16')];this[_0x640c('0x17')]=_0xc28ea9[_0x640c('0x16')];this[_0x640c('0x18')]=getSeconds(_0xc28ea9[_0x640c('0x16')],_0xc28ea9['starttime']);this[_0x640c('0x19')]=0x0;this[_0x640c('0x1a')]=0x0;this['callback']=_0xc28ea9[_0x640c('0x1b')];this['callbackuniqueid']=_0xc28ea9[_0x640c('0x1c')];this['callbackat']=_0xc28ea9[_0x640c('0x1d')];this['recallme']=_0xc28ea9[_0x640c('0x1e')];this['ContactId']=_0xc28ea9[_0x640c('0x1f')];this[_0x640c('0x20')]=_0xc28ea9[_0x640c('0x20')];this[_0x640c('0x21')]=_0xc28ea9[_0x640c('0x21')];this['VoiceQueueId']=_0xc28ea9[_0x640c('0x22')];this['CampaignId']=_0xc28ea9['CampaignId'];this[_0x640c('0x23')]=_0xc28ea9[_0x640c('0x23')]||'';this[_0x640c('0x24')]=_0xc28ea9[_0x640c('0x24')]||'';}module[_0x640c('0x25')]=History;