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