9efb66826ebc50127a7c1059901ce65b98ed5cb3
[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 _0x3a80=['statedesc','scheduledat','type','campaigntype','outbound','amd','countbusyretry','countcongestionretry','countnoanswerretry','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','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','moment','../utils'];(function(_0x30ae5e,_0x391fc4){var _0x1f2e93=function(_0x60307d){while(--_0x60307d){_0x30ae5e['push'](_0x30ae5e['shift']());}};_0x1f2e93(++_0x391fc4);}(_0x3a80,0x166));var _0x03a8=function(_0xdc1eb,_0x37a9d2){_0xdc1eb=_0xdc1eb-0x0;var _0x27c55e=_0x3a80[_0xdc1eb];return _0x27c55e;};'use strict';var moment=require(_0x03a8('0x0'));var utils=require(_0x03a8('0x1'));function Hangup(_0x5c57bc,_0x3ffb70){this['state']=0x4;this[_0x03a8('0x2')]='Answer';this[_0x03a8('0x3')]=_0x5c57bc[_0x03a8('0x3')];this[_0x03a8('0x4')]=_0x5c57bc[_0x03a8('0x4')];this[_0x03a8('0x5')]=_0x5c57bc[_0x03a8('0x4')]===_0x03a8('0x6')?'queue':_0x5c57bc[_0x03a8('0x4')];this['amd']=_0x5c57bc[_0x03a8('0x7')]||![];this[_0x03a8('0x8')]=_0x5c57bc[_0x03a8('0x8')];this[_0x03a8('0x9')]=_0x5c57bc[_0x03a8('0x9')];this[_0x03a8('0xa')]=_0x5c57bc[_0x03a8('0xa')];this['countglobal']=_0x5c57bc[_0x03a8('0x8')]+_0x5c57bc[_0x03a8('0x9')]+_0x5c57bc[_0x03a8('0xa')]+_0x5c57bc[_0x03a8('0xb')]+_0x5c57bc[_0x03a8('0xc')]+_0x5c57bc[_0x03a8('0xd')]+_0x5c57bc[_0x03a8('0xe')]+_0x5c57bc[_0x03a8('0xf')];this[_0x03a8('0xb')]=_0x5c57bc[_0x03a8('0xb')];this[_0x03a8('0xc')]=_0x5c57bc[_0x03a8('0xc')];this[_0x03a8('0xd')]=_0x5c57bc[_0x03a8('0xd')];this[_0x03a8('0xe')]=_0x5c57bc[_0x03a8('0xe')];this[_0x03a8('0xf')]=_0x5c57bc[_0x03a8('0xf')];this[_0x03a8('0x10')]=_0x3ffb70[_0x03a8('0x10')];this[_0x03a8('0x11')]=_0x5c57bc[_0x03a8('0x12')];this[_0x03a8('0x13')]=_0x5c57bc[_0x03a8('0x14')];this[_0x03a8('0x15')]=_0x5c57bc[_0x03a8('0x15')];this['responsetime']=_0x5c57bc[_0x03a8('0x16')];this[_0x03a8('0x17')]=moment()[_0x03a8('0x18')](_0x03a8('0x19'));this[_0x03a8('0x1a')]=utils[_0x03a8('0x1b')](_0x5c57bc['responsetime'],_0x5c57bc[_0x03a8('0x15')]);this[_0x03a8('0x1c')]=0x0;this[_0x03a8('0x1d')]=utils['getSeconds'](this[_0x03a8('0x17')],_0x5c57bc[_0x03a8('0x16')]);this[_0x03a8('0x1e')]=_0x5c57bc[_0x03a8('0x1e')];this[_0x03a8('0x1f')]=_0x03a8('0x20');this[_0x03a8('0x21')]=_0x3ffb70[_0x03a8('0x22')];this['callback']=_0x5c57bc[_0x03a8('0x23')];this[_0x03a8('0x24')]=_0x5c57bc[_0x03a8('0x24')];this[_0x03a8('0x25')]=_0x5c57bc[_0x03a8('0x25')];this['recallme']=_0x5c57bc[_0x03a8('0x26')];this[_0x03a8('0x27')]=_0x5c57bc[_0x03a8('0x27')];this[_0x03a8('0x28')]=_0x5c57bc[_0x03a8('0x28')];this[_0x03a8('0x29')]=_0x5c57bc['UserId'];this[_0x03a8('0x2a')]=_0x5c57bc[_0x03a8('0x2a')];this[_0x03a8('0x2b')]=_0x5c57bc[_0x03a8('0x2b')];}module[_0x03a8('0x2c')]=Hangup;