Built motion from commit da617fac.|2.6.6
[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 _0x4771=['starttime','responsetime','droptime','endtime','ringtime','holdtime','talktime','membername','connectedlinename','reason','callback','callbackuniqueid','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number'];(function(_0x544089,_0x617853){var _0x39e73f=function(_0x200b46){while(--_0x200b46){_0x544089['push'](_0x544089['shift']());}};_0x39e73f(++_0x617853);}(_0x4771,0x150));var _0x1477=function(_0x5f0089,_0x227e2c){_0x5f0089=_0x5f0089-0x0;var _0x193892=_0x4771[_0x5f0089];return _0x193892;};'use strict';var util=require(_0x1477('0x0'));var _=require(_0x1477('0x1'));var moment=require(_0x1477('0x2'));function getSeconds(_0xa5e1bc,_0x24068f){var _0x35a577=moment(_0xa5e1bc)[_0x1477('0x3')](0x0);var _0x5ba5e9=moment(_0x24068f)['milliseconds'](0x0);return _0x35a577[_0x1477('0x4')](_0x5ba5e9,_0x1477('0x5'));}function QueueCallerAbandon(_0x5579e2,_0x3e2a87){this[_0x1477('0x6')]=_0x5579e2[_0x1477('0x6')];this[_0x1477('0x7')]=_0x5579e2[_0x1477('0x7')];this[_0x1477('0x8')]=_0x5579e2[_0x1477('0x7')]===_0x1477('0x9')?_0x1477('0xa'):_0x5579e2[_0x1477('0x7')];this[_0x1477('0xb')]=_0x5579e2[_0x1477('0xb')];this[_0x1477('0xc')]=_0x5579e2[_0x1477('0xc')];this[_0x1477('0xd')]=_0x5579e2[_0x1477('0xd')];this[_0x1477('0xe')]=_0x5579e2['countbusyretry']+_0x5579e2['countcongestionretry']+_0x5579e2[_0x1477('0xd')]+_0x5579e2[_0x1477('0xf')]+_0x5579e2[_0x1477('0x10')]+_0x5579e2[_0x1477('0x11')]+_0x5579e2['countmachineretry']+_0x5579e2[_0x1477('0x12')];this[_0x1477('0xf')]=_0x5579e2[_0x1477('0xf')];this[_0x1477('0x10')]=_0x5579e2[_0x1477('0x10')];this[_0x1477('0x11')]=_0x5579e2[_0x1477('0x11')];this['countmachineretry']=_0x5579e2['countmachineretry'];this[_0x1477('0x12')]=_0x5579e2['countagentrejectretry'];this['uniqueid']=_0x3e2a87[_0x1477('0x13')];this[_0x1477('0x14')]=_0x5579e2[_0x1477('0x15')];this[_0x1477('0x16')]=_0x5579e2[_0x1477('0x17')];this['starttime']=_0x5579e2[_0x1477('0x18')];this['responsetime']=_0x5579e2[_0x1477('0x19')];this[_0x1477('0x1a')]=_0x5579e2[_0x1477('0x1a')];this[_0x1477('0x1b')]=this[_0x1477('0x1a')];this[_0x1477('0x1c')]=getSeconds(_0x5579e2[_0x1477('0x19')],_0x5579e2['starttime']);this[_0x1477('0x1d')]=getSeconds(this[_0x1477('0x1a')],_0x5579e2[_0x1477('0x19')]);this[_0x1477('0x1e')]=0x0;this[_0x1477('0xa')]=_0x3e2a87['queue'];this[_0x1477('0x1f')]=_0x3e2a87[_0x1477('0x20')];this['reason']=_0x3e2a87[_0x1477('0x21')];this[_0x1477('0x22')]=_0x5579e2[_0x1477('0x22')];this[_0x1477('0x23')]=_0x5579e2[_0x1477('0x23')];this['callbackat']=_0x5579e2['callbackat'];this['recallme']=_0x5579e2[_0x1477('0x24')];this[_0x1477('0x25')]=_0x5579e2['ContactId'];this[_0x1477('0x26')]=_0x5579e2[_0x1477('0x26')];this[_0x1477('0x27')]=_0x5579e2[_0x1477('0x27')];this['VoiceQueueId']=_0x5579e2[_0x1477('0x28')];this[_0x1477('0x29')]=_0x5579e2[_0x1477('0x29')];this[_0x1477('0x2a')]=_0x5579e2[_0x1477('0x2a')]||'';this[_0x1477('0x2b')]=_0x5579e2['originatecalleridname']||'';}module[_0x1477('0x2c')]=QueueCallerAbandon;