93e1da8460af35080c474f6d146da6cb8201919d
[motion2.git] / server / services / ami / dialer / models / hangup.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 _0xcf38=['ringtime','getSeconds','holdtime','talktime','membername','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','CampaignId','moment','../utils','state','Answer','scheduledat','type','outbound','queue','amd','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x36c5b0,_0x5001da){var _0xf19333=function(_0x1e880a){while(--_0x1e880a){_0x36c5b0['push'](_0x36c5b0['shift']());}};_0xf19333(++_0x5001da);}(_0xcf38,0x12c));var _0x8cf3=function(_0x4250b4,_0x3fd543){_0x4250b4=_0x4250b4-0x0;var _0x8a4807=_0xcf38[_0x4250b4];return _0x8a4807;};'use strict';var moment=require(_0x8cf3('0x0'));var utils=require(_0x8cf3('0x1'));function Hangup(_0x382b2d,_0x2e9a42){this[_0x8cf3('0x2')]=0x4;this['statedesc']=_0x8cf3('0x3');this[_0x8cf3('0x4')]=_0x382b2d[_0x8cf3('0x4')];this[_0x8cf3('0x5')]=_0x382b2d[_0x8cf3('0x5')];this['campaigntype']=_0x382b2d[_0x8cf3('0x5')]===_0x8cf3('0x6')?_0x8cf3('0x7'):_0x382b2d[_0x8cf3('0x5')];this[_0x8cf3('0x8')]=_0x382b2d['amd']||![];this[_0x8cf3('0x9')]=_0x382b2d[_0x8cf3('0x9')];this[_0x8cf3('0xa')]=_0x382b2d[_0x8cf3('0xa')];this[_0x8cf3('0xb')]=_0x382b2d[_0x8cf3('0xb')];this[_0x8cf3('0xc')]=_0x382b2d[_0x8cf3('0x9')]+_0x382b2d[_0x8cf3('0xa')]+_0x382b2d['countnoanswerretry']+_0x382b2d['countnosuchnumberretry']+_0x382b2d[_0x8cf3('0xd')]+_0x382b2d[_0x8cf3('0xe')]+_0x382b2d[_0x8cf3('0xf')]+_0x382b2d[_0x8cf3('0x10')];this[_0x8cf3('0x11')]=_0x382b2d[_0x8cf3('0x11')];this['countdropretry']=_0x382b2d[_0x8cf3('0xd')];this['countabandonedretry']=_0x382b2d[_0x8cf3('0xe')];this[_0x8cf3('0xf')]=_0x382b2d['countmachineretry'];this['countagentrejectretry']=_0x382b2d['countagentrejectretry'];this['uniqueid']=_0x2e9a42[_0x8cf3('0x12')];this[_0x8cf3('0x13')]=_0x382b2d[_0x8cf3('0x14')];this[_0x8cf3('0x15')]=_0x382b2d[_0x8cf3('0x16')];this[_0x8cf3('0x17')]=_0x382b2d[_0x8cf3('0x17')];this['responsetime']=_0x382b2d[_0x8cf3('0x18')];this[_0x8cf3('0x19')]=moment()[_0x8cf3('0x1a')](_0x8cf3('0x1b'));this[_0x8cf3('0x1c')]=utils[_0x8cf3('0x1d')](_0x382b2d['responsetime'],_0x382b2d[_0x8cf3('0x17')]);this[_0x8cf3('0x1e')]=0x0;this[_0x8cf3('0x1f')]=utils[_0x8cf3('0x1d')](this['endtime'],_0x382b2d[_0x8cf3('0x18')]);this[_0x8cf3('0x7')]=_0x382b2d['queue'];this[_0x8cf3('0x20')]='IVR';this['reason']=_0x2e9a42[_0x8cf3('0x21')];this[_0x8cf3('0x22')]=_0x382b2d[_0x8cf3('0x22')];this[_0x8cf3('0x23')]=_0x382b2d[_0x8cf3('0x23')];this['callbackat']=_0x382b2d[_0x8cf3('0x24')];this[_0x8cf3('0x25')]=_0x382b2d[_0x8cf3('0x25')];this[_0x8cf3('0x26')]=_0x382b2d[_0x8cf3('0x26')];this[_0x8cf3('0x27')]=_0x382b2d[_0x8cf3('0x27')];this['UserId']=_0x382b2d['UserId'];this['VoiceQueueId']=_0x382b2d['VoiceQueueId'];this[_0x8cf3('0x28')]=_0x382b2d[_0x8cf3('0x28')];}module['exports']=Hangup;