964883b74abcb8f2ff47ff23ed1d76ff24ca7c95
[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 _0xa049=['countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','name','number','starttime','responsetime','format','getSeconds','holdtime','talktime','endtime','membername','IVR','callback','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','../utils','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','amd'];(function(_0x2ff4bd,_0x4780a6){var _0x28edc6=function(_0x792380){while(--_0x792380){_0x2ff4bd['push'](_0x2ff4bd['shift']());}};_0x28edc6(++_0x4780a6);}(_0xa049,0x136));var _0x9a04=function(_0x153da6,_0xc9bfde){_0x153da6=_0x153da6-0x0;var _0xf01a0d=_0xa049[_0x153da6];return _0xf01a0d;};'use strict';var moment=require('moment');var utils=require(_0x9a04('0x0'));function Hangup(_0x3edd16,_0x371981){this[_0x9a04('0x1')]=0x4;this[_0x9a04('0x2')]=_0x9a04('0x3');this['scheduledat']=_0x3edd16[_0x9a04('0x4')];this[_0x9a04('0x5')]=_0x3edd16[_0x9a04('0x5')];this[_0x9a04('0x6')]=_0x3edd16[_0x9a04('0x5')]===_0x9a04('0x7')?_0x9a04('0x8'):_0x3edd16[_0x9a04('0x5')];this[_0x9a04('0x9')]=_0x3edd16[_0x9a04('0x9')]||![];this['countbusyretry']=_0x3edd16[_0x9a04('0xa')];this[_0x9a04('0xb')]=_0x3edd16[_0x9a04('0xb')];this[_0x9a04('0xc')]=_0x3edd16[_0x9a04('0xc')];this[_0x9a04('0xd')]=_0x3edd16[_0x9a04('0xa')]+_0x3edd16[_0x9a04('0xb')]+_0x3edd16[_0x9a04('0xc')]+_0x3edd16[_0x9a04('0xe')]+_0x3edd16[_0x9a04('0xf')]+_0x3edd16[_0x9a04('0x10')]+_0x3edd16['countmachineretry']+_0x3edd16[_0x9a04('0x11')];this[_0x9a04('0xe')]=_0x3edd16[_0x9a04('0xe')];this['countdropretry']=_0x3edd16[_0x9a04('0xf')];this[_0x9a04('0x10')]=_0x3edd16[_0x9a04('0x10')];this[_0x9a04('0x12')]=_0x3edd16[_0x9a04('0x12')];this['countagentrejectretry']=_0x3edd16[_0x9a04('0x11')];this[_0x9a04('0x13')]=_0x371981[_0x9a04('0x13')];this[_0x9a04('0x14')]=_0x3edd16[_0x9a04('0x15')];this['calleridnum']=_0x3edd16[_0x9a04('0x16')];this['starttime']=_0x3edd16[_0x9a04('0x17')];this['responsetime']=_0x3edd16[_0x9a04('0x18')];this['endtime']=moment()[_0x9a04('0x19')]('YYYY-MM-DD\x20HH:mm:ss');this['ringtime']=utils[_0x9a04('0x1a')](_0x3edd16[_0x9a04('0x18')],_0x3edd16[_0x9a04('0x17')]);this[_0x9a04('0x1b')]=0x0;this[_0x9a04('0x1c')]=utils['getSeconds'](this[_0x9a04('0x1d')],_0x3edd16[_0x9a04('0x18')]);this[_0x9a04('0x8')]=_0x3edd16[_0x9a04('0x8')];this[_0x9a04('0x1e')]=_0x9a04('0x1f');this['reason']=_0x371981['cause-txt'];this[_0x9a04('0x20')]=_0x3edd16[_0x9a04('0x20')];this['callbackuniqueid']=_0x3edd16['callbackuniqueid'];this['callbackat']=_0x3edd16['callbackat'];this['recallme']=_0x3edd16[_0x9a04('0x21')];this[_0x9a04('0x22')]=_0x3edd16['ContactId'];this[_0x9a04('0x23')]=_0x3edd16[_0x9a04('0x23')];this['UserId']=_0x3edd16[_0x9a04('0x24')];this[_0x9a04('0x25')]=_0x3edd16[_0x9a04('0x25')];this[_0x9a04('0x26')]=_0x3edd16[_0x9a04('0x26')];}module[_0x9a04('0x27')]=Hangup;