776608e2cf9c18809584dc15432f860912e6f3b4
[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 _0x51ed=['originatecalleridname','exports','util','lodash','moment','diff','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countagentrejectretry','countabandonedretry','countmachineretry','uniqueid','name','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','talktime','membername','connectedlinename','reason','callback','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum'];(function(_0x40a825,_0x3bac79){var _0x273a54=function(_0x5628d8){while(--_0x5628d8){_0x40a825['push'](_0x40a825['shift']());}};_0x273a54(++_0x3bac79);}(_0x51ed,0x12f));var _0xd51e=function(_0x15278e,_0x1d9952){_0x15278e=_0x15278e-0x0;var _0x6ae1d9=_0x51ed[_0x15278e];return _0x6ae1d9;};'use strict';var util=require(_0xd51e('0x0'));var _=require(_0xd51e('0x1'));var moment=require(_0xd51e('0x2'));function getSeconds(_0x1db17a,_0x20c8ff){var _0x1df66a=moment(_0x1db17a)['milliseconds'](0x0);var _0x3fd99c=moment(_0x20c8ff)['milliseconds'](0x0);return _0x1df66a[_0xd51e('0x3')](_0x3fd99c,_0xd51e('0x4'));}function QueueCallerAbandon(_0x148a90,_0x541798){this[_0xd51e('0x5')]=_0x148a90[_0xd51e('0x5')];this[_0xd51e('0x6')]=_0x148a90['type'];this[_0xd51e('0x7')]=_0x148a90[_0xd51e('0x6')]===_0xd51e('0x8')?_0xd51e('0x9'):_0x148a90[_0xd51e('0x6')];this[_0xd51e('0xa')]=_0x148a90[_0xd51e('0xa')];this[_0xd51e('0xb')]=_0x148a90['countcongestionretry'];this['countnoanswerretry']=_0x148a90['countnoanswerretry'];this['countglobal']=_0x148a90[_0xd51e('0xa')]+_0x148a90['countcongestionretry']+_0x148a90[_0xd51e('0xc')]+_0x148a90[_0xd51e('0xd')]+_0x148a90[_0xd51e('0xe')]+_0x148a90['countabandonedretry']+_0x148a90['countmachineretry']+_0x148a90[_0xd51e('0xf')];this[_0xd51e('0xd')]=_0x148a90['countnosuchnumberretry'];this[_0xd51e('0xe')]=_0x148a90[_0xd51e('0xe')];this['countabandonedretry']=_0x148a90[_0xd51e('0x10')];this['countmachineretry']=_0x148a90[_0xd51e('0x11')];this[_0xd51e('0xf')]=_0x148a90[_0xd51e('0xf')];this[_0xd51e('0x12')]=_0x541798[_0xd51e('0x12')];this['calleridname']=_0x148a90[_0xd51e('0x13')];this[_0xd51e('0x14')]=_0x148a90[_0xd51e('0x15')];this['starttime']=_0x148a90[_0xd51e('0x16')];this['responsetime']=_0x148a90[_0xd51e('0x17')];this[_0xd51e('0x18')]=_0x148a90['droptime'];this[_0xd51e('0x19')]=this[_0xd51e('0x18')];this[_0xd51e('0x1a')]=getSeconds(_0x148a90[_0xd51e('0x17')],_0x148a90[_0xd51e('0x16')]);this[_0xd51e('0x1b')]=getSeconds(this['droptime'],_0x148a90[_0xd51e('0x17')]);this[_0xd51e('0x1c')]=0x0;this[_0xd51e('0x9')]=_0x541798[_0xd51e('0x9')];this[_0xd51e('0x1d')]=_0x541798[_0xd51e('0x1e')];this[_0xd51e('0x1f')]=_0x541798[_0xd51e('0x1f')];this['callback']=_0x148a90[_0xd51e('0x20')];this['callbackuniqueid']=_0x148a90['callbackuniqueid'];this[_0xd51e('0x21')]=_0x148a90[_0xd51e('0x21')];this[_0xd51e('0x22')]=_0x148a90['recallme'];this[_0xd51e('0x23')]=_0x148a90[_0xd51e('0x23')];this[_0xd51e('0x24')]=_0x148a90['ListId'];this[_0xd51e('0x25')]=_0x148a90[_0xd51e('0x25')];this['VoiceQueueId']=_0x148a90[_0xd51e('0x26')];this['CampaignId']=_0x148a90[_0xd51e('0x27')];this['originatecalleridnum']=_0x148a90[_0xd51e('0x28')]||'';this[_0xd51e('0x29')]=_0x148a90[_0xd51e('0x29')]||'';}module[_0xd51e('0x2a')]=QueueCallerAbandon;