Built motion from commit e0fa946e.|2.6.5
[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 _0x5178=['responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','talktime','IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','lodash','milliseconds','diff','seconds','statedesc','Answer','scheduledat','type','campaigntype','queue','countnoanswerretry','countglobal','countbusyretry','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridnum','number','starttime'];(function(_0x14d93b,_0x571573){var _0x2869a4=function(_0x54c3b7){while(--_0x54c3b7){_0x14d93b['push'](_0x14d93b['shift']());}};_0x2869a4(++_0x571573);}(_0x5178,0x1b7));var _0x8517=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x5178[_0x1ac595];return _0x455fff;};'use strict';var util=require('util');var _=require(_0x8517('0x0'));var moment=require('moment');function getSeconds(_0x46f8fa,_0x4e04bf){var _0x3de90f=moment(_0x46f8fa)[_0x8517('0x1')](0x0);var _0x46b518=moment(_0x4e04bf)[_0x8517('0x1')](0x0);return _0x3de90f[_0x8517('0x2')](_0x46b518,_0x8517('0x3'));}function Hangup(_0x240af5,_0x149dfc){this['state']=0x4;this[_0x8517('0x4')]=_0x8517('0x5');this[_0x8517('0x6')]=_0x240af5[_0x8517('0x6')];this[_0x8517('0x7')]=_0x240af5[_0x8517('0x7')];this[_0x8517('0x8')]=_0x240af5[_0x8517('0x7')]==='outbound'?_0x8517('0x9'):_0x240af5[_0x8517('0x7')];this['countbusyretry']=_0x240af5['countbusyretry'];this['countcongestionretry']=_0x240af5['countcongestionretry'];this[_0x8517('0xa')]=_0x240af5['countnoanswerretry'];this[_0x8517('0xb')]=_0x240af5[_0x8517('0xc')]+_0x240af5[_0x8517('0xd')]+_0x240af5['countnoanswerretry']+_0x240af5[_0x8517('0xe')]+_0x240af5[_0x8517('0xf')]+_0x240af5[_0x8517('0x10')]+_0x240af5['countmachineretry']+_0x240af5[_0x8517('0x11')];this[_0x8517('0xe')]=_0x240af5[_0x8517('0xe')];this[_0x8517('0xf')]=_0x240af5[_0x8517('0xf')];this[_0x8517('0x10')]=_0x240af5[_0x8517('0x10')];this[_0x8517('0x12')]=_0x240af5[_0x8517('0x12')];this[_0x8517('0x11')]=_0x240af5[_0x8517('0x11')];this[_0x8517('0x13')]=_0x149dfc['uniqueid'];this['calleridname']=_0x240af5['name'];this[_0x8517('0x14')]=_0x240af5[_0x8517('0x15')];this[_0x8517('0x16')]=_0x240af5[_0x8517('0x16')];this[_0x8517('0x17')]=_0x240af5['responsetime'];this[_0x8517('0x18')]=moment()[_0x8517('0x19')](_0x8517('0x1a'));this[_0x8517('0x1b')]=getSeconds(_0x240af5[_0x8517('0x17')],_0x240af5[_0x8517('0x16')]);this[_0x8517('0x1c')]=0x0;this[_0x8517('0x1d')]=getSeconds(this['endtime'],_0x240af5[_0x8517('0x17')]);this[_0x8517('0x9')]=_0x240af5[_0x8517('0x9')];this['membername']=_0x8517('0x1e');this[_0x8517('0x1f')]=_0x149dfc[_0x8517('0x20')];this[_0x8517('0x21')]=_0x240af5[_0x8517('0x21')];this[_0x8517('0x22')]=_0x240af5[_0x8517('0x22')];this[_0x8517('0x23')]=_0x240af5[_0x8517('0x23')];this['recallme']=_0x240af5[_0x8517('0x24')];this['ContactId']=_0x240af5[_0x8517('0x25')];this[_0x8517('0x26')]=_0x240af5[_0x8517('0x26')];this[_0x8517('0x27')]=_0x240af5[_0x8517('0x27')];this[_0x8517('0x28')]=_0x240af5['VoiceQueueId'];this[_0x8517('0x29')]=_0x240af5[_0x8517('0x29')];}module['exports']=Hangup;