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