c739b7c412b93e8bb740771796b883dd66e97061
[motion2.git] / server / services / ami / dialer / final.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 _0x43c4=['ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','diff','seconds','uniqueid','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countagentrejectretry','countabandonedretry','countmachineretry','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme'];(function(_0x44fef1,_0x132cf4){var _0x3c3a04=function(_0x175a90){while(--_0x175a90){_0x44fef1['push'](_0x44fef1['shift']());}};_0x3c3a04(++_0x132cf4);}(_0x43c4,0x15e));var _0x443c=function(_0x4e6bbd,_0x5b9f7f){_0x4e6bbd=_0x4e6bbd-0x0;var _0xd7cfdb=_0x43c4[_0x4e6bbd];return _0xd7cfdb;};'use strict';var util=require(_0x443c('0x0'));var _=require(_0x443c('0x1'));var moment=require(_0x443c('0x2'));function getSeconds(_0x50fc7f,_0x24fd05){var _0x4cabfc=moment(_0x50fc7f)[_0x443c('0x3')](0x0);var _0x274d6a=moment(_0x24fd05)[_0x443c('0x3')](0x0);return _0x4cabfc[_0x443c('0x4')](_0x274d6a,_0x443c('0x5'));}function Final(_0x29dddc){this[_0x443c('0x6')]=_0x29dddc[_0x443c('0x6')];this[_0x443c('0x7')]=_0x29dddc['scheduledat'];this[_0x443c('0x8')]=_0x29dddc[_0x443c('0x8')];this[_0x443c('0x9')]=_0x29dddc[_0x443c('0x8')]==='outbound'?_0x443c('0xa'):_0x29dddc[_0x443c('0x8')];this[_0x443c('0xb')]=_0x29dddc['countbusyretry'];this[_0x443c('0xc')]=_0x29dddc['countcongestionretry'];this[_0x443c('0xd')]=_0x29dddc['countnoanswerretry'];this[_0x443c('0xe')]=_0x29dddc[_0x443c('0xb')]+_0x29dddc['countcongestionretry']+_0x29dddc[_0x443c('0xd')]+_0x29dddc[_0x443c('0xf')]+_0x29dddc['countdropretry']+_0x29dddc['countabandonedretry']+_0x29dddc['countmachineretry']+_0x29dddc[_0x443c('0x10')];this[_0x443c('0xf')]=_0x29dddc[_0x443c('0xf')];this['countdropretry']=_0x29dddc['countdropretry'];this[_0x443c('0x11')]=_0x29dddc[_0x443c('0x11')];this[_0x443c('0x12')]=_0x29dddc[_0x443c('0x12')];this[_0x443c('0x10')]=_0x29dddc[_0x443c('0x10')];this[_0x443c('0xa')]=_0x29dddc[_0x443c('0xa')];this['calleridname']=_0x29dddc['calleridname'];this['calleridnum']=_0x29dddc[_0x443c('0x13')];this[_0x443c('0x14')]=_0x29dddc['starttime'];this[_0x443c('0x15')]=_0x29dddc['responsetime'];this[_0x443c('0x16')]=_0x29dddc[_0x443c('0x15')];this[_0x443c('0x17')]=_0x29dddc[_0x443c('0x17')]||0x0;this['holdtime']=_0x29dddc[_0x443c('0x18')]||0x0;this[_0x443c('0x19')]=_0x29dddc[_0x443c('0x19')]||0x0;this[_0x443c('0x1a')]=_0x29dddc[_0x443c('0x1a')];this[_0x443c('0x1b')]=_0x29dddc['callbackuniqueid'];this[_0x443c('0x1c')]=_0x29dddc[_0x443c('0x1c')];this[_0x443c('0x1d')]=_0x29dddc[_0x443c('0x1d')];this[_0x443c('0x1e')]=_0x29dddc['ContactId'];this[_0x443c('0x1f')]=_0x29dddc[_0x443c('0x1f')];this[_0x443c('0x20')]=_0x29dddc[_0x443c('0x20')];this['VoiceQueueId']=_0x29dddc[_0x443c('0x21')];this['CampaignId']=_0x29dddc[_0x443c('0x22')];this[_0x443c('0x23')]=_0x29dddc[_0x443c('0x23')]||'';this[_0x443c('0x24')]=_0x29dddc['originatecalleridname']||'';}module[_0x443c('0x25')]=Final;