7328db9a56764fbec0ea718224c265694d964098
[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 _0x68fc=['from-sip','\x22%s\x22\x20<%s>','localstationid','util','lodash','moment','message','logger','info','inspect','addVariables','ecm','headerinfo','minrate','maxrate','format','\x22%s\x22','modem','gateway','faxdetect','t38timeout','path','variablesAction','uniqueid','originate','channel','xcally-motion-fax'];(function(_0x100e36,_0x4da225){var _0x1df0c9=function(_0xe4b84f){while(--_0xe4b84f){_0x100e36['push'](_0x100e36['shift']());}};_0x1df0c9(++_0x4da225);}(_0x68fc,0xa5));var _0xc68f=function(_0x3e08e3,_0x282c0a){_0x3e08e3=_0x3e08e3-0x0;var _0x3ed43a=_0x68fc[_0x3e08e3];return _0x3ed43a;};'use strict';var util=require(_0xc68f('0x0'));var _=require(_0xc68f('0x1'));var moment=require(_0xc68f('0x2'));var logger=require('../../../../config/logger')('fax');exports[_0xc68f('0x3')]=function(_0x506fb5){return{'message':_0x506fb5};};exports[_0xc68f('0x4')]=function(_0x593648,_0x5899ea){logger[_0xc68f('0x5')](_0x593648,util[_0xc68f('0x6')](_0x5899ea,{'showHidden':![],'depth':null}));};exports[_0xc68f('0x7')]=function(_0x363cdf,_0x4fcce4){var _0x4a6f7d={'XMF-ECM':_0x4fcce4[_0xc68f('0x8')],'XMF-HEADERINFO':_0x4fcce4[_0xc68f('0x9')],'XMF-MINRATE':_0x4fcce4[_0xc68f('0xa')],'XMF-MAXRATE':_0x4fcce4[_0xc68f('0xb')],'XMF-MODEM':util[_0xc68f('0xc')](_0xc68f('0xd'),_0x4fcce4[_0xc68f('0xe')]),'XMF-GATEWAY':_0x4fcce4[_0xc68f('0xf')],'XMF-FAXDETECT':_0x4fcce4[_0xc68f('0x10')],'XMF-T38TIMEOUT':_0x4fcce4[_0xc68f('0x11')],'XMF-LOCALSTATIONID':_0x4fcce4['localstationid'],'XMF-PATH':_0x363cdf[_0xc68f('0x12')]};return _0x4a6f7d;};exports[_0xc68f('0x13')]=function(_0x1f2758,_0x1d4ae4){return{'actionid':_0x1f2758[_0xc68f('0x14')],'action':_0xc68f('0x15'),'channel':_0x1f2758[_0xc68f('0x16')],'Exten':_0xc68f('0x17'),'Context':_0xc68f('0x18'),'Priority':'1','callerid':util[_0xc68f('0xc')](_0xc68f('0x19'),_0x1f2758['headerinfo']?_0x1f2758[_0xc68f('0x9')]:'',_0x1f2758[_0xc68f('0x1a')]),'variable':_0x1d4ae4,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x1f2758[_0xc68f('0x14')]};};