32c2d8190fbd6d70a516254b34db97dfbea22ab9
[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 _0x3302=['originatecalleridnum','originatecalleridname','exports','util','lodash','milliseconds','diff','seconds','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','responsetime','droptime','ringtime','holdtime','talktime','membername','connectedlinename','reason','callback','callbackuniqueid','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId'];(function(_0x3fbc83,_0x47a239){var _0x4b8438=function(_0x2a972f){while(--_0x2a972f){_0x3fbc83['push'](_0x3fbc83['shift']());}};_0x4b8438(++_0x47a239);}(_0x3302,0xff));var _0x2330=function(_0x11bfb4,_0xda2042){_0x11bfb4=_0x11bfb4-0x0;var _0x28f0a9=_0x3302[_0x11bfb4];return _0x28f0a9;};'use strict';var util=require(_0x2330('0x0'));var _=require(_0x2330('0x1'));var moment=require('moment');function getSeconds(_0x8707ad,_0x28ef13){var _0x3428ea=moment(_0x8707ad)['milliseconds'](0x0);var _0x366a60=moment(_0x28ef13)[_0x2330('0x2')](0x0);return _0x3428ea[_0x2330('0x3')](_0x366a60,_0x2330('0x4'));}function QueueCallerAbandon(_0x1de464,_0x3c9c33){this[_0x2330('0x5')]=_0x1de464[_0x2330('0x5')];this[_0x2330('0x6')]=_0x1de464[_0x2330('0x6')];this['campaigntype']=_0x1de464[_0x2330('0x6')]===_0x2330('0x7')?_0x2330('0x8'):_0x1de464['type'];this[_0x2330('0x9')]=_0x1de464[_0x2330('0x9')];this[_0x2330('0xa')]=_0x1de464[_0x2330('0xa')];this[_0x2330('0xb')]=_0x1de464['countnoanswerretry'];this[_0x2330('0xc')]=_0x1de464['countbusyretry']+_0x1de464[_0x2330('0xa')]+_0x1de464[_0x2330('0xb')]+_0x1de464[_0x2330('0xd')]+_0x1de464[_0x2330('0xe')]+_0x1de464[_0x2330('0xf')]+_0x1de464['countmachineretry']+_0x1de464['countagentrejectretry'];this[_0x2330('0xd')]=_0x1de464[_0x2330('0xd')];this[_0x2330('0xe')]=_0x1de464[_0x2330('0xe')];this[_0x2330('0xf')]=_0x1de464[_0x2330('0xf')];this[_0x2330('0x10')]=_0x1de464[_0x2330('0x10')];this[_0x2330('0x11')]=_0x1de464['countagentrejectretry'];this[_0x2330('0x12')]=_0x3c9c33['uniqueid'];this[_0x2330('0x13')]=_0x1de464[_0x2330('0x14')];this[_0x2330('0x15')]=_0x1de464[_0x2330('0x16')];this['starttime']=_0x1de464['starttime'];this[_0x2330('0x17')]=_0x1de464[_0x2330('0x17')];this[_0x2330('0x18')]=_0x1de464[_0x2330('0x18')];this['endtime']=this[_0x2330('0x18')];this[_0x2330('0x19')]=getSeconds(_0x1de464[_0x2330('0x17')],_0x1de464['starttime']);this[_0x2330('0x1a')]=getSeconds(this[_0x2330('0x18')],_0x1de464[_0x2330('0x17')]);this[_0x2330('0x1b')]=0x0;this[_0x2330('0x8')]=_0x3c9c33[_0x2330('0x8')];this[_0x2330('0x1c')]=_0x3c9c33[_0x2330('0x1d')];this[_0x2330('0x1e')]=_0x3c9c33['reason'];this[_0x2330('0x1f')]=_0x1de464[_0x2330('0x1f')];this[_0x2330('0x20')]=_0x1de464[_0x2330('0x20')];this['callbackat']=_0x1de464['callbackat'];this[_0x2330('0x21')]=_0x1de464[_0x2330('0x21')];this[_0x2330('0x22')]=_0x1de464[_0x2330('0x22')];this[_0x2330('0x23')]=_0x1de464[_0x2330('0x23')];this[_0x2330('0x24')]=_0x1de464[_0x2330('0x24')];this[_0x2330('0x25')]=_0x1de464[_0x2330('0x25')];this[_0x2330('0x26')]=_0x1de464[_0x2330('0x26')];this[_0x2330('0x27')]=_0x1de464[_0x2330('0x27')]||'';this['originatecalleridname']=_0x1de464[_0x2330('0x28')]||'';}module[_0x2330('0x29')]=QueueCallerAbandon;