624da2bd4b7800742a10e1f229d97c66d6f7ee24
[motion2.git] / server / services / ami / fax / util / util.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 _0x7ea4=['lodash','moment','../../../../config/logger','fax','message','logger','info','inspect','addVariables','ecm','headerinfo','minrate','maxrate','\x22%s\x22','modem','gateway','faxdetect','localstationid','path','variablesAction','uniqueid','originate','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>'];(function(_0x1b828b,_0x344400){var _0x98da1a=function(_0x1a0f5b){while(--_0x1a0f5b){_0x1b828b['push'](_0x1b828b['shift']());}};_0x98da1a(++_0x344400);}(_0x7ea4,0x177));var _0x47ea=function(_0xd1c39b,_0x16f0c6){_0xd1c39b=_0xd1c39b-0x0;var _0x58f5bc=_0x7ea4[_0xd1c39b];return _0x58f5bc;};'use strict';var util=require('util');var _=require(_0x47ea('0x0'));var moment=require(_0x47ea('0x1'));var logger=require(_0x47ea('0x2'))(_0x47ea('0x3'));exports[_0x47ea('0x4')]=function(_0x3a117f){return{'message':_0x3a117f};};exports[_0x47ea('0x5')]=function(_0x39f44a,_0x59f46d){logger[_0x47ea('0x6')](_0x39f44a,util[_0x47ea('0x7')](_0x59f46d,{'showHidden':![],'depth':null}));};exports[_0x47ea('0x8')]=function(_0x14c5e7,_0x4af8c3){var _0x2f6e4a={'XMF-ECM':_0x4af8c3[_0x47ea('0x9')],'XMF-HEADERINFO':_0x4af8c3[_0x47ea('0xa')],'XMF-MINRATE':_0x4af8c3[_0x47ea('0xb')],'XMF-MAXRATE':_0x4af8c3[_0x47ea('0xc')],'XMF-MODEM':util['format'](_0x47ea('0xd'),_0x4af8c3[_0x47ea('0xe')]),'XMF-GATEWAY':_0x4af8c3[_0x47ea('0xf')],'XMF-FAXDETECT':_0x4af8c3[_0x47ea('0x10')],'XMF-T38TIMEOUT':_0x4af8c3['t38timeout'],'XMF-LOCALSTATIONID':_0x4af8c3[_0x47ea('0x11')],'XMF-PATH':_0x14c5e7[_0x47ea('0x12')]};return _0x2f6e4a;};exports[_0x47ea('0x13')]=function(_0x4b86c8,_0x2c4592){return{'actionid':_0x4b86c8[_0x47ea('0x14')],'action':_0x47ea('0x15'),'channel':_0x4b86c8['channel'],'Exten':_0x47ea('0x16'),'Context':_0x47ea('0x17'),'Priority':'1','callerid':util['format'](_0x47ea('0x18'),_0x4b86c8[_0x47ea('0xa')]?_0x4b86c8['headerinfo']:'',_0x4b86c8[_0x47ea('0x11')]),'variable':_0x2c4592,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x4b86c8[_0x47ea('0x14')]};};