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