Built motion from commit 3c2ce842.|2.6.31
[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 _0x1dc6=['exten','queue','accountcode','toNumber','uniqueid','voiceDialReport','membername','TALKING','starttime','endtime','seconds','outbound','agent','moment','lodash','util','../client','voiceQueueReport','queuecallercompleteAt','queuecallerexitAt','Request','CreateMemberReport','voice','interface','format','SIP/%s','lastAssignedTo','diff','queuecallerleaveAt','inbound'];(function(_0x18cc08,_0x34c324){var _0x230d93=function(_0x1d318e){while(--_0x1d318e){_0x18cc08['push'](_0x18cc08['shift']());}};_0x230d93(++_0x34c324);}(_0x1dc6,0x157));var _0x61dc=function(_0x4c4dac,_0x27da26){_0x4c4dac=_0x4c4dac-0x0;var _0x4ba252=_0x1dc6[_0x4c4dac];return _0x4ba252;};'use strict';var moment=require(_0x61dc('0x0'));var _=require(_0x61dc('0x1'));var util=require(_0x61dc('0x2'));var client=require(_0x61dc('0x3'));exports[_0x61dc('0x4')]=function(_0x3201e3){var _0x590cdf=_0x3201e3[_0x61dc('0x5')]||_0x3201e3[_0x61dc('0x6')];return client[_0x61dc('0x7')](_0x61dc('0x8'),{'body':{'channel':_0x61dc('0x9'),'membername':_0x3201e3['lastAssignedTo'],'interface':_['isNil'](_0x3201e3[_0x61dc('0xa')])?util[_0x61dc('0xb')](_0x61dc('0xc'),_0x3201e3[_0x61dc('0xd')]):_0x3201e3[_0x61dc('0xa')],'type':'TALKING','enterAt':_0x3201e3['queuecallerleaveAt'],'exitAt':_0x590cdf,'duration':moment(_0x590cdf)[_0x61dc('0xe')](_0x3201e3[_0x61dc('0xf')],'seconds'),'data1':_0x61dc('0x10'),'data2':_0x3201e3['calleridnum'],'data3':_0x3201e3[_0x61dc('0x11')],'data4':null,'data5':_0x3201e3[_0x61dc('0x12')],'role':'agent','internal':_0x3201e3[_0x61dc('0x13')]?_[_0x61dc('0x14')](_0x3201e3['accountcode']):undefined,'uniqueid':_0x3201e3[_0x61dc('0x15')]},'log':_0x61dc('0x8')});};exports[_0x61dc('0x16')]=function(_0x2005d3){return client[_0x61dc('0x7')](_0x61dc('0x8'),{'body':{'channel':_0x61dc('0x9'),'membername':_0x2005d3[_0x61dc('0x17')],'interface':_0x2005d3['interface'],'type':_0x61dc('0x18'),'enterAt':_0x2005d3[_0x61dc('0x19')],'exitAt':_0x2005d3[_0x61dc('0x1a')],'duration':moment(_0x2005d3['endtime'])[_0x61dc('0xe')](_0x2005d3['starttime'],_0x61dc('0x1b'))>=0x0?moment(_0x2005d3['endtime'])['diff'](_0x2005d3[_0x61dc('0x19')],_0x61dc('0x1b')):null,'data1':_0x61dc('0x1c'),'data2':_0x2005d3[_0x61dc('0x13')],'data3':_0x2005d3['exten'],'data4':_0x2005d3['dialstring']||null,'role':_0x61dc('0x1d'),'internal':_0x2005d3[_0x61dc('0x13')]?_[_0x61dc('0x14')](_0x2005d3[_0x61dc('0x13')]):undefined,'uniqueid':_0x2005d3[_0x61dc('0x15')]},'log':'CreateMemberReport'});};