Built motion from commit 5293bb2a.|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 _0x4246=['scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countmachineretry','countabandonedretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','answertime','endtime','format','ringtime','getSeconds','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','exports','moment','../utils','Answer'];(function(_0x58128a,_0x8ab991){var _0x56f353=function(_0x925531){while(--_0x925531){_0x58128a['push'](_0x58128a['shift']());}};_0x56f353(++_0x8ab991);}(_0x4246,0xd4));var _0x6424=function(_0x2f80e7,_0x349c8d){_0x2f80e7=_0x2f80e7-0x0;var _0x5a7fa2=_0x4246[_0x2f80e7];return _0x5a7fa2;};'use strict';var moment=require(_0x6424('0x0'));var utils=require(_0x6424('0x1'));function AgentComplete(_0x46ed1c,_0x1660e2){this['state']=0x4;this['statedesc']=_0x6424('0x2');this[_0x6424('0x3')]=_0x46ed1c[_0x6424('0x3')];this[_0x6424('0x4')]=_0x46ed1c[_0x6424('0x4')];this['campaigntype']=_0x46ed1c[_0x6424('0x4')]===_0x6424('0x5')?_0x6424('0x6'):_0x46ed1c[_0x6424('0x4')];this[_0x6424('0x7')]=_0x46ed1c[_0x6424('0x7')];this[_0x6424('0x8')]=_0x46ed1c[_0x6424('0x8')];this[_0x6424('0x9')]=_0x46ed1c[_0x6424('0x9')];this['countglobal']=_0x46ed1c['countbusyretry']+_0x46ed1c[_0x6424('0x8')]+_0x46ed1c['countnoanswerretry']+_0x46ed1c[_0x6424('0xa')]+_0x46ed1c[_0x6424('0xb')]+_0x46ed1c['countabandonedretry']+_0x46ed1c[_0x6424('0xc')]+_0x46ed1c['countagentrejectretry'];this[_0x6424('0xa')]=_0x46ed1c[_0x6424('0xa')];this[_0x6424('0xb')]=_0x46ed1c['countdropretry'];this[_0x6424('0xd')]=_0x46ed1c[_0x6424('0xd')];this[_0x6424('0xc')]=_0x46ed1c[_0x6424('0xc')];this[_0x6424('0xe')]=_0x46ed1c[_0x6424('0xe')];this['uniqueid']=_0x1660e2[_0x6424('0xf')];this[_0x6424('0x10')]=_0x46ed1c[_0x6424('0x11')];this[_0x6424('0x12')]=_0x46ed1c[_0x6424('0x13')];this[_0x6424('0x14')]=_0x46ed1c[_0x6424('0x14')];this[_0x6424('0x15')]=_0x46ed1c[_0x6424('0x15')];this['answertime']=_0x46ed1c[_0x6424('0x16')];this[_0x6424('0x17')]=moment()[_0x6424('0x18')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x6424('0x19')]=utils[_0x6424('0x1a')](_0x46ed1c[_0x6424('0x15')],_0x46ed1c[_0x6424('0x14')]);this['holdtime']=utils['getSeconds'](_0x46ed1c[_0x6424('0x16')],_0x46ed1c[_0x6424('0x15')]);this[_0x6424('0x1b')]=utils[_0x6424('0x1a')](this[_0x6424('0x17')],_0x46ed1c[_0x6424('0x16')]);this[_0x6424('0x6')]=_0x1660e2[_0x6424('0x6')];this['membername']=_0x1660e2[_0x6424('0x1c')];this['reason']=_0x1660e2[_0x6424('0x1d')];this[_0x6424('0x1e')]=_0x46ed1c[_0x6424('0x1e')];this[_0x6424('0x1f')]=_0x46ed1c[_0x6424('0x1f')];this[_0x6424('0x20')]=_0x46ed1c[_0x6424('0x20')];this['recallme']=_0x46ed1c[_0x6424('0x21')];this[_0x6424('0x22')]=_0x46ed1c['ContactId'];this[_0x6424('0x23')]=_0x46ed1c['ListId'];this[_0x6424('0x24')]=_0x46ed1c['UserId'];this[_0x6424('0x25')]=_0x46ed1c[_0x6424('0x25')];this[_0x6424('0x26')]=_0x46ed1c[_0x6424('0x26')];this['originatecalleridnum']=_0x46ed1c[_0x6424('0x27')]||'';this[_0x6424('0x28')]=_0x46ed1c[_0x6424('0x28')]||'';this['agiafterat']=_0x46ed1c[_0x6424('0x29')];}module[_0x6424('0x2a')]=AgentComplete;