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