6a233adeca13f0ec03037e03a5236a9d603ec0cc
[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 _0x9f76=['milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countmachineretry','countagentrejectretry','countdropretry','countabandonedretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','exports','util','moment'];(function(_0x24f31b,_0x44b8f3){var _0x488401=function(_0x204caf){while(--_0x204caf){_0x24f31b['push'](_0x24f31b['shift']());}};_0x488401(++_0x44b8f3);}(_0x9f76,0x15e));var _0x69f7=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0x9f76[_0x3054be];return _0x3df150;};'use strict';var util=require(_0x69f7('0x0'));var _=require('lodash');var moment=require(_0x69f7('0x1'));function getSeconds(_0x376670,_0x30e6a3){var _0x13b3a9=moment(_0x376670)[_0x69f7('0x2')](0x0);var _0xff51f=moment(_0x30e6a3)[_0x69f7('0x2')](0x0);return _0x13b3a9[_0x69f7('0x3')](_0xff51f,_0x69f7('0x4'));}function QueueCallerAbandon(_0x123f7c,_0x2228e8){this[_0x69f7('0x5')]=_0x123f7c['scheduledat'];this['type']=_0x123f7c[_0x69f7('0x6')];this[_0x69f7('0x7')]=_0x123f7c[_0x69f7('0x6')]===_0x69f7('0x8')?_0x69f7('0x9'):_0x123f7c[_0x69f7('0x6')];this[_0x69f7('0xa')]=_0x123f7c[_0x69f7('0xa')];this[_0x69f7('0xb')]=_0x123f7c['countcongestionretry'];this[_0x69f7('0xc')]=_0x123f7c[_0x69f7('0xc')];this[_0x69f7('0xd')]=_0x123f7c['countbusyretry']+_0x123f7c['countcongestionretry']+_0x123f7c[_0x69f7('0xc')]+_0x123f7c[_0x69f7('0xe')]+_0x123f7c['countdropretry']+_0x123f7c['countabandonedretry']+_0x123f7c[_0x69f7('0xf')]+_0x123f7c[_0x69f7('0x10')];this[_0x69f7('0xe')]=_0x123f7c['countnosuchnumberretry'];this[_0x69f7('0x11')]=_0x123f7c['countdropretry'];this['countabandonedretry']=_0x123f7c[_0x69f7('0x12')];this[_0x69f7('0xf')]=_0x123f7c[_0x69f7('0xf')];this['countagentrejectretry']=_0x123f7c['countagentrejectretry'];this['uniqueid']=_0x2228e8[_0x69f7('0x13')];this[_0x69f7('0x14')]=_0x123f7c[_0x69f7('0x15')];this[_0x69f7('0x16')]=_0x123f7c[_0x69f7('0x17')];this[_0x69f7('0x18')]=_0x123f7c['starttime'];this[_0x69f7('0x19')]=_0x123f7c[_0x69f7('0x19')];this[_0x69f7('0x1a')]=_0x123f7c[_0x69f7('0x1a')];this[_0x69f7('0x1b')]=this[_0x69f7('0x1a')];this[_0x69f7('0x1c')]=getSeconds(_0x123f7c[_0x69f7('0x19')],_0x123f7c[_0x69f7('0x18')]);this[_0x69f7('0x1d')]=getSeconds(this[_0x69f7('0x1a')],_0x123f7c[_0x69f7('0x19')]);this['talktime']=0x0;this['queue']=_0x2228e8[_0x69f7('0x9')];this[_0x69f7('0x1e')]=_0x2228e8[_0x69f7('0x1f')];this[_0x69f7('0x20')]=_0x2228e8[_0x69f7('0x20')];this[_0x69f7('0x21')]=_0x123f7c[_0x69f7('0x21')];this['callbackuniqueid']=_0x123f7c[_0x69f7('0x22')];this[_0x69f7('0x23')]=_0x123f7c[_0x69f7('0x23')];this[_0x69f7('0x24')]=_0x123f7c[_0x69f7('0x24')];this['ContactId']=_0x123f7c[_0x69f7('0x25')];this[_0x69f7('0x26')]=_0x123f7c[_0x69f7('0x26')];this[_0x69f7('0x27')]=_0x123f7c[_0x69f7('0x27')];this[_0x69f7('0x28')]=_0x123f7c[_0x69f7('0x28')];this[_0x69f7('0x29')]=_0x123f7c['CampaignId'];this['originatecalleridnum']=_0x123f7c[_0x69f7('0x2a')]||'';this['originatecalleridname']=_0x123f7c['originatecalleridname']||'';}module[_0x69f7('0x2b')]=QueueCallerAbandon;