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