Built motion from commit fe909640.|2.6.8
[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 _0x06fe=['countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','queue','calleridname','number','starttime','responsetime','endtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','countbusyretry'];(function(_0x148f47,_0x2f32b1){var _0x4537a3=function(_0x9b77ec){while(--_0x9b77ec){_0x148f47['push'](_0x148f47['shift']());}};_0x4537a3(++_0x2f32b1);}(_0x06fe,0x6c));var _0xe06f=function(_0x9ec221,_0x2594a6){_0x9ec221=_0x9ec221-0x0;var _0xdbe55e=_0x06fe[_0x9ec221];return _0xdbe55e;};'use strict';var util=require(_0xe06f('0x0'));var _=require(_0xe06f('0x1'));var moment=require(_0xe06f('0x2'));function getSeconds(_0x5c2332,_0x327671){var _0x2bbf82=moment(_0x5c2332)[_0xe06f('0x3')](0x0);var _0x330d95=moment(_0x327671)[_0xe06f('0x3')](0x0);return _0x2bbf82[_0xe06f('0x4')](_0x330d95,_0xe06f('0x5'));}function History(_0x516e80){this[_0xe06f('0x6')]=_0x516e80[_0xe06f('0x6')];this[_0xe06f('0x7')]=_0x516e80[_0xe06f('0x7')]||undefined;this[_0xe06f('0x8')]=_0x516e80[_0xe06f('0x8')];this[_0xe06f('0x9')]=_0x516e80[_0xe06f('0x8')]===_0xe06f('0xa')?'queue':_0x516e80[_0xe06f('0x8')];this[_0xe06f('0xb')]=_0x516e80['countbusyretry'];this[_0xe06f('0xc')]=_0x516e80[_0xe06f('0xc')];this[_0xe06f('0xd')]=_0x516e80[_0xe06f('0xd')];this[_0xe06f('0xe')]=_0x516e80[_0xe06f('0xb')]+_0x516e80[_0xe06f('0xc')]+_0x516e80[_0xe06f('0xd')]+_0x516e80[_0xe06f('0xf')]+_0x516e80['countdropretry']+_0x516e80[_0xe06f('0x10')]+_0x516e80[_0xe06f('0x11')]+_0x516e80[_0xe06f('0x12')];this[_0xe06f('0xf')]=_0x516e80[_0xe06f('0xf')];this[_0xe06f('0x13')]=_0x516e80[_0xe06f('0x13')];this[_0xe06f('0x10')]=_0x516e80[_0xe06f('0x10')];this[_0xe06f('0x11')]=_0x516e80['countmachineretry'];this[_0xe06f('0x12')]=_0x516e80['countagentrejectretry'];this['queue']=_0x516e80[_0xe06f('0x14')];this[_0xe06f('0x15')]=_0x516e80['name'];this['calleridnum']=_0x516e80[_0xe06f('0x16')];this[_0xe06f('0x17')]=_0x516e80[_0xe06f('0x17')];this[_0xe06f('0x18')]=_0x516e80[_0xe06f('0x18')];this[_0xe06f('0x19')]=_0x516e80['responsetime'];this['ringtime']=getSeconds(_0x516e80[_0xe06f('0x18')],_0x516e80['starttime']);this[_0xe06f('0x1a')]=0x0;this[_0xe06f('0x1b')]=0x0;this[_0xe06f('0x1c')]=_0x516e80[_0xe06f('0x1c')];this[_0xe06f('0x1d')]=_0x516e80[_0xe06f('0x1d')];this[_0xe06f('0x1e')]=_0x516e80[_0xe06f('0x1e')];this[_0xe06f('0x1f')]=_0x516e80['recallme'];this['ContactId']=_0x516e80[_0xe06f('0x20')];this[_0xe06f('0x21')]=_0x516e80[_0xe06f('0x21')];this[_0xe06f('0x22')]=_0x516e80[_0xe06f('0x22')];this[_0xe06f('0x23')]=_0x516e80[_0xe06f('0x23')];this[_0xe06f('0x24')]=_0x516e80[_0xe06f('0x24')];this[_0xe06f('0x25')]=_0x516e80['originatecalleridnum']||'';this[_0xe06f('0x26')]=_0x516e80[_0xe06f('0x26')]||'';}module[_0xe06f('0x27')]=History;