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 _0xe35a=['util','../client','voiceQueueReport','queuecallercompleteAt','queuecallerexitAt','voice','lastAssignedTo','isNil','interface','format','SIP/%s','TALKING','queuecallerleaveAt','inbound','calleridnum','exten','agent','accountcode','toNumber','uniqueid','CreateMemberReport','voiceDialReport','Request','membername','starttime','endtime','diff','seconds','outbound','dialstring','moment'];(function(_0x424e5c,_0x154f35){var _0x3b6ac1=function(_0x56ed17){while(--_0x56ed17){_0x424e5c['push'](_0x424e5c['shift']());}};_0x3b6ac1(++_0x154f35);}(_0xe35a,0xf7));var _0xae35=function(_0x3950ed,_0x137c36){_0x3950ed=_0x3950ed-0x0;var _0x115dae=_0xe35a[_0x3950ed];return _0x115dae;};'use strict';var moment=require(_0xae35('0x0'));var _=require('lodash');var util=require(_0xae35('0x1'));var client=require(_0xae35('0x2'));exports[_0xae35('0x3')]=function(_0x1b5915){var _0x538a58=_0x1b5915[_0xae35('0x4')]||_0x1b5915[_0xae35('0x5')];return client['Request']('CreateMemberReport',{'body':{'channel':_0xae35('0x6'),'membername':_0x1b5915[_0xae35('0x7')],'interface':_[_0xae35('0x8')](_0x1b5915[_0xae35('0x9')])?util[_0xae35('0xa')](_0xae35('0xb'),_0x1b5915[_0xae35('0x7')]):_0x1b5915['interface'],'type':_0xae35('0xc'),'enterAt':_0x1b5915[_0xae35('0xd')],'exitAt':_0x538a58,'duration':moment(_0x538a58)['diff'](_0x1b5915[_0xae35('0xd')],'seconds'),'data1':_0xae35('0xe'),'data2':_0x1b5915[_0xae35('0xf')],'data3':_0x1b5915[_0xae35('0x10')],'data4':null,'data5':_0x1b5915['queue'],'role':_0xae35('0x11'),'internal':_0x1b5915[_0xae35('0x12')]?_[_0xae35('0x13')](_0x1b5915[_0xae35('0x12')]):undefined,'uniqueid':_0x1b5915[_0xae35('0x14')]},'log':_0xae35('0x15')});};exports[_0xae35('0x16')]=function(_0x3820af){return client[_0xae35('0x17')](_0xae35('0x15'),{'body':{'channel':_0xae35('0x6'),'membername':_0x3820af[_0xae35('0x18')],'interface':_0x3820af[_0xae35('0x9')],'type':_0xae35('0xc'),'enterAt':_0x3820af[_0xae35('0x19')],'exitAt':_0x3820af['endtime'],'duration':moment(_0x3820af[_0xae35('0x1a')])[_0xae35('0x1b')](_0x3820af[_0xae35('0x19')],_0xae35('0x1c'))>=0x0?moment(_0x3820af['endtime'])[_0xae35('0x1b')](_0x3820af[_0xae35('0x19')],_0xae35('0x1c')):null,'data1':_0xae35('0x1d'),'data2':_0x3820af[_0xae35('0x12')],'data3':_0x3820af[_0xae35('0x10')],'data4':_0x3820af[_0xae35('0x1e')]||null,'role':_0xae35('0x11'),'internal':_0x3820af[_0xae35('0x12')]?_['toNumber'](_0x3820af['accountcode']):undefined,'uniqueid':_0x3820af['uniqueid']},'log':'CreateMemberReport'});};