Built motion from commit (unavailable).|2.3.2
[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 _0x2572=['callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','moment','diff','seconds','scheduledat','type','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','uniqueid','name','calleridnum','starttime','responsetime','droptime','ringtime','talktime','queue','reason','callback','callbackuniqueid'];(function(_0x181b1e,_0x160c56){var _0x1ad7bf=function(_0x59cae9){while(--_0x59cae9){_0x181b1e['push'](_0x181b1e['shift']());}};_0x1ad7bf(++_0x160c56);}(_0x2572,0x154));var _0x2257=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0x2572[_0x2bf141];return _0x48277b;};'use strict';var util=require('util');var _=require(_0x2257('0x0'));var moment=require(_0x2257('0x1'));function getSeconds(_0x562a8d,_0x4587b1){var _0x4c951d=moment(_0x562a8d)['milliseconds'](0x0);var _0x18207b=moment(_0x4587b1)['milliseconds'](0x0);return _0x4c951d[_0x2257('0x2')](_0x18207b,_0x2257('0x3'));}function QueueCallerAbandon(_0x5cc243,_0x1d9c43){this[_0x2257('0x4')]=_0x5cc243['scheduledat'];this[_0x2257('0x5')]=_0x5cc243['type'];this['campaigntype']=_0x5cc243['type']===_0x2257('0x6')?'queue':_0x5cc243[_0x2257('0x5')];this[_0x2257('0x7')]=_0x5cc243[_0x2257('0x7')];this[_0x2257('0x8')]=_0x5cc243[_0x2257('0x8')];this[_0x2257('0x9')]=_0x5cc243[_0x2257('0x9')];this[_0x2257('0xa')]=_0x5cc243['countbusyretry']+_0x5cc243[_0x2257('0x8')]+_0x5cc243[_0x2257('0x9')];this[_0x2257('0xb')]=_0x1d9c43['uniqueid'];this['calleridname']=_0x5cc243[_0x2257('0xc')];this[_0x2257('0xd')]=_0x5cc243['number'];this[_0x2257('0xe')]=_0x5cc243[_0x2257('0xe')];this['responsetime']=_0x5cc243[_0x2257('0xf')];this[_0x2257('0x10')]=_0x5cc243[_0x2257('0x10')];this['endtime']=this['droptime'];this[_0x2257('0x11')]=getSeconds(_0x5cc243['responsetime'],_0x5cc243[_0x2257('0xe')]);this['holdtime']=getSeconds(this[_0x2257('0x10')],_0x5cc243[_0x2257('0xf')]);this[_0x2257('0x12')]=0x0;this[_0x2257('0x13')]=_0x1d9c43[_0x2257('0x13')];this['membername']=_0x1d9c43['connectedlinename'];this[_0x2257('0x14')]=_0x1d9c43['reason'];this[_0x2257('0x15')]=_0x5cc243[_0x2257('0x15')];this['callbackuniqueid']=_0x5cc243[_0x2257('0x16')];this[_0x2257('0x17')]=_0x5cc243['callbackat'];this[_0x2257('0x18')]=_0x5cc243[_0x2257('0x18')];this[_0x2257('0x19')]=_0x5cc243[_0x2257('0x19')];this[_0x2257('0x1a')]=_0x5cc243['ListId'];this['UserId']=_0x5cc243[_0x2257('0x1b')];this['VoiceQueueId']=_0x5cc243[_0x2257('0x1c')];this['CampaignId']=_0x5cc243[_0x2257('0x1d')];this[_0x2257('0x1e')]=_0x5cc243[_0x2257('0x1e')]||'';this[_0x2257('0x1f')]=_0x5cc243[_0x2257('0x1f')]||'';}module[_0x2257('0x20')]=QueueCallerAbandon;