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