31729802265d8f0dc77416a2bd1ec9bb5a01a732
[motion2.git] / server / services / ami / dialer / queueCallerAbandon.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 _0x9850=['seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime','endtime','holdtime','talktime','membername','connectedlinename','reason','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','diff'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x9850,0xf2));var _0x0985=function(_0x3bc0b3,_0x1b02e4){_0x3bc0b3=_0x3bc0b3-0x0;var _0x33a56f=_0x9850[_0x3bc0b3];return _0x33a56f;};'use strict';var util=require(_0x0985('0x0'));var _=require(_0x0985('0x1'));var moment=require('moment');function getSeconds(_0x206759,_0x4ec1b4){var _0x22f69a=moment(_0x206759)[_0x0985('0x2')](0x0);var _0x5b16b5=moment(_0x4ec1b4)[_0x0985('0x2')](0x0);return _0x22f69a[_0x0985('0x3')](_0x5b16b5,_0x0985('0x4'));}function QueueCallerAbandon(_0x192bf8,_0x4b8a38){this[_0x0985('0x5')]=_0x192bf8[_0x0985('0x5')];this[_0x0985('0x6')]=_0x192bf8['type'];this[_0x0985('0x7')]=_0x192bf8[_0x0985('0x6')]===_0x0985('0x8')?_0x0985('0x9'):_0x192bf8[_0x0985('0x6')];this[_0x0985('0xa')]=_0x192bf8['countbusyretry'];this[_0x0985('0xb')]=_0x192bf8[_0x0985('0xb')];this[_0x0985('0xc')]=_0x192bf8[_0x0985('0xc')];this['countglobal']=_0x192bf8[_0x0985('0xa')]+_0x192bf8[_0x0985('0xb')]+_0x192bf8[_0x0985('0xc')]+_0x192bf8[_0x0985('0xd')]+_0x192bf8[_0x0985('0xe')]+_0x192bf8[_0x0985('0xf')]+_0x192bf8[_0x0985('0x10')]+_0x192bf8['countagentrejectretry'];this[_0x0985('0xd')]=_0x192bf8['countnosuchnumberretry'];this[_0x0985('0xe')]=_0x192bf8[_0x0985('0xe')];this[_0x0985('0xf')]=_0x192bf8[_0x0985('0xf')];this[_0x0985('0x10')]=_0x192bf8['countmachineretry'];this[_0x0985('0x11')]=_0x192bf8[_0x0985('0x11')];this[_0x0985('0x12')]=_0x4b8a38[_0x0985('0x12')];this[_0x0985('0x13')]=_0x192bf8[_0x0985('0x14')];this[_0x0985('0x15')]=_0x192bf8[_0x0985('0x16')];this[_0x0985('0x17')]=_0x192bf8[_0x0985('0x17')];this[_0x0985('0x18')]=_0x192bf8[_0x0985('0x18')];this[_0x0985('0x19')]=_0x192bf8[_0x0985('0x19')];this[_0x0985('0x1a')]=this[_0x0985('0x19')];this['ringtime']=getSeconds(_0x192bf8[_0x0985('0x18')],_0x192bf8[_0x0985('0x17')]);this[_0x0985('0x1b')]=getSeconds(this['droptime'],_0x192bf8[_0x0985('0x18')]);this[_0x0985('0x1c')]=0x0;this['queue']=_0x4b8a38['queue'];this[_0x0985('0x1d')]=_0x4b8a38[_0x0985('0x1e')];this[_0x0985('0x1f')]=_0x4b8a38[_0x0985('0x1f')];this['callback']=_0x192bf8['callback'];this['callbackuniqueid']=_0x192bf8['callbackuniqueid'];this[_0x0985('0x20')]=_0x192bf8[_0x0985('0x20')];this['recallme']=_0x192bf8[_0x0985('0x21')];this[_0x0985('0x22')]=_0x192bf8['ContactId'];this['ListId']=_0x192bf8[_0x0985('0x23')];this[_0x0985('0x24')]=_0x192bf8[_0x0985('0x24')];this[_0x0985('0x25')]=_0x192bf8[_0x0985('0x25')];this['CampaignId']=_0x192bf8['CampaignId'];this['originatecalleridnum']=_0x192bf8[_0x0985('0x26')]||'';this[_0x0985('0x27')]=_0x192bf8['originatecalleridname']||'';}module[_0x0985('0x28')]=QueueCallerAbandon;