Built motion from commit d9028345.|2.5.43
[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 _0x66d6=['campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','uniqueid','calleridname','name','number','starttime','responsetime','droptime','endtime','ringtime','holdtime','talktime','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','util','moment','milliseconds','diff','seconds','scheduledat','type'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x66d6,0x1c7));var _0x666d=function(_0x50bc98,_0x1e99b8){_0x50bc98=_0x50bc98-0x0;var _0x34163b=_0x66d6[_0x50bc98];return _0x34163b;};'use strict';var util=require(_0x666d('0x0'));var _=require('lodash');var moment=require(_0x666d('0x1'));function getSeconds(_0x1d59a5,_0x34a0d1){var _0x4f22b3=moment(_0x1d59a5)[_0x666d('0x2')](0x0);var _0x93df28=moment(_0x34a0d1)[_0x666d('0x2')](0x0);return _0x4f22b3[_0x666d('0x3')](_0x93df28,_0x666d('0x4'));}function QueueCallerAbandon(_0x37335a,_0x5490df){this['scheduledat']=_0x37335a[_0x666d('0x5')];this['type']=_0x37335a[_0x666d('0x6')];this[_0x666d('0x7')]=_0x37335a[_0x666d('0x6')]===_0x666d('0x8')?_0x666d('0x9'):_0x37335a[_0x666d('0x6')];this[_0x666d('0xa')]=_0x37335a['countbusyretry'];this[_0x666d('0xb')]=_0x37335a[_0x666d('0xb')];this['countnoanswerretry']=_0x37335a['countnoanswerretry'];this['countglobal']=_0x37335a[_0x666d('0xa')]+_0x37335a[_0x666d('0xb')]+_0x37335a[_0x666d('0xc')]+_0x37335a[_0x666d('0xd')]+_0x37335a['countdropretry']+_0x37335a[_0x666d('0xe')]+_0x37335a[_0x666d('0xf')]+_0x37335a[_0x666d('0x10')];this[_0x666d('0xd')]=_0x37335a['countnosuchnumberretry'];this['countdropretry']=_0x37335a[_0x666d('0x11')];this[_0x666d('0xe')]=_0x37335a[_0x666d('0xe')];this[_0x666d('0xf')]=_0x37335a[_0x666d('0xf')];this[_0x666d('0x10')]=_0x37335a[_0x666d('0x10')];this[_0x666d('0x12')]=_0x5490df[_0x666d('0x12')];this[_0x666d('0x13')]=_0x37335a[_0x666d('0x14')];this['calleridnum']=_0x37335a[_0x666d('0x15')];this[_0x666d('0x16')]=_0x37335a[_0x666d('0x16')];this[_0x666d('0x17')]=_0x37335a[_0x666d('0x17')];this[_0x666d('0x18')]=_0x37335a[_0x666d('0x18')];this[_0x666d('0x19')]=this[_0x666d('0x18')];this[_0x666d('0x1a')]=getSeconds(_0x37335a[_0x666d('0x17')],_0x37335a[_0x666d('0x16')]);this[_0x666d('0x1b')]=getSeconds(this['droptime'],_0x37335a[_0x666d('0x17')]);this[_0x666d('0x1c')]=0x0;this['queue']=_0x5490df[_0x666d('0x9')];this['membername']=_0x5490df[_0x666d('0x1d')];this[_0x666d('0x1e')]=_0x5490df[_0x666d('0x1e')];this[_0x666d('0x1f')]=_0x37335a[_0x666d('0x1f')];this[_0x666d('0x20')]=_0x37335a['callbackuniqueid'];this[_0x666d('0x21')]=_0x37335a[_0x666d('0x21')];this[_0x666d('0x22')]=_0x37335a['recallme'];this['ContactId']=_0x37335a[_0x666d('0x23')];this[_0x666d('0x24')]=_0x37335a[_0x666d('0x24')];this[_0x666d('0x25')]=_0x37335a[_0x666d('0x25')];this[_0x666d('0x26')]=_0x37335a[_0x666d('0x26')];this['CampaignId']=_0x37335a[_0x666d('0x27')];this[_0x666d('0x28')]=_0x37335a[_0x666d('0x28')]||'';this[_0x666d('0x29')]=_0x37335a[_0x666d('0x29')]||'';}module['exports']=QueueCallerAbandon;