Built motion from commit 896e83a8.|2.6.30
[motion2.git] / server / services / ami / dialer / models / 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 _0xb9a3=['ListId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','exports','moment','../utils','statedesc','Answer','scheduledat','type','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','starttime','answertime','format','YYYY-MM-DD\x20HH:mm:ss','getSeconds','holdtime','responsetime','talktime','endtime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0xb9a3,0xb7));var _0x3b9a=function(_0x1e93dc,_0x1457ad){_0x1e93dc=_0x1e93dc-0x0;var _0x160131=_0xb9a3[_0x1e93dc];return _0x160131;};'use strict';var moment=require(_0x3b9a('0x0'));var utils=require(_0x3b9a('0x1'));function AgentComplete(_0x2af0d3,_0x5a844e){this['state']=0x4;this[_0x3b9a('0x2')]=_0x3b9a('0x3');this[_0x3b9a('0x4')]=_0x2af0d3['scheduledat'];this[_0x3b9a('0x5')]=_0x2af0d3[_0x3b9a('0x5')];this['campaigntype']=_0x2af0d3[_0x3b9a('0x5')]==='outbound'?_0x3b9a('0x6'):_0x2af0d3[_0x3b9a('0x5')];this['countbusyretry']=_0x2af0d3[_0x3b9a('0x7')];this[_0x3b9a('0x8')]=_0x2af0d3[_0x3b9a('0x8')];this['countnoanswerretry']=_0x2af0d3[_0x3b9a('0x9')];this[_0x3b9a('0xa')]=_0x2af0d3[_0x3b9a('0x7')]+_0x2af0d3[_0x3b9a('0x8')]+_0x2af0d3[_0x3b9a('0x9')]+_0x2af0d3[_0x3b9a('0xb')]+_0x2af0d3[_0x3b9a('0xc')]+_0x2af0d3[_0x3b9a('0xd')]+_0x2af0d3[_0x3b9a('0xe')]+_0x2af0d3[_0x3b9a('0xf')];this[_0x3b9a('0xb')]=_0x2af0d3[_0x3b9a('0xb')];this[_0x3b9a('0xc')]=_0x2af0d3['countdropretry'];this[_0x3b9a('0xd')]=_0x2af0d3[_0x3b9a('0xd')];this[_0x3b9a('0xe')]=_0x2af0d3['countmachineretry'];this[_0x3b9a('0xf')]=_0x2af0d3['countagentrejectretry'];this[_0x3b9a('0x10')]=_0x5a844e[_0x3b9a('0x10')];this[_0x3b9a('0x11')]=_0x2af0d3[_0x3b9a('0x12')];this[_0x3b9a('0x13')]=_0x2af0d3[_0x3b9a('0x14')];this[_0x3b9a('0x15')]=_0x2af0d3[_0x3b9a('0x15')];this['responsetime']=_0x2af0d3['responsetime'];this[_0x3b9a('0x16')]=_0x2af0d3['answertime'];this['endtime']=moment()[_0x3b9a('0x17')](_0x3b9a('0x18'));this['ringtime']=utils[_0x3b9a('0x19')](_0x2af0d3['responsetime'],_0x2af0d3[_0x3b9a('0x15')]);this[_0x3b9a('0x1a')]=utils['getSeconds'](_0x2af0d3[_0x3b9a('0x16')],_0x2af0d3[_0x3b9a('0x1b')]);this[_0x3b9a('0x1c')]=utils[_0x3b9a('0x19')](this[_0x3b9a('0x1d')],_0x2af0d3[_0x3b9a('0x16')]);this[_0x3b9a('0x6')]=_0x5a844e['queue'];this[_0x3b9a('0x1e')]=_0x5a844e['membername'];this[_0x3b9a('0x1f')]=_0x5a844e[_0x3b9a('0x1f')];this[_0x3b9a('0x20')]=_0x2af0d3[_0x3b9a('0x20')];this[_0x3b9a('0x21')]=_0x2af0d3[_0x3b9a('0x21')];this['callbackat']=_0x2af0d3[_0x3b9a('0x22')];this[_0x3b9a('0x23')]=_0x2af0d3['recallme'];this[_0x3b9a('0x24')]=_0x2af0d3[_0x3b9a('0x24')];this[_0x3b9a('0x25')]=_0x2af0d3['ListId'];this['UserId']=_0x2af0d3['UserId'];this[_0x3b9a('0x26')]=_0x2af0d3[_0x3b9a('0x26')];this[_0x3b9a('0x27')]=_0x2af0d3[_0x3b9a('0x27')];this[_0x3b9a('0x28')]=_0x2af0d3[_0x3b9a('0x28')]||'';this[_0x3b9a('0x29')]=_0x2af0d3[_0x3b9a('0x29')]||'';this[_0x3b9a('0x2a')]=_0x2af0d3[_0x3b9a('0x2a')];}module[_0x3b9a('0x2b')]=AgentComplete;