Built motion from commit (unavailable).|2.5.4
[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 _0x6ff6=['lastAssignedTo','isNil','format','SIP/%s','interface','TALKING','queuecallerleaveAt','diff','seconds','inbound','calleridnum','agent','accountcode','toNumber','voiceDialReport','membername','endtime','starttime','exten','dialstring','uniqueid','moment','util','queuecallercompleteAt','queuecallerexitAt','Request','CreateMemberReport','voice'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x6ff6,0x69));var _0x66ff=function(_0x278bd5,_0x46b369){_0x278bd5=_0x278bd5-0x0;var _0x14ec54=_0x6ff6[_0x278bd5];return _0x14ec54;};'use strict';var moment=require(_0x66ff('0x0'));var _=require('lodash');var util=require(_0x66ff('0x1'));var client=require('../client');exports['voiceQueueReport']=function(_0x3c8082){var _0x4f7faa=_0x3c8082[_0x66ff('0x2')]||_0x3c8082[_0x66ff('0x3')];return client[_0x66ff('0x4')](_0x66ff('0x5'),{'body':{'channel':_0x66ff('0x6'),'membername':_0x3c8082[_0x66ff('0x7')],'interface':_[_0x66ff('0x8')](_0x3c8082['interface'])?util[_0x66ff('0x9')](_0x66ff('0xa'),_0x3c8082[_0x66ff('0x7')]):_0x3c8082[_0x66ff('0xb')],'type':_0x66ff('0xc'),'enterAt':_0x3c8082[_0x66ff('0xd')],'exitAt':_0x4f7faa,'duration':moment(_0x4f7faa)[_0x66ff('0xe')](_0x3c8082[_0x66ff('0xd')],_0x66ff('0xf')),'data1':_0x66ff('0x10'),'data2':_0x3c8082[_0x66ff('0x11')],'data3':_0x3c8082['exten'],'data4':null,'data5':_0x3c8082['queue'],'role':_0x66ff('0x12'),'internal':_0x3c8082[_0x66ff('0x13')]?_[_0x66ff('0x14')](_0x3c8082[_0x66ff('0x13')]):undefined,'uniqueid':_0x3c8082['uniqueid']},'log':'CreateMemberReport'});};exports[_0x66ff('0x15')]=function(_0x4d92c2){return client[_0x66ff('0x4')](_0x66ff('0x5'),{'body':{'channel':_0x66ff('0x6'),'membername':_0x4d92c2[_0x66ff('0x16')],'interface':_0x4d92c2[_0x66ff('0xb')],'type':_0x66ff('0xc'),'enterAt':_0x4d92c2['starttime'],'exitAt':_0x4d92c2[_0x66ff('0x17')],'duration':moment(_0x4d92c2['endtime'])[_0x66ff('0xe')](_0x4d92c2[_0x66ff('0x18')],_0x66ff('0xf'))>=0x0?moment(_0x4d92c2[_0x66ff('0x17')])[_0x66ff('0xe')](_0x4d92c2[_0x66ff('0x18')],_0x66ff('0xf')):null,'data1':'outbound','data2':_0x4d92c2[_0x66ff('0x13')],'data3':_0x4d92c2[_0x66ff('0x19')],'data4':_0x4d92c2[_0x66ff('0x1a')]||null,'role':_0x66ff('0x12'),'internal':_0x4d92c2[_0x66ff('0x13')]?_['toNumber'](_0x4d92c2[_0x66ff('0x13')]):undefined,'uniqueid':_0x4d92c2[_0x66ff('0x1b')]},'log':_0x66ff('0x5')});};