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