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