Built motion from commit (unavailable).|2.1.0
[motion2.git] / server / services / ami / dialer / agentComplete.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 _0xaeb4=['membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','lodash','moment','milliseconds','diff','state','statedesc','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','uniqueid','name','calleridnum','number','starttime','responsetime','answertime','endtime','format','ringtime','talktime','queue'];(function(_0x5433bb,_0x5503e4){var _0x10176a=function(_0x1426cc){while(--_0x1426cc){_0x5433bb['push'](_0x5433bb['shift']());}};_0x10176a(++_0x5503e4);}(_0xaeb4,0x82));var _0x4aeb=function(_0x249e96,_0x3ea39d){_0x249e96=_0x249e96-0x0;var _0x17444c=_0xaeb4[_0x249e96];return _0x17444c;};'use strict';var util=require('util');var _=require(_0x4aeb('0x0'));var moment=require(_0x4aeb('0x1'));function getSeconds(_0x22e8cc,_0x4f8de4){var _0x313585=moment(_0x22e8cc)[_0x4aeb('0x2')](0x0);var _0x243eb3=moment(_0x4f8de4)[_0x4aeb('0x2')](0x0);return _0x313585[_0x4aeb('0x3')](_0x243eb3,'seconds');}function AgentComplete(_0x141c89,_0x48bc7e){this[_0x4aeb('0x4')]=0x4;this[_0x4aeb('0x5')]='Answer';this['scheduledat']=_0x141c89[_0x4aeb('0x6')];this['type']=_0x141c89[_0x4aeb('0x7')];this[_0x4aeb('0x8')]=_0x141c89[_0x4aeb('0x7')]===_0x4aeb('0x9')?'queue':_0x141c89['type'];this[_0x4aeb('0xa')]=_0x141c89[_0x4aeb('0xa')];this[_0x4aeb('0xb')]=_0x141c89[_0x4aeb('0xb')];this[_0x4aeb('0xc')]=_0x141c89[_0x4aeb('0xc')];this[_0x4aeb('0xd')]=_0x141c89[_0x4aeb('0xa')]+_0x141c89[_0x4aeb('0xb')]+_0x141c89[_0x4aeb('0xc')];this['uniqueid']=_0x48bc7e[_0x4aeb('0xe')];this['calleridname']=_0x141c89[_0x4aeb('0xf')];this[_0x4aeb('0x10')]=_0x141c89[_0x4aeb('0x11')];this['starttime']=_0x141c89[_0x4aeb('0x12')];this[_0x4aeb('0x13')]=_0x141c89['responsetime'];this[_0x4aeb('0x14')]=_0x141c89[_0x4aeb('0x14')];this[_0x4aeb('0x15')]=moment()[_0x4aeb('0x16')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x4aeb('0x17')]=getSeconds(_0x141c89['responsetime'],_0x141c89[_0x4aeb('0x12')]);this['holdtime']=getSeconds(_0x141c89[_0x4aeb('0x14')],_0x141c89[_0x4aeb('0x13')]);this[_0x4aeb('0x18')]=getSeconds(this[_0x4aeb('0x15')],_0x141c89['answertime']);this[_0x4aeb('0x19')]=_0x48bc7e[_0x4aeb('0x19')];this[_0x4aeb('0x1a')]=_0x48bc7e[_0x4aeb('0x1a')];this[_0x4aeb('0x1b')]=_0x48bc7e[_0x4aeb('0x1b')];this[_0x4aeb('0x1c')]=_0x141c89[_0x4aeb('0x1c')];this[_0x4aeb('0x1d')]=_0x141c89[_0x4aeb('0x1d')];this[_0x4aeb('0x1e')]=_0x141c89[_0x4aeb('0x1e')];this[_0x4aeb('0x1f')]=_0x141c89[_0x4aeb('0x1f')];this[_0x4aeb('0x20')]=_0x141c89[_0x4aeb('0x20')];this['ListId']=_0x141c89[_0x4aeb('0x21')];this['UserId']=_0x141c89[_0x4aeb('0x22')];this['VoiceQueueId']=_0x141c89[_0x4aeb('0x23')];this[_0x4aeb('0x24')]=_0x141c89[_0x4aeb('0x24')];this['originatecalleridnum']=_0x141c89[_0x4aeb('0x25')]||'';this[_0x4aeb('0x26')]=_0x141c89['originatecalleridname']||'';}module['exports']=AgentComplete;