287c638b1be56bb2bf80a013c2338b1f04166890
[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 _0x6cdf=['number','starttime','responsetime','droptime','endtime','ringtime','holdtime','talktime','queue','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','util','moment','milliseconds','diff','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','calleridnum'];(function(_0x287d08,_0x55ab1e){var _0x3e7834=function(_0x3cada6){while(--_0x3cada6){_0x287d08['push'](_0x287d08['shift']());}};_0x3e7834(++_0x55ab1e);}(_0x6cdf,0x1ba));var _0xf6cd=function(_0x339129,_0x86dcc6){_0x339129=_0x339129-0x0;var _0x1570df=_0x6cdf[_0x339129];return _0x1570df;};'use strict';var util=require(_0xf6cd('0x0'));var _=require('lodash');var moment=require(_0xf6cd('0x1'));function getSeconds(_0x442373,_0x5b5a90){var _0x3943a9=moment(_0x442373)[_0xf6cd('0x2')](0x0);var _0x4d3192=moment(_0x5b5a90)[_0xf6cd('0x2')](0x0);return _0x3943a9[_0xf6cd('0x3')](_0x4d3192,'seconds');}function QueueCallerAbandon(_0x197f20,_0x41725b){this[_0xf6cd('0x4')]=_0x197f20['scheduledat'];this['type']=_0x197f20[_0xf6cd('0x5')];this[_0xf6cd('0x6')]=_0x197f20[_0xf6cd('0x5')]===_0xf6cd('0x7')?'queue':_0x197f20[_0xf6cd('0x5')];this[_0xf6cd('0x8')]=_0x197f20[_0xf6cd('0x8')];this[_0xf6cd('0x9')]=_0x197f20[_0xf6cd('0x9')];this[_0xf6cd('0xa')]=_0x197f20['countnoanswerretry'];this[_0xf6cd('0xb')]=_0x197f20[_0xf6cd('0x8')]+_0x197f20[_0xf6cd('0x9')]+_0x197f20[_0xf6cd('0xa')]+_0x197f20[_0xf6cd('0xc')]+_0x197f20[_0xf6cd('0xd')]+_0x197f20[_0xf6cd('0xe')]+_0x197f20['countmachineretry']+_0x197f20[_0xf6cd('0xf')];this['countnosuchnumberretry']=_0x197f20[_0xf6cd('0xc')];this['countdropretry']=_0x197f20['countdropretry'];this[_0xf6cd('0xe')]=_0x197f20[_0xf6cd('0xe')];this[_0xf6cd('0x10')]=_0x197f20[_0xf6cd('0x10')];this[_0xf6cd('0xf')]=_0x197f20[_0xf6cd('0xf')];this[_0xf6cd('0x11')]=_0x41725b[_0xf6cd('0x11')];this[_0xf6cd('0x12')]=_0x197f20['name'];this[_0xf6cd('0x13')]=_0x197f20[_0xf6cd('0x14')];this[_0xf6cd('0x15')]=_0x197f20['starttime'];this[_0xf6cd('0x16')]=_0x197f20['responsetime'];this[_0xf6cd('0x17')]=_0x197f20[_0xf6cd('0x17')];this[_0xf6cd('0x18')]=this[_0xf6cd('0x17')];this[_0xf6cd('0x19')]=getSeconds(_0x197f20['responsetime'],_0x197f20[_0xf6cd('0x15')]);this[_0xf6cd('0x1a')]=getSeconds(this[_0xf6cd('0x17')],_0x197f20['responsetime']);this[_0xf6cd('0x1b')]=0x0;this[_0xf6cd('0x1c')]=_0x41725b[_0xf6cd('0x1c')];this[_0xf6cd('0x1d')]=_0x41725b[_0xf6cd('0x1e')];this[_0xf6cd('0x1f')]=_0x41725b[_0xf6cd('0x1f')];this[_0xf6cd('0x20')]=_0x197f20[_0xf6cd('0x20')];this[_0xf6cd('0x21')]=_0x197f20[_0xf6cd('0x21')];this[_0xf6cd('0x22')]=_0x197f20[_0xf6cd('0x22')];this['recallme']=_0x197f20[_0xf6cd('0x23')];this[_0xf6cd('0x24')]=_0x197f20[_0xf6cd('0x24')];this[_0xf6cd('0x25')]=_0x197f20[_0xf6cd('0x25')];this[_0xf6cd('0x26')]=_0x197f20[_0xf6cd('0x26')];this['VoiceQueueId']=_0x197f20[_0xf6cd('0x27')];this[_0xf6cd('0x28')]=_0x197f20['CampaignId'];this[_0xf6cd('0x29')]=_0x197f20['originatecalleridnum']||'';this['originatecalleridname']=_0x197f20['originatecalleridname']||'';}module['exports']=QueueCallerAbandon;