Built motion from commit 9e1399f3.|2.5.37
[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 _0xeb05=['type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countagentrejectretry','countnosuchnumberretry','countmachineretry','calleridname','number','starttime','responsetime','endtime','ringtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','moment','milliseconds','diff','scheduledat'];(function(_0x41fe82,_0x54b812){var _0x4f2d17=function(_0x1f5763){while(--_0x1f5763){_0x41fe82['push'](_0x41fe82['shift']());}};_0x4f2d17(++_0x54b812);}(_0xeb05,0x136));var _0x5eb0=function(_0x3620e3,_0x4186ff){_0x3620e3=_0x3620e3-0x0;var _0x1463a3=_0xeb05[_0x3620e3];return _0x1463a3;};'use strict';var util=require('util');var _=require(_0x5eb0('0x0'));var moment=require(_0x5eb0('0x1'));function getSeconds(_0x32536b,_0x18a3f9){var _0x4159c1=moment(_0x32536b)[_0x5eb0('0x2')](0x0);var _0x1da958=moment(_0x18a3f9)[_0x5eb0('0x2')](0x0);return _0x4159c1[_0x5eb0('0x3')](_0x1da958,'seconds');}function History(_0x3ac84b){this['uniqueid']=_0x3ac84b['uniqueid'];this[_0x5eb0('0x4')]=_0x3ac84b[_0x5eb0('0x4')]||undefined;this[_0x5eb0('0x5')]=_0x3ac84b[_0x5eb0('0x5')];this[_0x5eb0('0x6')]=_0x3ac84b[_0x5eb0('0x5')]==='outbound'?_0x5eb0('0x7'):_0x3ac84b[_0x5eb0('0x5')];this[_0x5eb0('0x8')]=_0x3ac84b[_0x5eb0('0x8')];this['countcongestionretry']=_0x3ac84b[_0x5eb0('0x9')];this[_0x5eb0('0xa')]=_0x3ac84b[_0x5eb0('0xa')];this[_0x5eb0('0xb')]=_0x3ac84b[_0x5eb0('0x8')]+_0x3ac84b[_0x5eb0('0x9')]+_0x3ac84b['countnoanswerretry']+_0x3ac84b['countnosuchnumberretry']+_0x3ac84b[_0x5eb0('0xc')]+_0x3ac84b[_0x5eb0('0xd')]+_0x3ac84b['countmachineretry']+_0x3ac84b[_0x5eb0('0xe')];this[_0x5eb0('0xf')]=_0x3ac84b['countnosuchnumberretry'];this[_0x5eb0('0xc')]=_0x3ac84b['countdropretry'];this[_0x5eb0('0xd')]=_0x3ac84b['countabandonedretry'];this[_0x5eb0('0x10')]=_0x3ac84b[_0x5eb0('0x10')];this[_0x5eb0('0xe')]=_0x3ac84b['countagentrejectretry'];this[_0x5eb0('0x7')]=_0x3ac84b[_0x5eb0('0x7')];this[_0x5eb0('0x11')]=_0x3ac84b['name'];this['calleridnum']=_0x3ac84b[_0x5eb0('0x12')];this[_0x5eb0('0x13')]=_0x3ac84b[_0x5eb0('0x13')];this[_0x5eb0('0x14')]=_0x3ac84b[_0x5eb0('0x14')];this[_0x5eb0('0x15')]=_0x3ac84b['responsetime'];this[_0x5eb0('0x16')]=getSeconds(_0x3ac84b[_0x5eb0('0x14')],_0x3ac84b[_0x5eb0('0x13')]);this['holdtime']=0x0;this[_0x5eb0('0x17')]=0x0;this[_0x5eb0('0x18')]=_0x3ac84b[_0x5eb0('0x18')];this['callbackuniqueid']=_0x3ac84b[_0x5eb0('0x19')];this[_0x5eb0('0x1a')]=_0x3ac84b[_0x5eb0('0x1a')];this[_0x5eb0('0x1b')]=_0x3ac84b[_0x5eb0('0x1b')];this['ContactId']=_0x3ac84b[_0x5eb0('0x1c')];this['ListId']=_0x3ac84b[_0x5eb0('0x1d')];this['UserId']=_0x3ac84b['UserId'];this[_0x5eb0('0x1e')]=_0x3ac84b[_0x5eb0('0x1e')];this[_0x5eb0('0x1f')]=_0x3ac84b[_0x5eb0('0x1f')];this[_0x5eb0('0x20')]=_0x3ac84b[_0x5eb0('0x20')]||'';this[_0x5eb0('0x21')]=_0x3ac84b[_0x5eb0('0x21')]||'';}module[_0x5eb0('0x22')]=History;