a04f79869d65d2f450283a0b34243089dafe4b2d
[motion2.git] / server / services / ami / dialer / 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 _0x5be7=['countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime','endtime','membername','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','lodash','moment','milliseconds','diff','seconds','state','statedesc','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal'];(function(_0x166d93,_0x301f09){var _0xba708=function(_0x349bf7){while(--_0x349bf7){_0x166d93['push'](_0x166d93['shift']());}};_0xba708(++_0x301f09);}(_0x5be7,0x75));var _0x75be=function(_0x10c90f,_0xf3f52f){_0x10c90f=_0x10c90f-0x0;var _0x24ded9=_0x5be7[_0x10c90f];return _0x24ded9;};'use strict';var util=require('util');var _=require(_0x75be('0x0'));var moment=require(_0x75be('0x1'));function getSeconds(_0x557516,_0x1f3f71){var _0x9318d9=moment(_0x557516)[_0x75be('0x2')](0x0);var _0x44b18d=moment(_0x1f3f71)[_0x75be('0x2')](0x0);return _0x9318d9[_0x75be('0x3')](_0x44b18d,_0x75be('0x4'));}function Hangup(_0x100f23,_0xc03c48){this[_0x75be('0x5')]=0x4;this[_0x75be('0x6')]='Answer';this[_0x75be('0x7')]=_0x100f23[_0x75be('0x7')];this[_0x75be('0x8')]=_0x100f23['type'];this['campaigntype']=_0x100f23['type']===_0x75be('0x9')?_0x75be('0xa'):_0x100f23[_0x75be('0x8')];this[_0x75be('0xb')]=_0x100f23[_0x75be('0xb')];this[_0x75be('0xc')]=_0x100f23['countcongestionretry'];this['countnoanswerretry']=_0x100f23[_0x75be('0xd')];this[_0x75be('0xe')]=_0x100f23[_0x75be('0xb')]+_0x100f23['countcongestionretry']+_0x100f23[_0x75be('0xd')]+_0x100f23[_0x75be('0xf')]+_0x100f23[_0x75be('0x10')]+_0x100f23[_0x75be('0x11')]+_0x100f23['countmachineretry']+_0x100f23[_0x75be('0x12')];this['countnosuchnumberretry']=_0x100f23['countnosuchnumberretry'];this[_0x75be('0x10')]=_0x100f23[_0x75be('0x10')];this[_0x75be('0x11')]=_0x100f23[_0x75be('0x11')];this['countmachineretry']=_0x100f23[_0x75be('0x13')];this['countagentrejectretry']=_0x100f23[_0x75be('0x12')];this[_0x75be('0x14')]=_0xc03c48[_0x75be('0x14')];this[_0x75be('0x15')]=_0x100f23[_0x75be('0x16')];this[_0x75be('0x17')]=_0x100f23[_0x75be('0x18')];this[_0x75be('0x19')]=_0x100f23['starttime'];this[_0x75be('0x1a')]=_0x100f23[_0x75be('0x1a')];this['endtime']=moment()[_0x75be('0x1b')](_0x75be('0x1c'));this[_0x75be('0x1d')]=getSeconds(_0x100f23[_0x75be('0x1a')],_0x100f23[_0x75be('0x19')]);this[_0x75be('0x1e')]=0x0;this[_0x75be('0x1f')]=getSeconds(this[_0x75be('0x20')],_0x100f23[_0x75be('0x1a')]);this['queue']=_0x100f23[_0x75be('0xa')];this[_0x75be('0x21')]='IVR';this['reason']=_0xc03c48[_0x75be('0x22')];this[_0x75be('0x23')]=_0x100f23['callback'];this['callbackuniqueid']=_0x100f23[_0x75be('0x24')];this['callbackat']=_0x100f23[_0x75be('0x25')];this[_0x75be('0x26')]=_0x100f23['recallme'];this[_0x75be('0x27')]=_0x100f23[_0x75be('0x27')];this[_0x75be('0x28')]=_0x100f23['ListId'];this[_0x75be('0x29')]=_0x100f23[_0x75be('0x29')];this[_0x75be('0x2a')]=_0x100f23[_0x75be('0x2a')];this[_0x75be('0x2b')]=_0x100f23[_0x75be('0x2b')];}module['exports']=Hangup;