Built motion from commit 14588770.|2.5.38
[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 _0x5a1d=['talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','queue','name','calleridnum','starttime','responsetime','endtime','ringtime'];(function(_0x2f92d9,_0x27e435){var _0x33b33a=function(_0x1956e6){while(--_0x1956e6){_0x2f92d9['push'](_0x2f92d9['shift']());}};_0x33b33a(++_0x27e435);}(_0x5a1d,0x11e));var _0xd5a1=function(_0x8c553f,_0x5753c2){_0x8c553f=_0x8c553f-0x0;var _0x330a49=_0x5a1d[_0x8c553f];return _0x330a49;};'use strict';var util=require(_0xd5a1('0x0'));var _=require(_0xd5a1('0x1'));var moment=require(_0xd5a1('0x2'));function getSeconds(_0x3cddf4,_0x452dc9){var _0x4fa8f3=moment(_0x3cddf4)[_0xd5a1('0x3')](0x0);var _0x4cc80a=moment(_0x452dc9)['milliseconds'](0x0);return _0x4fa8f3[_0xd5a1('0x4')](_0x4cc80a,_0xd5a1('0x5'));}function History(_0x234eb5){this[_0xd5a1('0x6')]=_0x234eb5[_0xd5a1('0x6')];this['scheduledat']=_0x234eb5[_0xd5a1('0x7')]||undefined;this['type']=_0x234eb5[_0xd5a1('0x8')];this[_0xd5a1('0x9')]=_0x234eb5['type']==='outbound'?'queue':_0x234eb5[_0xd5a1('0x8')];this[_0xd5a1('0xa')]=_0x234eb5[_0xd5a1('0xa')];this['countcongestionretry']=_0x234eb5[_0xd5a1('0xb')];this[_0xd5a1('0xc')]=_0x234eb5[_0xd5a1('0xc')];this[_0xd5a1('0xd')]=_0x234eb5[_0xd5a1('0xa')]+_0x234eb5[_0xd5a1('0xb')]+_0x234eb5[_0xd5a1('0xc')]+_0x234eb5[_0xd5a1('0xe')]+_0x234eb5[_0xd5a1('0xf')]+_0x234eb5[_0xd5a1('0x10')]+_0x234eb5[_0xd5a1('0x11')]+_0x234eb5[_0xd5a1('0x12')];this[_0xd5a1('0xe')]=_0x234eb5['countnosuchnumberretry'];this['countdropretry']=_0x234eb5[_0xd5a1('0xf')];this[_0xd5a1('0x10')]=_0x234eb5['countabandonedretry'];this[_0xd5a1('0x11')]=_0x234eb5[_0xd5a1('0x11')];this['countagentrejectretry']=_0x234eb5[_0xd5a1('0x12')];this[_0xd5a1('0x13')]=_0x234eb5[_0xd5a1('0x13')];this['calleridname']=_0x234eb5[_0xd5a1('0x14')];this[_0xd5a1('0x15')]=_0x234eb5['number'];this[_0xd5a1('0x16')]=_0x234eb5[_0xd5a1('0x16')];this[_0xd5a1('0x17')]=_0x234eb5['responsetime'];this[_0xd5a1('0x18')]=_0x234eb5[_0xd5a1('0x17')];this[_0xd5a1('0x19')]=getSeconds(_0x234eb5['responsetime'],_0x234eb5[_0xd5a1('0x16')]);this['holdtime']=0x0;this[_0xd5a1('0x1a')]=0x0;this['callback']=_0x234eb5[_0xd5a1('0x1b')];this[_0xd5a1('0x1c')]=_0x234eb5['callbackuniqueid'];this['callbackat']=_0x234eb5[_0xd5a1('0x1d')];this['recallme']=_0x234eb5[_0xd5a1('0x1e')];this[_0xd5a1('0x1f')]=_0x234eb5[_0xd5a1('0x1f')];this[_0xd5a1('0x20')]=_0x234eb5['ListId'];this['UserId']=_0x234eb5[_0xd5a1('0x21')];this[_0xd5a1('0x22')]=_0x234eb5[_0xd5a1('0x22')];this[_0xd5a1('0x23')]=_0x234eb5['CampaignId'];this[_0xd5a1('0x24')]=_0x234eb5[_0xd5a1('0x24')]||'';this[_0xd5a1('0x25')]=_0x234eb5[_0xd5a1('0x25')]||'';}module[_0xd5a1('0x26')]=History;