Built motion from commit e1760111.|2.6.18
[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 _0x4c5d=['lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','stringify','error','code','VoiceMailMessage,\x20%s,\x20%s','message','catch'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x4c5d,0x1e3));var _0xd4c5=function(_0x563228,_0x71e4bd){_0x563228=_0x563228-0x0;var _0x313710=_0x4c5d[_0x563228];return _0x313710;};'use strict';var _=require(_0xd4c5('0x0'));var util=require(_0xd4c5('0x1'));var moment=require(_0xd4c5('0x2'));var BPromise=require(_0xd4c5('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd4c5('0x4'));var db=require(_0xd4c5('0x5'))['db'];var utils=require(_0xd4c5('0x6'));var logger=require(_0xd4c5('0x7'))(_0xd4c5('0x8'));var config=require(_0xd4c5('0x9'));var jayson=require(_0xd4c5('0xa'));var client=jayson[_0xd4c5('0xb')][_0xd4c5('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5d33a3,_0x22ff34,_0x477fe5){return new BPromise(function(_0xc71373,_0x235888){return client[_0xd4c5('0xd')](_0x5d33a3,_0x477fe5)[_0xd4c5('0xe')](function(_0x40e1e8){logger[_0xd4c5('0xf')]('VoiceMailMessage,\x20%s,\x20%s',_0x22ff34,_0xd4c5('0x10'));logger['debug']('VoiceMailMessage,\x20%s,\x20%s,\x20%s',_0x22ff34,'request\x20sent',JSON[_0xd4c5('0x11')](_0x40e1e8));if(_0x40e1e8[_0xd4c5('0x12')]){if(_0x40e1e8[_0xd4c5('0x12')][_0xd4c5('0x13')]===0x1f4){logger['error'](_0xd4c5('0x14'),_0x22ff34,_0x40e1e8['error'][_0xd4c5('0x15')]);return _0x235888(_0x40e1e8[_0xd4c5('0x12')][_0xd4c5('0x15')]);}logger[_0xd4c5('0x12')]('VoiceMailMessage,\x20%s,\x20%s',_0x22ff34,_0x40e1e8['error'][_0xd4c5('0x15')]);return _0xc71373(_0x40e1e8[_0xd4c5('0x12')][_0xd4c5('0x15')]);}else{logger[_0xd4c5('0xf')]('VoiceMailMessage,\x20%s,\x20%s',_0x22ff34,'request\x20sent');_0xc71373(_0x40e1e8['result'][_0xd4c5('0x15')]);}})[_0xd4c5('0x16')](function(_0x193272){logger[_0xd4c5('0x12')]('VoiceMailMessage,\x20%s,\x20%s',_0x22ff34,_0x193272);_0x235888(_0x193272);});});}