9d764e10b58e9553b614dcab37eae684b52504c2
[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 _0x38b6=['holdtime','talktime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','moment','milliseconds','diff','seconds','scheduledat','campaigntype','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','starttime','responsetime','droptime','endtime','ringtime'];(function(_0x17406a,_0x1e2320){var _0x1501ff=function(_0x4b075a){while(--_0x4b075a){_0x17406a['push'](_0x17406a['shift']());}};_0x1501ff(++_0x1e2320);}(_0x38b6,0xed));var _0x638b=function(_0x4c6064,_0x4e89dc){_0x4c6064=_0x4c6064-0x0;var _0x5aaaa6=_0x38b6[_0x4c6064];return _0x5aaaa6;};'use strict';var util=require(_0x638b('0x0'));var _=require('lodash');var moment=require(_0x638b('0x1'));function getSeconds(_0x3e102e,_0xf4855e){var _0x4315ff=moment(_0x3e102e)[_0x638b('0x2')](0x0);var _0x46e3c2=moment(_0xf4855e)['milliseconds'](0x0);return _0x4315ff[_0x638b('0x3')](_0x46e3c2,_0x638b('0x4'));}function QueueCallerAbandon(_0x3cec9b,_0x595c3f){this[_0x638b('0x5')]=_0x3cec9b[_0x638b('0x5')];this['type']=_0x3cec9b['type'];this[_0x638b('0x6')]=_0x3cec9b[_0x638b('0x7')]===_0x638b('0x8')?_0x638b('0x9'):_0x3cec9b[_0x638b('0x7')];this[_0x638b('0xa')]=_0x3cec9b[_0x638b('0xa')];this[_0x638b('0xb')]=_0x3cec9b[_0x638b('0xb')];this['countnoanswerretry']=_0x3cec9b[_0x638b('0xc')];this['countglobal']=_0x3cec9b[_0x638b('0xa')]+_0x3cec9b['countcongestionretry']+_0x3cec9b['countnoanswerretry']+_0x3cec9b[_0x638b('0xd')]+_0x3cec9b[_0x638b('0xe')]+_0x3cec9b[_0x638b('0xf')]+_0x3cec9b[_0x638b('0x10')]+_0x3cec9b['countagentrejectretry'];this['countnosuchnumberretry']=_0x3cec9b[_0x638b('0xd')];this[_0x638b('0xe')]=_0x3cec9b['countdropretry'];this[_0x638b('0xf')]=_0x3cec9b['countabandonedretry'];this[_0x638b('0x10')]=_0x3cec9b[_0x638b('0x10')];this[_0x638b('0x11')]=_0x3cec9b[_0x638b('0x11')];this[_0x638b('0x12')]=_0x595c3f[_0x638b('0x12')];this[_0x638b('0x13')]=_0x3cec9b[_0x638b('0x14')];this[_0x638b('0x15')]=_0x3cec9b['number'];this[_0x638b('0x16')]=_0x3cec9b['starttime'];this[_0x638b('0x17')]=_0x3cec9b['responsetime'];this[_0x638b('0x18')]=_0x3cec9b[_0x638b('0x18')];this[_0x638b('0x19')]=this[_0x638b('0x18')];this[_0x638b('0x1a')]=getSeconds(_0x3cec9b['responsetime'],_0x3cec9b[_0x638b('0x16')]);this[_0x638b('0x1b')]=getSeconds(this[_0x638b('0x18')],_0x3cec9b[_0x638b('0x17')]);this[_0x638b('0x1c')]=0x0;this[_0x638b('0x9')]=_0x595c3f[_0x638b('0x9')];this[_0x638b('0x1d')]=_0x595c3f[_0x638b('0x1e')];this[_0x638b('0x1f')]=_0x595c3f['reason'];this[_0x638b('0x20')]=_0x3cec9b[_0x638b('0x20')];this[_0x638b('0x21')]=_0x3cec9b[_0x638b('0x21')];this['callbackat']=_0x3cec9b[_0x638b('0x22')];this['recallme']=_0x3cec9b[_0x638b('0x23')];this[_0x638b('0x24')]=_0x3cec9b[_0x638b('0x24')];this[_0x638b('0x25')]=_0x3cec9b[_0x638b('0x25')];this[_0x638b('0x26')]=_0x3cec9b[_0x638b('0x26')];this[_0x638b('0x27')]=_0x3cec9b[_0x638b('0x27')];this[_0x638b('0x28')]=_0x3cec9b[_0x638b('0x28')];this['originatecalleridnum']=_0x3cec9b[_0x638b('0x29')]||'';this[_0x638b('0x2a')]=_0x3cec9b[_0x638b('0x2a')]||'';}module[_0x638b('0x2b')]=QueueCallerAbandon;