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