Built motion from commit da24aabd.|2.6.20
[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 _0xa187=['endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','getSeconds','holdtime','talktime','membername','IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','moment','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','amd','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countmachineretry','countagentrejectretry','countabandonedretry','uniqueid','name','calleridnum','starttime','responsetime'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0xa187,0x149));var _0x7a18=function(_0x1c445a,_0xea7543){_0x1c445a=_0x1c445a-0x0;var _0x33e4ad=_0xa187[_0x1c445a];return _0x33e4ad;};'use strict';var moment=require(_0x7a18('0x0'));var utils=require('../utils');function Hangup(_0x38d22d,_0x9c425b){this[_0x7a18('0x1')]=0x4;this[_0x7a18('0x2')]=_0x7a18('0x3');this[_0x7a18('0x4')]=_0x38d22d[_0x7a18('0x4')];this[_0x7a18('0x5')]=_0x38d22d[_0x7a18('0x5')];this[_0x7a18('0x6')]=_0x38d22d['type']===_0x7a18('0x7')?_0x7a18('0x8'):_0x38d22d[_0x7a18('0x5')];this['amd']=_0x38d22d[_0x7a18('0x9')]||![];this['countbusyretry']=_0x38d22d[_0x7a18('0xa')];this[_0x7a18('0xb')]=_0x38d22d[_0x7a18('0xb')];this['countnoanswerretry']=_0x38d22d[_0x7a18('0xc')];this['countglobal']=_0x38d22d['countbusyretry']+_0x38d22d[_0x7a18('0xb')]+_0x38d22d[_0x7a18('0xc')]+_0x38d22d[_0x7a18('0xd')]+_0x38d22d[_0x7a18('0xe')]+_0x38d22d['countabandonedretry']+_0x38d22d[_0x7a18('0xf')]+_0x38d22d[_0x7a18('0x10')];this[_0x7a18('0xd')]=_0x38d22d[_0x7a18('0xd')];this[_0x7a18('0xe')]=_0x38d22d[_0x7a18('0xe')];this[_0x7a18('0x11')]=_0x38d22d[_0x7a18('0x11')];this[_0x7a18('0xf')]=_0x38d22d['countmachineretry'];this['countagentrejectretry']=_0x38d22d[_0x7a18('0x10')];this[_0x7a18('0x12')]=_0x9c425b[_0x7a18('0x12')];this['calleridname']=_0x38d22d[_0x7a18('0x13')];this[_0x7a18('0x14')]=_0x38d22d['number'];this[_0x7a18('0x15')]=_0x38d22d[_0x7a18('0x15')];this[_0x7a18('0x16')]=_0x38d22d[_0x7a18('0x16')];this[_0x7a18('0x17')]=moment()[_0x7a18('0x18')](_0x7a18('0x19'));this[_0x7a18('0x1a')]=utils[_0x7a18('0x1b')](_0x38d22d[_0x7a18('0x16')],_0x38d22d[_0x7a18('0x15')]);this[_0x7a18('0x1c')]=0x0;this[_0x7a18('0x1d')]=utils[_0x7a18('0x1b')](this[_0x7a18('0x17')],_0x38d22d['responsetime']);this['queue']=_0x38d22d[_0x7a18('0x8')];this[_0x7a18('0x1e')]=_0x7a18('0x1f');this[_0x7a18('0x20')]=_0x9c425b[_0x7a18('0x21')];this[_0x7a18('0x22')]=_0x38d22d[_0x7a18('0x22')];this[_0x7a18('0x23')]=_0x38d22d['callbackuniqueid'];this[_0x7a18('0x24')]=_0x38d22d[_0x7a18('0x24')];this[_0x7a18('0x25')]=_0x38d22d[_0x7a18('0x25')];this['ContactId']=_0x38d22d[_0x7a18('0x26')];this[_0x7a18('0x27')]=_0x38d22d[_0x7a18('0x27')];this['UserId']=_0x38d22d[_0x7a18('0x28')];this[_0x7a18('0x29')]=_0x38d22d[_0x7a18('0x29')];this[_0x7a18('0x2a')]=_0x38d22d[_0x7a18('0x2a')];}module[_0x7a18('0x2b')]=Hangup;