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