a43c7aa75cad1636710acbe6211452f9c37bdacb
[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 _0xb12f=['recallme','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countmachineretry','countnosuchnumberretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','starttime','responsetime','droptime','holdtime','talktime','connectedlinename','reason','callback','callbackuniqueid','callbackat'];(function(_0x5b9231,_0x43077){var _0x250dd9=function(_0xed36bb){while(--_0xed36bb){_0x5b9231['push'](_0x5b9231['shift']());}};_0x250dd9(++_0x43077);}(_0xb12f,0x182));var _0xfb12=function(_0x2009e2,_0x171a59){_0x2009e2=_0x2009e2-0x0;var _0x32731c=_0xb12f[_0x2009e2];return _0x32731c;};'use strict';var util=require(_0xfb12('0x0'));var _=require(_0xfb12('0x1'));var moment=require(_0xfb12('0x2'));function getSeconds(_0xd88a49,_0x51c7b7){var _0xacc33=moment(_0xd88a49)[_0xfb12('0x3')](0x0);var _0x42796a=moment(_0x51c7b7)[_0xfb12('0x3')](0x0);return _0xacc33[_0xfb12('0x4')](_0x42796a,_0xfb12('0x5'));}function QueueCallerAbandon(_0x49fc90,_0x2cd1a5){this[_0xfb12('0x6')]=_0x49fc90[_0xfb12('0x6')];this[_0xfb12('0x7')]=_0x49fc90['type'];this[_0xfb12('0x8')]=_0x49fc90[_0xfb12('0x7')]===_0xfb12('0x9')?_0xfb12('0xa'):_0x49fc90[_0xfb12('0x7')];this[_0xfb12('0xb')]=_0x49fc90[_0xfb12('0xb')];this[_0xfb12('0xc')]=_0x49fc90[_0xfb12('0xc')];this[_0xfb12('0xd')]=_0x49fc90[_0xfb12('0xd')];this[_0xfb12('0xe')]=_0x49fc90['countbusyretry']+_0x49fc90[_0xfb12('0xc')]+_0x49fc90['countnoanswerretry']+_0x49fc90['countnosuchnumberretry']+_0x49fc90[_0xfb12('0xf')]+_0x49fc90[_0xfb12('0x10')]+_0x49fc90[_0xfb12('0x11')]+_0x49fc90['countagentrejectretry'];this[_0xfb12('0x12')]=_0x49fc90[_0xfb12('0x12')];this[_0xfb12('0xf')]=_0x49fc90[_0xfb12('0xf')];this['countabandonedretry']=_0x49fc90[_0xfb12('0x10')];this[_0xfb12('0x11')]=_0x49fc90[_0xfb12('0x11')];this['countagentrejectretry']=_0x49fc90[_0xfb12('0x13')];this[_0xfb12('0x14')]=_0x2cd1a5[_0xfb12('0x14')];this[_0xfb12('0x15')]=_0x49fc90[_0xfb12('0x16')];this[_0xfb12('0x17')]=_0x49fc90['number'];this[_0xfb12('0x18')]=_0x49fc90[_0xfb12('0x18')];this[_0xfb12('0x19')]=_0x49fc90[_0xfb12('0x19')];this['droptime']=_0x49fc90[_0xfb12('0x1a')];this['endtime']=this[_0xfb12('0x1a')];this['ringtime']=getSeconds(_0x49fc90['responsetime'],_0x49fc90['starttime']);this[_0xfb12('0x1b')]=getSeconds(this[_0xfb12('0x1a')],_0x49fc90[_0xfb12('0x19')]);this[_0xfb12('0x1c')]=0x0;this['queue']=_0x2cd1a5['queue'];this['membername']=_0x2cd1a5[_0xfb12('0x1d')];this[_0xfb12('0x1e')]=_0x2cd1a5['reason'];this['callback']=_0x49fc90[_0xfb12('0x1f')];this[_0xfb12('0x20')]=_0x49fc90[_0xfb12('0x20')];this[_0xfb12('0x21')]=_0x49fc90[_0xfb12('0x21')];this[_0xfb12('0x22')]=_0x49fc90[_0xfb12('0x22')];this['ContactId']=_0x49fc90['ContactId'];this['ListId']=_0x49fc90[_0xfb12('0x23')];this[_0xfb12('0x24')]=_0x49fc90[_0xfb12('0x24')];this[_0xfb12('0x25')]=_0x49fc90['VoiceQueueId'];this[_0xfb12('0x26')]=_0x49fc90['CampaignId'];this[_0xfb12('0x27')]=_0x49fc90[_0xfb12('0x27')]||'';this['originatecalleridname']=_0x49fc90[_0xfb12('0x28')]||'';}module[_0xfb12('0x29')]=QueueCallerAbandon;