1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x29ae=['queuecallercompleteAt','queuecallerexitAt','Request','voice','lastAssignedTo','format','interface','TALKING','queuecallerleaveAt','seconds','inbound','exten','queue','agent','accountcode','toNumber','uniqueid','CreateMemberReport','voiceDialReport','membername','starttime','endtime','diff','outbound','util','voiceQueueReport'];(function(_0x2002d5,_0x553674){var _0x3d2824=function(_0x24d061){while(--_0x24d061){_0x2002d5['push'](_0x2002d5['shift']());}};_0x3d2824(++_0x553674);}(_0x29ae,0x9a));var _0xe29a=function(_0x9b3072,_0xbf6325){_0x9b3072=_0x9b3072-0x0;var _0x589939=_0x29ae[_0x9b3072];return _0x589939;};'use strict';var moment=require('moment');var _=require('lodash');var util=require(_0xe29a('0x0'));var client=require('../client');exports[_0xe29a('0x1')]=function(_0x2ec3cc){var _0x4e0605=_0x2ec3cc[_0xe29a('0x2')]||_0x2ec3cc[_0xe29a('0x3')];return client[_0xe29a('0x4')]('CreateMemberReport',{'body':{'channel':_0xe29a('0x5'),'membername':_0x2ec3cc[_0xe29a('0x6')],'interface':_['isNil'](_0x2ec3cc['interface'])?util[_0xe29a('0x7')]('SIP/%s',_0x2ec3cc[_0xe29a('0x6')]):_0x2ec3cc[_0xe29a('0x8')],'type':_0xe29a('0x9'),'enterAt':_0x2ec3cc[_0xe29a('0xa')],'exitAt':_0x4e0605,'duration':moment(_0x4e0605)['diff'](_0x2ec3cc[_0xe29a('0xa')],_0xe29a('0xb')),'data1':_0xe29a('0xc'),'data2':_0x2ec3cc['calleridnum'],'data3':_0x2ec3cc[_0xe29a('0xd')],'data4':null,'data5':_0x2ec3cc[_0xe29a('0xe')],'role':_0xe29a('0xf'),'internal':_0x2ec3cc[_0xe29a('0x10')]?_[_0xe29a('0x11')](_0x2ec3cc[_0xe29a('0x10')]):undefined,'uniqueid':_0x2ec3cc[_0xe29a('0x12')]},'log':_0xe29a('0x13')});};exports[_0xe29a('0x14')]=function(_0x541a41){return client[_0xe29a('0x4')](_0xe29a('0x13'),{'body':{'channel':_0xe29a('0x5'),'membername':_0x541a41[_0xe29a('0x15')],'interface':_0x541a41[_0xe29a('0x8')],'type':_0xe29a('0x9'),'enterAt':_0x541a41[_0xe29a('0x16')],'exitAt':_0x541a41[_0xe29a('0x17')],'duration':moment(_0x541a41[_0xe29a('0x17')])[_0xe29a('0x18')](_0x541a41[_0xe29a('0x16')],_0xe29a('0xb'))>=0x0?moment(_0x541a41['endtime'])[_0xe29a('0x18')](_0x541a41[_0xe29a('0x16')],_0xe29a('0xb')):null,'data1':_0xe29a('0x19'),'data2':_0x541a41['accountcode'],'data3':_0x541a41[_0xe29a('0xd')],'data4':_0x541a41['dialstring']||null,'role':_0xe29a('0xf'),'internal':_0x541a41[_0xe29a('0x10')]?_[_0xe29a('0x11')](_0x541a41[_0xe29a('0x10')]):undefined,'uniqueid':_0x541a41[_0xe29a('0x12')]},'log':'CreateMemberReport'});};