1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xfc1b=['util','milliseconds','seconds','state','statedesc','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','uniqueid','calleridname','name','calleridnum','starttime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','responsetime','holdtime','talktime','membername','IVR','reason','callback','callbackuniqueid','callbackat','ListId','UserId','VoiceQueueId','CampaignId','exports'];(function(_0xff0fc0,_0x24ef4f){var _0x235508=function(_0x27166f){while(--_0x27166f){_0xff0fc0['push'](_0xff0fc0['shift']());}};_0x235508(++_0x24ef4f);}(_0xfc1b,0xa0));var _0xbfc1=function(_0x34f68d,_0x54b7a5){_0x34f68d=_0x34f68d-0x0;var _0x1d4342=_0xfc1b[_0x34f68d];return _0x1d4342;};'use strict';var util=require(_0xbfc1('0x0'));var _=require('lodash');var moment=require('moment');function getSeconds(_0x4594a0,_0x2da376){var _0x4022b7=moment(_0x4594a0)[_0xbfc1('0x1')](0x0);var _0x954362=moment(_0x2da376)['milliseconds'](0x0);return _0x4022b7['diff'](_0x954362,_0xbfc1('0x2'));}function Hangup(_0x1f6964,_0x2c3cd1){this[_0xbfc1('0x3')]=0x4;this[_0xbfc1('0x4')]='Answer';this[_0xbfc1('0x5')]=_0x1f6964[_0xbfc1('0x5')];this[_0xbfc1('0x6')]=_0x1f6964[_0xbfc1('0x6')];this[_0xbfc1('0x7')]=_0x1f6964[_0xbfc1('0x6')]==='outbound'?_0xbfc1('0x8'):_0x1f6964[_0xbfc1('0x6')];this[_0xbfc1('0x9')]=_0x1f6964[_0xbfc1('0x9')];this[_0xbfc1('0xa')]=_0x1f6964[_0xbfc1('0xa')];this[_0xbfc1('0xb')]=_0x1f6964['countnoanswerretry'];this[_0xbfc1('0xc')]=_0x1f6964[_0xbfc1('0x9')]+_0x1f6964['countcongestionretry']+_0x1f6964['countnoanswerretry']+_0x1f6964[_0xbfc1('0xd')]+_0x1f6964['countdropretry']+_0x1f6964[_0xbfc1('0xe')]+_0x1f6964[_0xbfc1('0xf')]+_0x1f6964[_0xbfc1('0x10')];this['countnosuchnumberretry']=_0x1f6964[_0xbfc1('0xd')];this[_0xbfc1('0x11')]=_0x1f6964[_0xbfc1('0x11')];this[_0xbfc1('0xe')]=_0x1f6964['countabandonedretry'];this[_0xbfc1('0xf')]=_0x1f6964[_0xbfc1('0xf')];this['countagentrejectretry']=_0x1f6964['countagentrejectretry'];this[_0xbfc1('0x12')]=_0x2c3cd1[_0xbfc1('0x12')];this[_0xbfc1('0x13')]=_0x1f6964[_0xbfc1('0x14')];this[_0xbfc1('0x15')]=_0x1f6964['number'];this[_0xbfc1('0x16')]=_0x1f6964['starttime'];this['responsetime']=_0x1f6964['responsetime'];this[_0xbfc1('0x17')]=moment()[_0xbfc1('0x18')](_0xbfc1('0x19'));this['ringtime']=getSeconds(_0x1f6964[_0xbfc1('0x1a')],_0x1f6964[_0xbfc1('0x16')]);this[_0xbfc1('0x1b')]=0x0;this[_0xbfc1('0x1c')]=getSeconds(this['endtime'],_0x1f6964[_0xbfc1('0x1a')]);this[_0xbfc1('0x8')]=_0x1f6964[_0xbfc1('0x8')];this[_0xbfc1('0x1d')]=_0xbfc1('0x1e');this[_0xbfc1('0x1f')]=_0x2c3cd1['cause-txt'];this[_0xbfc1('0x20')]=_0x1f6964['callback'];this[_0xbfc1('0x21')]=_0x1f6964[_0xbfc1('0x21')];this[_0xbfc1('0x22')]=_0x1f6964[_0xbfc1('0x22')];this['recallme']=_0x1f6964['recallme'];this['ContactId']=_0x1f6964['ContactId'];this['ListId']=_0x1f6964[_0xbfc1('0x23')];this[_0xbfc1('0x24')]=_0x1f6964[_0xbfc1('0x24')];this[_0xbfc1('0x25')]=_0x1f6964[_0xbfc1('0x25')];this['CampaignId']=_0x1f6964[_0xbfc1('0x26')];}module[_0xbfc1('0x27')]=Hangup;