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