674194da6346529145230016cab34e895e2a685b
[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 _0x901d=['countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','membername','connectedlinename','reason','callback','callbackuniqueid','recallme','ContactId','ListId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','diff','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal'];(function(_0x2301c1,_0x3c5a47){var _0x28f1eb=function(_0x6a6bb){while(--_0x6a6bb){_0x2301c1['push'](_0x2301c1['shift']());}};_0x28f1eb(++_0x3c5a47);}(_0x901d,0xb7));var _0xd901=function(_0x1f2b9a,_0x16f398){_0x1f2b9a=_0x1f2b9a-0x0;var _0x4d12a2=_0x901d[_0x1f2b9a];return _0x4d12a2;};'use strict';var util=require(_0xd901('0x0'));var _=require(_0xd901('0x1'));var moment=require('moment');function getSeconds(_0x51b4a7,_0x50e9df){var _0x182a6c=moment(_0x51b4a7)[_0xd901('0x2')](0x0);var _0xf51780=moment(_0x50e9df)[_0xd901('0x2')](0x0);return _0x182a6c[_0xd901('0x3')](_0xf51780,'seconds');}function QueueCallerAbandon(_0x1e5753,_0x332e38){this[_0xd901('0x4')]=_0x1e5753[_0xd901('0x4')];this[_0xd901('0x5')]=_0x1e5753[_0xd901('0x5')];this['campaigntype']=_0x1e5753[_0xd901('0x5')]===_0xd901('0x6')?_0xd901('0x7'):_0x1e5753[_0xd901('0x5')];this[_0xd901('0x8')]=_0x1e5753[_0xd901('0x8')];this[_0xd901('0x9')]=_0x1e5753[_0xd901('0x9')];this[_0xd901('0xa')]=_0x1e5753[_0xd901('0xa')];this[_0xd901('0xb')]=_0x1e5753[_0xd901('0x8')]+_0x1e5753['countcongestionretry']+_0x1e5753[_0xd901('0xa')]+_0x1e5753['countnosuchnumberretry']+_0x1e5753[_0xd901('0xc')]+_0x1e5753[_0xd901('0xd')]+_0x1e5753[_0xd901('0xe')]+_0x1e5753['countagentrejectretry'];this['countnosuchnumberretry']=_0x1e5753['countnosuchnumberretry'];this[_0xd901('0xc')]=_0x1e5753['countdropretry'];this['countabandonedretry']=_0x1e5753[_0xd901('0xd')];this['countmachineretry']=_0x1e5753[_0xd901('0xe')];this[_0xd901('0xf')]=_0x1e5753['countagentrejectretry'];this['uniqueid']=_0x332e38[_0xd901('0x10')];this[_0xd901('0x11')]=_0x1e5753['name'];this[_0xd901('0x12')]=_0x1e5753[_0xd901('0x13')];this[_0xd901('0x14')]=_0x1e5753[_0xd901('0x14')];this[_0xd901('0x15')]=_0x1e5753[_0xd901('0x15')];this[_0xd901('0x16')]=_0x1e5753[_0xd901('0x16')];this[_0xd901('0x17')]=this[_0xd901('0x16')];this[_0xd901('0x18')]=getSeconds(_0x1e5753[_0xd901('0x15')],_0x1e5753[_0xd901('0x14')]);this[_0xd901('0x19')]=getSeconds(this[_0xd901('0x16')],_0x1e5753[_0xd901('0x15')]);this['talktime']=0x0;this['queue']=_0x332e38[_0xd901('0x7')];this[_0xd901('0x1a')]=_0x332e38[_0xd901('0x1b')];this[_0xd901('0x1c')]=_0x332e38[_0xd901('0x1c')];this[_0xd901('0x1d')]=_0x1e5753['callback'];this[_0xd901('0x1e')]=_0x1e5753[_0xd901('0x1e')];this['callbackat']=_0x1e5753['callbackat'];this[_0xd901('0x1f')]=_0x1e5753[_0xd901('0x1f')];this[_0xd901('0x20')]=_0x1e5753[_0xd901('0x20')];this[_0xd901('0x21')]=_0x1e5753[_0xd901('0x21')];this['UserId']=_0x1e5753['UserId'];this[_0xd901('0x22')]=_0x1e5753['VoiceQueueId'];this[_0xd901('0x23')]=_0x1e5753[_0xd901('0x23')];this[_0xd901('0x24')]=_0x1e5753[_0xd901('0x24')]||'';this[_0xd901('0x25')]=_0x1e5753[_0xd901('0x25')]||'';}module[_0xd901('0x26')]=QueueCallerAbandon;