Built motion from commit (unavailable).|2.5.4
[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 _0x3351=['VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','diff','seconds','scheduledat','type','campaigntype','countcongestionretry','countnoanswerretry','countglobal','countbusyretry','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','name','starttime','responsetime','droptime','ringtime','talktime','queue','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId'];(function(_0xfff77a,_0x1540be){var _0x311912=function(_0xad891c){while(--_0xad891c){_0xfff77a['push'](_0xfff77a['shift']());}};_0x311912(++_0x1540be);}(_0x3351,0x1f1));var _0x1335=function(_0x3a6efd,_0x2a5102){_0x3a6efd=_0x3a6efd-0x0;var _0x487b9a=_0x3351[_0x3a6efd];return _0x487b9a;};'use strict';var util=require(_0x1335('0x0'));var _=require(_0x1335('0x1'));var moment=require('moment');function getSeconds(_0x360e9f,_0x348850){var _0x24c5e5=moment(_0x360e9f)[_0x1335('0x2')](0x0);var _0x5083ff=moment(_0x348850)[_0x1335('0x2')](0x0);return _0x24c5e5[_0x1335('0x3')](_0x5083ff,_0x1335('0x4'));}function QueueCallerAbandon(_0x3f5e23,_0x29a8c9){this['scheduledat']=_0x3f5e23[_0x1335('0x5')];this[_0x1335('0x6')]=_0x3f5e23[_0x1335('0x6')];this[_0x1335('0x7')]=_0x3f5e23['type']==='outbound'?'queue':_0x3f5e23['type'];this['countbusyretry']=_0x3f5e23['countbusyretry'];this[_0x1335('0x8')]=_0x3f5e23['countcongestionretry'];this[_0x1335('0x9')]=_0x3f5e23['countnoanswerretry'];this[_0x1335('0xa')]=_0x3f5e23[_0x1335('0xb')]+_0x3f5e23['countcongestionretry']+_0x3f5e23['countnoanswerretry']+_0x3f5e23[_0x1335('0xc')]+_0x3f5e23[_0x1335('0xd')]+_0x3f5e23[_0x1335('0xe')]+_0x3f5e23['countmachineretry']+_0x3f5e23[_0x1335('0xf')];this['countnosuchnumberretry']=_0x3f5e23['countnosuchnumberretry'];this[_0x1335('0xd')]=_0x3f5e23[_0x1335('0xd')];this[_0x1335('0xe')]=_0x3f5e23[_0x1335('0xe')];this['countmachineretry']=_0x3f5e23[_0x1335('0x10')];this[_0x1335('0xf')]=_0x3f5e23[_0x1335('0xf')];this[_0x1335('0x11')]=_0x29a8c9[_0x1335('0x11')];this[_0x1335('0x12')]=_0x3f5e23[_0x1335('0x13')];this['calleridnum']=_0x3f5e23['number'];this[_0x1335('0x14')]=_0x3f5e23[_0x1335('0x14')];this[_0x1335('0x15')]=_0x3f5e23['responsetime'];this['droptime']=_0x3f5e23['droptime'];this['endtime']=this[_0x1335('0x16')];this[_0x1335('0x17')]=getSeconds(_0x3f5e23[_0x1335('0x15')],_0x3f5e23[_0x1335('0x14')]);this['holdtime']=getSeconds(this['droptime'],_0x3f5e23[_0x1335('0x15')]);this[_0x1335('0x18')]=0x0;this['queue']=_0x29a8c9[_0x1335('0x19')];this[_0x1335('0x1a')]=_0x29a8c9[_0x1335('0x1b')];this[_0x1335('0x1c')]=_0x29a8c9[_0x1335('0x1c')];this[_0x1335('0x1d')]=_0x3f5e23[_0x1335('0x1d')];this[_0x1335('0x1e')]=_0x3f5e23['callbackuniqueid'];this[_0x1335('0x1f')]=_0x3f5e23[_0x1335('0x1f')];this['recallme']=_0x3f5e23[_0x1335('0x20')];this[_0x1335('0x21')]=_0x3f5e23['ContactId'];this['ListId']=_0x3f5e23[_0x1335('0x22')];this[_0x1335('0x23')]=_0x3f5e23['UserId'];this[_0x1335('0x24')]=_0x3f5e23[_0x1335('0x24')];this['CampaignId']=_0x3f5e23[_0x1335('0x25')];this[_0x1335('0x26')]=_0x3f5e23[_0x1335('0x26')]||'';this[_0x1335('0x27')]=_0x3f5e23[_0x1335('0x27')]||'';}module[_0x1335('0x28')]=QueueCallerAbandon;