cc2cdb09c728a6eb03dea7c1bf4dd05d8e82060b
[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 _0x989d=['countnoanswerretry','countbusyretry','countnosuchnumberretry','countabandonedretry','countmachineretry','countdropretry','countagentrejectretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','format','ringtime','talktime','endtime','IVR','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','util','lodash','moment','milliseconds','diff','state','Answer','scheduledat','type','campaigntype','outbound','queue','countcongestionretry'];(function(_0x17f2a9,_0x37585b){var _0xa5ac0c=function(_0x2ead08){while(--_0x2ead08){_0x17f2a9['push'](_0x17f2a9['shift']());}};_0xa5ac0c(++_0x37585b);}(_0x989d,0x16d));var _0xd989=function(_0x7e2eb0,_0x17cd58){_0x7e2eb0=_0x7e2eb0-0x0;var _0xd92de4=_0x989d[_0x7e2eb0];return _0xd92de4;};'use strict';var util=require(_0xd989('0x0'));var _=require(_0xd989('0x1'));var moment=require(_0xd989('0x2'));function getSeconds(_0x3bad3f,_0x2dfd02){var _0x33778a=moment(_0x3bad3f)[_0xd989('0x3')](0x0);var _0x183976=moment(_0x2dfd02)[_0xd989('0x3')](0x0);return _0x33778a[_0xd989('0x4')](_0x183976,'seconds');}function Hangup(_0x2ec029,_0x502bce){this[_0xd989('0x5')]=0x4;this['statedesc']=_0xd989('0x6');this[_0xd989('0x7')]=_0x2ec029[_0xd989('0x7')];this[_0xd989('0x8')]=_0x2ec029['type'];this[_0xd989('0x9')]=_0x2ec029[_0xd989('0x8')]===_0xd989('0xa')?_0xd989('0xb'):_0x2ec029['type'];this['countbusyretry']=_0x2ec029['countbusyretry'];this['countcongestionretry']=_0x2ec029[_0xd989('0xc')];this[_0xd989('0xd')]=_0x2ec029[_0xd989('0xd')];this['countglobal']=_0x2ec029[_0xd989('0xe')]+_0x2ec029[_0xd989('0xc')]+_0x2ec029[_0xd989('0xd')]+_0x2ec029[_0xd989('0xf')]+_0x2ec029['countdropretry']+_0x2ec029[_0xd989('0x10')]+_0x2ec029[_0xd989('0x11')]+_0x2ec029['countagentrejectretry'];this[_0xd989('0xf')]=_0x2ec029[_0xd989('0xf')];this[_0xd989('0x12')]=_0x2ec029[_0xd989('0x12')];this['countabandonedretry']=_0x2ec029['countabandonedretry'];this[_0xd989('0x11')]=_0x2ec029[_0xd989('0x11')];this[_0xd989('0x13')]=_0x2ec029[_0xd989('0x13')];this[_0xd989('0x14')]=_0x502bce[_0xd989('0x14')];this[_0xd989('0x15')]=_0x2ec029['name'];this[_0xd989('0x16')]=_0x2ec029[_0xd989('0x17')];this[_0xd989('0x18')]=_0x2ec029['starttime'];this[_0xd989('0x19')]=_0x2ec029[_0xd989('0x19')];this['endtime']=moment()[_0xd989('0x1a')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xd989('0x1b')]=getSeconds(_0x2ec029[_0xd989('0x19')],_0x2ec029['starttime']);this['holdtime']=0x0;this[_0xd989('0x1c')]=getSeconds(this[_0xd989('0x1d')],_0x2ec029[_0xd989('0x19')]);this[_0xd989('0xb')]=_0x2ec029[_0xd989('0xb')];this['membername']=_0xd989('0x1e');this['reason']=_0x502bce[_0xd989('0x1f')];this[_0xd989('0x20')]=_0x2ec029[_0xd989('0x20')];this[_0xd989('0x21')]=_0x2ec029[_0xd989('0x21')];this[_0xd989('0x22')]=_0x2ec029[_0xd989('0x22')];this[_0xd989('0x23')]=_0x2ec029['recallme'];this['ContactId']=_0x2ec029[_0xd989('0x24')];this[_0xd989('0x25')]=_0x2ec029[_0xd989('0x25')];this['UserId']=_0x2ec029[_0xd989('0x26')];this['VoiceQueueId']=_0x2ec029[_0xd989('0x27')];this['CampaignId']=_0x2ec029[_0xd989('0x28')];}module[_0xd989('0x29')]=Hangup;