Built motion from commit 67e5df37.|2.0.66
[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 _0xda3f=['connectedlinenum','format','\x22%s\x22\x20<%s>','calleridname','DOCUMENTATION','CreateVoiceCallReport','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day','YYYY-MM-DD\x20HH:mm:ss','endOf','disposition','billableseconds','GetVoiceCallReports','util','lodash','Request','merge','calleridnum','xcally-motion-dialer'];(function(_0x519f6a,_0x2adb1a){var _0x30dd02=function(_0x47fd6f){while(--_0x47fd6f){_0x519f6a['push'](_0x519f6a['shift']());}};_0x30dd02(++_0x2adb1a);}(_0xda3f,0xec));var _0xfda3=function(_0x576efa,_0x2bc5f2){_0x576efa=_0x576efa-0x0;var _0x30617a=_0xda3f[_0x576efa];return _0x30617a;};'use strict';var moment=require('moment');var util=require(_0xfda3('0x0'));var _=require(_0xfda3('0x1'));var client=require('../client');exports['create']=function(_0x5d7071){return client[_0xfda3('0x2')]('CreateVoiceCallReport',{'body':_[_0xfda3('0x3')](_0x5d7071,{'source':_0x5d7071[_0xfda3('0x4')],'destination':_0x5d7071['exten']===_0xfda3('0x5')?_0x5d7071[_0xfda3('0x6')]:_0x5d7071['exten'],'destinationcontext':_0x5d7071['context'],'callerid':util[_0xfda3('0x7')](_0xfda3('0x8'),_0x5d7071[_0xfda3('0x9')],_0x5d7071[_0xfda3('0x4')]),'amaflags':_0xfda3('0xa')}),'log':_0xfda3('0xb')});};exports[_0xfda3('0xc')]=function(){return function(){return client[_0xfda3('0x2')](_0xfda3('0xd'),{'options':{'where':{'type':[_0xfda3('0xe')],'createdAt':{'$between':[moment()[_0xfda3('0xf')](_0xfda3('0x10'))['format'](_0xfda3('0x11')),moment()[_0xfda3('0x12')](_0xfda3('0x10'))[_0xfda3('0x7')](_0xfda3('0x11'))]}},'attributes':['type',_0xfda3('0x13'),'duration',_0xfda3('0x14')]},'log':_0xfda3('0x15')});};};