Built motion from commit (unavailable).|2.5.21
[motion2.git] / server / services / ami / rpc / voiceCallReport.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 _0x1356=['outbound','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','day','disposition','duration','billableseconds','GetVoiceCallReports','moment','util','../client','create','Request','CreateVoiceCallReport','merge','calleridnum','context','callerid','getVoiceCallReports'];(function(_0x9af9e1,_0x3308bd){var _0x27149a=function(_0x54739d){while(--_0x54739d){_0x9af9e1['push'](_0x9af9e1['shift']());}};_0x27149a(++_0x3308bd);}(_0x1356,0x1ae));var _0x6135=function(_0x1c31c3,_0x10c84b){_0x1c31c3=_0x1c31c3-0x0;var _0x3a70e1=_0x1356[_0x1c31c3];return _0x3a70e1;};'use strict';var moment=require(_0x6135('0x0'));var util=require(_0x6135('0x1'));var _=require('lodash');var client=require(_0x6135('0x2'));exports[_0x6135('0x3')]=function(_0xad82cc){return client[_0x6135('0x4')](_0x6135('0x5'),{'body':_[_0x6135('0x6')](_0xad82cc,{'source':_0xad82cc[_0x6135('0x7')],'destinationcontext':_0xad82cc[_0x6135('0x8')],'callerid':_0xad82cc[_0x6135('0x9')],'amaflags':'DOCUMENTATION'}),'log':_0x6135('0x5')});};exports[_0x6135('0xa')]=function(){return function(){return client[_0x6135('0x4')]('GetVoiceCallReport',{'options':{'where':{'type':[_0x6135('0xb')],'createdAt':{'$between':[moment()[_0x6135('0xc')]('day')[_0x6135('0xd')](_0x6135('0xe')),moment()[_0x6135('0xf')](_0x6135('0x10'))[_0x6135('0xd')](_0x6135('0xe'))]}},'attributes':['type',_0x6135('0x11'),_0x6135('0x12'),_0x6135('0x13')]},'log':_0x6135('0x14')});};};