Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / voiceMailMessage / voiceMailMessage.rpc.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 _0xa555=['../../config/logger','rpc','jayson/promise','client','request','then','info','VoiceMailMessage,\x20%s,\x20%s','debug','VoiceMailMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x561771,_0x554760){var _0x54d16e=function(_0x381c1f){while(--_0x381c1f){_0x561771['push'](_0x561771['shift']());}};_0x54d16e(++_0x554760);}(_0xa555,0x131));var _0x5a55=function(_0x512c83,_0x42a67a){_0x512c83=_0x512c83-0x0;var _0x1f7f25=_0xa555[_0x512c83];return _0x1f7f25;};'use strict';var _=require(_0x5a55('0x0'));var util=require(_0x5a55('0x1'));var moment=require(_0x5a55('0x2'));var BPromise=require(_0x5a55('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5a55('0x4'));var db=require(_0x5a55('0x5'))['db'];var utils=require(_0x5a55('0x6'));var logger=require(_0x5a55('0x7'))(_0x5a55('0x8'));var config=require('../../config/environment');var jayson=require(_0x5a55('0x9'));var client=jayson[_0x5a55('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x40d79d,_0x16284b,_0x406726){return new BPromise(function(_0x53c0d0,_0x5a8617){return client[_0x5a55('0xb')](_0x40d79d,_0x406726)[_0x5a55('0xc')](function(_0x49a191){logger[_0x5a55('0xd')](_0x5a55('0xe'),_0x16284b,'request\x20sent');logger[_0x5a55('0xf')](_0x5a55('0x10'),_0x16284b,_0x5a55('0x11'),JSON[_0x5a55('0x12')](_0x49a191));if(_0x49a191[_0x5a55('0x13')]){if(_0x49a191[_0x5a55('0x13')][_0x5a55('0x14')]===0x1f4){logger[_0x5a55('0x13')](_0x5a55('0xe'),_0x16284b,_0x49a191[_0x5a55('0x13')][_0x5a55('0x15')]);return _0x5a8617(_0x49a191['error'][_0x5a55('0x15')]);}logger[_0x5a55('0x13')]('VoiceMailMessage,\x20%s,\x20%s',_0x16284b,_0x49a191[_0x5a55('0x13')][_0x5a55('0x15')]);return _0x53c0d0(_0x49a191['error'][_0x5a55('0x15')]);}else{logger[_0x5a55('0xd')](_0x5a55('0xe'),_0x16284b,_0x5a55('0x11'));_0x53c0d0(_0x49a191[_0x5a55('0x16')]['message']);}})[_0x5a55('0x17')](function(_0x5b34b8){logger[_0x5a55('0x13')]('VoiceMailMessage,\x20%s,\x20%s',_0x16284b,_0x5b34b8);_0x5a8617(_0x5b34b8);});});}