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