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