67506243b83d729d4d0549f64618279dd1cc90a0
[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 _0x52ba=['ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime','ringtime','talktime','membername','reason','callback','callbackuniqueid','callbackat','ContactId'];(function(_0x4fe120,_0x1c3239){var _0xf82b8e=function(_0x1fe46f){while(--_0x1fe46f){_0x4fe120['push'](_0x4fe120['shift']());}};_0xf82b8e(++_0x1c3239);}(_0x52ba,0x14f));var _0xa52b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x52ba[_0x122ef9];return _0x42fba0;};'use strict';var util=require(_0xa52b('0x0'));var _=require(_0xa52b('0x1'));var moment=require(_0xa52b('0x2'));function getSeconds(_0x27dead,_0x5aed5e){var _0x526020=moment(_0x27dead)[_0xa52b('0x3')](0x0);var _0x40a8b2=moment(_0x5aed5e)['milliseconds'](0x0);return _0x526020['diff'](_0x40a8b2,_0xa52b('0x4'));}function QueueCallerAbandon(_0x2c5dd9,_0x6387c7){this[_0xa52b('0x5')]=_0x2c5dd9[_0xa52b('0x5')];this['type']=_0x2c5dd9[_0xa52b('0x6')];this[_0xa52b('0x7')]=_0x2c5dd9[_0xa52b('0x6')]===_0xa52b('0x8')?_0xa52b('0x9'):_0x2c5dd9[_0xa52b('0x6')];this[_0xa52b('0xa')]=_0x2c5dd9[_0xa52b('0xa')];this['countcongestionretry']=_0x2c5dd9[_0xa52b('0xb')];this[_0xa52b('0xc')]=_0x2c5dd9[_0xa52b('0xc')];this['countglobal']=_0x2c5dd9[_0xa52b('0xa')]+_0x2c5dd9['countcongestionretry']+_0x2c5dd9[_0xa52b('0xc')]+_0x2c5dd9['countnosuchnumberretry']+_0x2c5dd9[_0xa52b('0xd')]+_0x2c5dd9[_0xa52b('0xe')]+_0x2c5dd9[_0xa52b('0xf')]+_0x2c5dd9[_0xa52b('0x10')];this[_0xa52b('0x11')]=_0x2c5dd9[_0xa52b('0x11')];this['countdropretry']=_0x2c5dd9['countdropretry'];this[_0xa52b('0xe')]=_0x2c5dd9[_0xa52b('0xe')];this[_0xa52b('0xf')]=_0x2c5dd9['countmachineretry'];this[_0xa52b('0x10')]=_0x2c5dd9['countagentrejectretry'];this[_0xa52b('0x12')]=_0x6387c7[_0xa52b('0x12')];this[_0xa52b('0x13')]=_0x2c5dd9[_0xa52b('0x14')];this[_0xa52b('0x15')]=_0x2c5dd9[_0xa52b('0x16')];this[_0xa52b('0x17')]=_0x2c5dd9[_0xa52b('0x17')];this[_0xa52b('0x18')]=_0x2c5dd9[_0xa52b('0x18')];this[_0xa52b('0x19')]=_0x2c5dd9['droptime'];this['endtime']=this[_0xa52b('0x19')];this[_0xa52b('0x1a')]=getSeconds(_0x2c5dd9['responsetime'],_0x2c5dd9['starttime']);this['holdtime']=getSeconds(this[_0xa52b('0x19')],_0x2c5dd9[_0xa52b('0x18')]);this[_0xa52b('0x1b')]=0x0;this[_0xa52b('0x9')]=_0x6387c7[_0xa52b('0x9')];this[_0xa52b('0x1c')]=_0x6387c7['connectedlinename'];this[_0xa52b('0x1d')]=_0x6387c7[_0xa52b('0x1d')];this[_0xa52b('0x1e')]=_0x2c5dd9[_0xa52b('0x1e')];this['callbackuniqueid']=_0x2c5dd9[_0xa52b('0x1f')];this['callbackat']=_0x2c5dd9[_0xa52b('0x20')];this['recallme']=_0x2c5dd9['recallme'];this['ContactId']=_0x2c5dd9[_0xa52b('0x21')];this[_0xa52b('0x22')]=_0x2c5dd9[_0xa52b('0x22')];this[_0xa52b('0x23')]=_0x2c5dd9[_0xa52b('0x23')];this[_0xa52b('0x24')]=_0x2c5dd9[_0xa52b('0x24')];this[_0xa52b('0x25')]=_0x2c5dd9[_0xa52b('0x25')];this[_0xa52b('0x26')]=_0x2c5dd9[_0xa52b('0x26')]||'';this[_0xa52b('0x27')]=_0x2c5dd9[_0xa52b('0x27')]||'';}module[_0xa52b('0x28')]=QueueCallerAbandon;