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