Built motion from commit (unavailable).|2.5.31
[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 _0x87cb=['countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','number','starttime','responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime','queue','membername','IVR','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','util','lodash','milliseconds','diff','seconds','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','countbusyretry','countcongestionretry','countnoanswerretry'];(function(_0xcb7ca4,_0x29b6ed){var _0x5dce14=function(_0x549bbd){while(--_0x549bbd){_0xcb7ca4['push'](_0xcb7ca4['shift']());}};_0x5dce14(++_0x29b6ed);}(_0x87cb,0x186));var _0xb87c=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0x87cb[_0x1cc8fe];return _0x230054;};'use strict';var util=require(_0xb87c('0x0'));var _=require(_0xb87c('0x1'));var moment=require('moment');function getSeconds(_0x1626c0,_0x304067){var _0x5cb395=moment(_0x1626c0)['milliseconds'](0x0);var _0x26a527=moment(_0x304067)[_0xb87c('0x2')](0x0);return _0x5cb395[_0xb87c('0x3')](_0x26a527,_0xb87c('0x4'));}function Hangup(_0x1afb42,_0x554989){this[_0xb87c('0x5')]=0x4;this[_0xb87c('0x6')]=_0xb87c('0x7');this[_0xb87c('0x8')]=_0x1afb42[_0xb87c('0x8')];this[_0xb87c('0x9')]=_0x1afb42['type'];this[_0xb87c('0xa')]=_0x1afb42['type']===_0xb87c('0xb')?'queue':_0x1afb42['type'];this[_0xb87c('0xc')]=_0x1afb42[_0xb87c('0xc')];this[_0xb87c('0xd')]=_0x1afb42[_0xb87c('0xd')];this[_0xb87c('0xe')]=_0x1afb42[_0xb87c('0xe')];this['countglobal']=_0x1afb42[_0xb87c('0xc')]+_0x1afb42[_0xb87c('0xd')]+_0x1afb42[_0xb87c('0xe')]+_0x1afb42[_0xb87c('0xf')]+_0x1afb42[_0xb87c('0x10')]+_0x1afb42[_0xb87c('0x11')]+_0x1afb42[_0xb87c('0x12')]+_0x1afb42[_0xb87c('0x13')];this[_0xb87c('0xf')]=_0x1afb42[_0xb87c('0xf')];this[_0xb87c('0x10')]=_0x1afb42[_0xb87c('0x10')];this['countabandonedretry']=_0x1afb42['countabandonedretry'];this['countmachineretry']=_0x1afb42[_0xb87c('0x12')];this[_0xb87c('0x13')]=_0x1afb42[_0xb87c('0x13')];this['uniqueid']=_0x554989[_0xb87c('0x14')];this[_0xb87c('0x15')]=_0x1afb42['name'];this['calleridnum']=_0x1afb42[_0xb87c('0x16')];this['starttime']=_0x1afb42[_0xb87c('0x17')];this['responsetime']=_0x1afb42[_0xb87c('0x18')];this[_0xb87c('0x19')]=moment()[_0xb87c('0x1a')](_0xb87c('0x1b'));this[_0xb87c('0x1c')]=getSeconds(_0x1afb42[_0xb87c('0x18')],_0x1afb42['starttime']);this[_0xb87c('0x1d')]=0x0;this[_0xb87c('0x1e')]=getSeconds(this[_0xb87c('0x19')],_0x1afb42[_0xb87c('0x18')]);this[_0xb87c('0x1f')]=_0x1afb42['queue'];this[_0xb87c('0x20')]=_0xb87c('0x21');this['reason']=_0x554989[_0xb87c('0x22')];this[_0xb87c('0x23')]=_0x1afb42['callback'];this['callbackuniqueid']=_0x1afb42[_0xb87c('0x24')];this[_0xb87c('0x25')]=_0x1afb42[_0xb87c('0x25')];this[_0xb87c('0x26')]=_0x1afb42[_0xb87c('0x26')];this[_0xb87c('0x27')]=_0x1afb42[_0xb87c('0x27')];this[_0xb87c('0x28')]=_0x1afb42[_0xb87c('0x28')];this[_0xb87c('0x29')]=_0x1afb42[_0xb87c('0x29')];this[_0xb87c('0x2a')]=_0x1afb42[_0xb87c('0x2a')];this[_0xb87c('0x2b')]=_0x1afb42[_0xb87c('0x2b')];}module[_0xb87c('0x2c')]=Hangup;