Built motion from commit 753c950e.|2.5.42
[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 _0xf037=['VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','queue','name','calleridnum','number','starttime','responsetime','ringtime','talktime','callback','callbackuniqueid','callbackat','recallme','ListId','UserId'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf037,0x10f));var _0x7f03=function(_0x3ed091,_0x3491d4){_0x3ed091=_0x3ed091-0x0;var _0x49f07c=_0xf037[_0x3ed091];return _0x49f07c;};'use strict';var util=require(_0x7f03('0x0'));var _=require('lodash');var moment=require(_0x7f03('0x1'));function getSeconds(_0xdf3529,_0x7cc426){var _0x3e27e6=moment(_0xdf3529)[_0x7f03('0x2')](0x0);var _0x4b02f1=moment(_0x7cc426)['milliseconds'](0x0);return _0x3e27e6[_0x7f03('0x3')](_0x4b02f1,_0x7f03('0x4'));}function History(_0x3338a1){this[_0x7f03('0x5')]=_0x3338a1[_0x7f03('0x5')];this[_0x7f03('0x6')]=_0x3338a1[_0x7f03('0x6')]||undefined;this[_0x7f03('0x7')]=_0x3338a1[_0x7f03('0x7')];this[_0x7f03('0x8')]=_0x3338a1['type']===_0x7f03('0x9')?'queue':_0x3338a1[_0x7f03('0x7')];this[_0x7f03('0xa')]=_0x3338a1['countbusyretry'];this[_0x7f03('0xb')]=_0x3338a1[_0x7f03('0xb')];this[_0x7f03('0xc')]=_0x3338a1['countnoanswerretry'];this[_0x7f03('0xd')]=_0x3338a1[_0x7f03('0xa')]+_0x3338a1[_0x7f03('0xb')]+_0x3338a1[_0x7f03('0xc')]+_0x3338a1[_0x7f03('0xe')]+_0x3338a1[_0x7f03('0xf')]+_0x3338a1[_0x7f03('0x10')]+_0x3338a1[_0x7f03('0x11')]+_0x3338a1['countagentrejectretry'];this[_0x7f03('0xe')]=_0x3338a1['countnosuchnumberretry'];this[_0x7f03('0xf')]=_0x3338a1[_0x7f03('0xf')];this[_0x7f03('0x10')]=_0x3338a1[_0x7f03('0x10')];this['countmachineretry']=_0x3338a1[_0x7f03('0x11')];this['countagentrejectretry']=_0x3338a1[_0x7f03('0x12')];this[_0x7f03('0x13')]=_0x3338a1['queue'];this['calleridname']=_0x3338a1[_0x7f03('0x14')];this[_0x7f03('0x15')]=_0x3338a1[_0x7f03('0x16')];this[_0x7f03('0x17')]=_0x3338a1[_0x7f03('0x17')];this['responsetime']=_0x3338a1[_0x7f03('0x18')];this['endtime']=_0x3338a1[_0x7f03('0x18')];this[_0x7f03('0x19')]=getSeconds(_0x3338a1['responsetime'],_0x3338a1[_0x7f03('0x17')]);this['holdtime']=0x0;this[_0x7f03('0x1a')]=0x0;this[_0x7f03('0x1b')]=_0x3338a1[_0x7f03('0x1b')];this[_0x7f03('0x1c')]=_0x3338a1[_0x7f03('0x1c')];this[_0x7f03('0x1d')]=_0x3338a1[_0x7f03('0x1d')];this[_0x7f03('0x1e')]=_0x3338a1['recallme'];this['ContactId']=_0x3338a1['ContactId'];this[_0x7f03('0x1f')]=_0x3338a1[_0x7f03('0x1f')];this['UserId']=_0x3338a1[_0x7f03('0x20')];this[_0x7f03('0x21')]=_0x3338a1[_0x7f03('0x21')];this[_0x7f03('0x22')]=_0x3338a1['CampaignId'];this['originatecalleridnum']=_0x3338a1[_0x7f03('0x23')]||'';this['originatecalleridname']=_0x3338a1[_0x7f03('0x24')]||'';}module[_0x7f03('0x25')]=History;