af0d317c455144026be653f0dc966ccc2d100534
[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 _0xec56=['xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','util','../../../../config/logger','fax','message','logger','info','inspect','addVariables','ecm','headerinfo','minrate','maxrate','format','\x22%s\x22','gateway','faxdetect','t38timeout','localstationid','path','variablesAction','uniqueid','originate','channel'];(function(_0x29e3ec,_0x138a18){var _0x25727e=function(_0x2bea0d){while(--_0x2bea0d){_0x29e3ec['push'](_0x29e3ec['shift']());}};_0x25727e(++_0x138a18);}(_0xec56,0x1bd));var _0x6ec5=function(_0x4ba271,_0x14bc28){_0x4ba271=_0x4ba271-0x0;var _0x415577=_0xec56[_0x4ba271];return _0x415577;};'use strict';var util=require(_0x6ec5('0x0'));var _=require('lodash');var moment=require('moment');var logger=require(_0x6ec5('0x1'))(_0x6ec5('0x2'));exports[_0x6ec5('0x3')]=function(_0x240ccf){return{'message':_0x240ccf};};exports[_0x6ec5('0x4')]=function(_0x399441,_0x469679){logger[_0x6ec5('0x5')](_0x399441,util[_0x6ec5('0x6')](_0x469679,{'showHidden':![],'depth':null}));};exports[_0x6ec5('0x7')]=function(_0x2d0a93,_0x3bb683){var _0x35be4e={'XMF-ECM':_0x3bb683[_0x6ec5('0x8')],'XMF-HEADERINFO':_0x3bb683[_0x6ec5('0x9')],'XMF-MINRATE':_0x3bb683[_0x6ec5('0xa')],'XMF-MAXRATE':_0x3bb683[_0x6ec5('0xb')],'XMF-MODEM':util[_0x6ec5('0xc')](_0x6ec5('0xd'),_0x3bb683['modem']),'XMF-GATEWAY':_0x3bb683[_0x6ec5('0xe')],'XMF-FAXDETECT':_0x3bb683[_0x6ec5('0xf')],'XMF-T38TIMEOUT':_0x3bb683[_0x6ec5('0x10')],'XMF-LOCALSTATIONID':_0x3bb683[_0x6ec5('0x11')],'XMF-PATH':_0x2d0a93[_0x6ec5('0x12')]};return _0x35be4e;};exports[_0x6ec5('0x13')]=function(_0x1d5b76,_0x50eb2d){return{'actionid':_0x1d5b76[_0x6ec5('0x14')],'action':_0x6ec5('0x15'),'channel':_0x1d5b76[_0x6ec5('0x16')],'Exten':_0x6ec5('0x17'),'Context':_0x6ec5('0x18'),'Priority':'1','callerid':util[_0x6ec5('0xc')](_0x6ec5('0x19'),_0x1d5b76[_0x6ec5('0x9')]?_0x1d5b76['headerinfo']:'',_0x1d5b76[_0x6ec5('0x11')]),'variable':_0x50eb2d,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x1d5b76['uniqueid']};};