Built motion from commit (unavailable).|2.5.30
[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 _0x955b=['UserId','VoiceQueueId','CampaignId','originatecalleridname','exports','lodash','moment','milliseconds','diff','state','statedesc','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','answertime','endtime','format','ringtime','holdtime','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId'];(function(_0x5d27bc,_0x3a7b60){var _0x5734cc=function(_0xcc5c8f){while(--_0xcc5c8f){_0x5d27bc['push'](_0x5d27bc['shift']());}};_0x5734cc(++_0x3a7b60);}(_0x955b,0x1c7));var _0xb955=function(_0x21b575,_0x3ab3ca){_0x21b575=_0x21b575-0x0;var _0x18f4a6=_0x955b[_0x21b575];return _0x18f4a6;};'use strict';var util=require('util');var _=require(_0xb955('0x0'));var moment=require(_0xb955('0x1'));function getSeconds(_0x55c29a,_0x2d329d){var _0x426dab=moment(_0x55c29a)[_0xb955('0x2')](0x0);var _0x25958b=moment(_0x2d329d)[_0xb955('0x2')](0x0);return _0x426dab[_0xb955('0x3')](_0x25958b,'seconds');}function AgentComplete(_0x3e8000,_0x31ac50){this[_0xb955('0x4')]=0x4;this[_0xb955('0x5')]='Answer';this['scheduledat']=_0x3e8000[_0xb955('0x6')];this[_0xb955('0x7')]=_0x3e8000[_0xb955('0x7')];this[_0xb955('0x8')]=_0x3e8000[_0xb955('0x7')]===_0xb955('0x9')?_0xb955('0xa'):_0x3e8000[_0xb955('0x7')];this[_0xb955('0xb')]=_0x3e8000[_0xb955('0xb')];this[_0xb955('0xc')]=_0x3e8000['countcongestionretry'];this[_0xb955('0xd')]=_0x3e8000[_0xb955('0xd')];this[_0xb955('0xe')]=_0x3e8000[_0xb955('0xb')]+_0x3e8000[_0xb955('0xc')]+_0x3e8000[_0xb955('0xd')]+_0x3e8000[_0xb955('0xf')]+_0x3e8000[_0xb955('0x10')]+_0x3e8000[_0xb955('0x11')]+_0x3e8000['countmachineretry']+_0x3e8000[_0xb955('0x12')];this[_0xb955('0xf')]=_0x3e8000[_0xb955('0xf')];this['countdropretry']=_0x3e8000[_0xb955('0x10')];this['countabandonedretry']=_0x3e8000[_0xb955('0x11')];this['countmachineretry']=_0x3e8000[_0xb955('0x13')];this['countagentrejectretry']=_0x3e8000[_0xb955('0x12')];this[_0xb955('0x14')]=_0x31ac50[_0xb955('0x14')];this[_0xb955('0x15')]=_0x3e8000['name'];this[_0xb955('0x16')]=_0x3e8000[_0xb955('0x17')];this[_0xb955('0x18')]=_0x3e8000[_0xb955('0x18')];this[_0xb955('0x19')]=_0x3e8000[_0xb955('0x19')];this[_0xb955('0x1a')]=_0x3e8000['answertime'];this[_0xb955('0x1b')]=moment()[_0xb955('0x1c')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xb955('0x1d')]=getSeconds(_0x3e8000[_0xb955('0x19')],_0x3e8000['starttime']);this[_0xb955('0x1e')]=getSeconds(_0x3e8000[_0xb955('0x1a')],_0x3e8000[_0xb955('0x19')]);this[_0xb955('0x1f')]=getSeconds(this['endtime'],_0x3e8000[_0xb955('0x1a')]);this[_0xb955('0xa')]=_0x31ac50[_0xb955('0xa')];this[_0xb955('0x20')]=_0x31ac50['membername'];this[_0xb955('0x21')]=_0x31ac50[_0xb955('0x21')];this[_0xb955('0x22')]=_0x3e8000[_0xb955('0x22')];this['callbackuniqueid']=_0x3e8000[_0xb955('0x23')];this[_0xb955('0x24')]=_0x3e8000[_0xb955('0x24')];this[_0xb955('0x25')]=_0x3e8000[_0xb955('0x25')];this[_0xb955('0x26')]=_0x3e8000[_0xb955('0x26')];this[_0xb955('0x27')]=_0x3e8000[_0xb955('0x27')];this[_0xb955('0x28')]=_0x3e8000[_0xb955('0x28')];this[_0xb955('0x29')]=_0x3e8000[_0xb955('0x29')];this[_0xb955('0x2a')]=_0x3e8000[_0xb955('0x2a')];this['originatecalleridnum']=_0x3e8000['originatecalleridnum']||'';this['originatecalleridname']=_0x3e8000[_0xb955('0x2b')]||'';}module[_0xb955('0x2c')]=AgentComplete;