Built motion from commit (unavailable).|2.5.30
[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 _0xa066=['countabandonedretry','uniqueid','calleridname','name','number','starttime','responsetime','droptime','endtime','holdtime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','util','lodash','moment','milliseconds','diff','seconds','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countmachineretry','countagentrejectretry'];(function(_0x12fdbe,_0x204796){var _0x38a758=function(_0x289417){while(--_0x289417){_0x12fdbe['push'](_0x12fdbe['shift']());}};_0x38a758(++_0x204796);}(_0xa066,0x1ea));var _0x6a06=function(_0x3a2bc6,_0xb3d543){_0x3a2bc6=_0x3a2bc6-0x0;var _0x2781d8=_0xa066[_0x3a2bc6];return _0x2781d8;};'use strict';var util=require(_0x6a06('0x0'));var _=require(_0x6a06('0x1'));var moment=require(_0x6a06('0x2'));function getSeconds(_0x406ca0,_0x49616d){var _0x244e4f=moment(_0x406ca0)[_0x6a06('0x3')](0x0);var _0x2da82b=moment(_0x49616d)[_0x6a06('0x3')](0x0);return _0x244e4f[_0x6a06('0x4')](_0x2da82b,_0x6a06('0x5'));}function QueueCallerAbandon(_0x29538c,_0x467230){this['scheduledat']=_0x29538c[_0x6a06('0x6')];this[_0x6a06('0x7')]=_0x29538c[_0x6a06('0x7')];this['campaigntype']=_0x29538c['type']===_0x6a06('0x8')?_0x6a06('0x9'):_0x29538c[_0x6a06('0x7')];this[_0x6a06('0xa')]=_0x29538c[_0x6a06('0xa')];this[_0x6a06('0xb')]=_0x29538c['countcongestionretry'];this[_0x6a06('0xc')]=_0x29538c['countnoanswerretry'];this['countglobal']=_0x29538c[_0x6a06('0xa')]+_0x29538c[_0x6a06('0xb')]+_0x29538c[_0x6a06('0xc')]+_0x29538c[_0x6a06('0xd')]+_0x29538c[_0x6a06('0xe')]+_0x29538c['countabandonedretry']+_0x29538c[_0x6a06('0xf')]+_0x29538c[_0x6a06('0x10')];this[_0x6a06('0xd')]=_0x29538c['countnosuchnumberretry'];this[_0x6a06('0xe')]=_0x29538c[_0x6a06('0xe')];this['countabandonedretry']=_0x29538c[_0x6a06('0x11')];this[_0x6a06('0xf')]=_0x29538c[_0x6a06('0xf')];this['countagentrejectretry']=_0x29538c[_0x6a06('0x10')];this[_0x6a06('0x12')]=_0x467230[_0x6a06('0x12')];this[_0x6a06('0x13')]=_0x29538c[_0x6a06('0x14')];this['calleridnum']=_0x29538c[_0x6a06('0x15')];this[_0x6a06('0x16')]=_0x29538c[_0x6a06('0x16')];this[_0x6a06('0x17')]=_0x29538c[_0x6a06('0x17')];this[_0x6a06('0x18')]=_0x29538c[_0x6a06('0x18')];this[_0x6a06('0x19')]=this[_0x6a06('0x18')];this['ringtime']=getSeconds(_0x29538c[_0x6a06('0x17')],_0x29538c[_0x6a06('0x16')]);this[_0x6a06('0x1a')]=getSeconds(this['droptime'],_0x29538c[_0x6a06('0x17')]);this['talktime']=0x0;this[_0x6a06('0x9')]=_0x467230[_0x6a06('0x9')];this[_0x6a06('0x1b')]=_0x467230['connectedlinename'];this[_0x6a06('0x1c')]=_0x467230['reason'];this[_0x6a06('0x1d')]=_0x29538c[_0x6a06('0x1d')];this['callbackuniqueid']=_0x29538c[_0x6a06('0x1e')];this[_0x6a06('0x1f')]=_0x29538c['callbackat'];this['recallme']=_0x29538c[_0x6a06('0x20')];this[_0x6a06('0x21')]=_0x29538c['ContactId'];this['ListId']=_0x29538c['ListId'];this['UserId']=_0x29538c[_0x6a06('0x22')];this[_0x6a06('0x23')]=_0x29538c[_0x6a06('0x23')];this[_0x6a06('0x24')]=_0x29538c[_0x6a06('0x24')];this[_0x6a06('0x25')]=_0x29538c[_0x6a06('0x25')]||'';this[_0x6a06('0x26')]=_0x29538c[_0x6a06('0x26')]||'';}module['exports']=QueueCallerAbandon;