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