Built motion from commit (unavailable).|2.4.21
[motion2.git] / server / services / ami / rpc / memberReport.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x0c49=['voice','starttime','endtime','dialstring','moment','lodash','../client','voiceQueueReport','queuecallercompleteAt','queuecallerexitAt','Request','CreateMemberReport','lastAssignedTo','isNil','interface','format','SIP/%s','TALKING','queuecallerleaveAt','diff','seconds','calleridnum','exten','queue','agent','accountcode','uniqueid','voiceDialReport'];(function(_0x597176,_0x27c858){var _0x3bef9f=function(_0x2c5c67){while(--_0x2c5c67){_0x597176['push'](_0x597176['shift']());}};_0x3bef9f(++_0x27c858);}(_0x0c49,0x74));var _0x90c4=function(_0xed9821,_0x12022b){_0xed9821=_0xed9821-0x0;var _0x513e3b=_0x0c49[_0xed9821];return _0x513e3b;};'use strict';var moment=require(_0x90c4('0x0'));var _=require(_0x90c4('0x1'));var util=require('util');var client=require(_0x90c4('0x2'));exports[_0x90c4('0x3')]=function(_0x561961){var _0x38fa51=_0x561961[_0x90c4('0x4')]||_0x561961[_0x90c4('0x5')];return client[_0x90c4('0x6')](_0x90c4('0x7'),{'body':{'channel':'voice','membername':_0x561961[_0x90c4('0x8')],'interface':_[_0x90c4('0x9')](_0x561961[_0x90c4('0xa')])?util[_0x90c4('0xb')](_0x90c4('0xc'),_0x561961[_0x90c4('0x8')]):_0x561961[_0x90c4('0xa')],'type':_0x90c4('0xd'),'enterAt':_0x561961[_0x90c4('0xe')],'exitAt':_0x38fa51,'duration':moment(_0x38fa51)[_0x90c4('0xf')](_0x561961[_0x90c4('0xe')],_0x90c4('0x10')),'data1':'inbound','data2':_0x561961[_0x90c4('0x11')],'data3':_0x561961[_0x90c4('0x12')],'data4':null,'data5':_0x561961[_0x90c4('0x13')],'role':_0x90c4('0x14'),'internal':_0x561961[_0x90c4('0x15')]?_['toNumber'](_0x561961[_0x90c4('0x15')]):undefined,'uniqueid':_0x561961[_0x90c4('0x16')]},'log':'CreateMemberReport'});};exports[_0x90c4('0x17')]=function(_0x513636){return client[_0x90c4('0x6')](_0x90c4('0x7'),{'body':{'channel':_0x90c4('0x18'),'membername':_0x513636['membername'],'interface':_0x513636[_0x90c4('0xa')],'type':_0x90c4('0xd'),'enterAt':_0x513636[_0x90c4('0x19')],'exitAt':_0x513636[_0x90c4('0x1a')],'duration':moment(_0x513636[_0x90c4('0x1a')])[_0x90c4('0xf')](_0x513636[_0x90c4('0x19')],_0x90c4('0x10'))>=0x0?moment(_0x513636[_0x90c4('0x1a')])[_0x90c4('0xf')](_0x513636[_0x90c4('0x19')],_0x90c4('0x10')):null,'data1':'outbound','data2':_0x513636['accountcode'],'data3':_0x513636[_0x90c4('0x12')],'data4':_0x513636[_0x90c4('0x1b')]||null,'role':_0x90c4('0x14'),'internal':_0x513636['accountcode']?_['toNumber'](_0x513636[_0x90c4('0x15')]):undefined,'uniqueid':_0x513636[_0x90c4('0x16')]},'log':'CreateMemberReport'});};