Built motion from commit (unavailable).|2.5.4
[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 _0xc368=['from-sip','\x22%s\x22\x20<%s>','localstationid','lodash','../../../../config/logger','fax','message','logger','info','inspect','addVariables','ecm','headerinfo','minrate','maxrate','format','faxdetect','t38timeout','path','variablesAction','uniqueid','originate','channel','xcally-motion-fax'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0xc368,0x7b));var _0x8c36=function(_0x234acb,_0x1f265b){_0x234acb=_0x234acb-0x0;var _0x463fab=_0xc368[_0x234acb];return _0x463fab;};'use strict';var util=require('util');var _=require(_0x8c36('0x0'));var moment=require('moment');var logger=require(_0x8c36('0x1'))(_0x8c36('0x2'));exports[_0x8c36('0x3')]=function(_0x2640c5){return{'message':_0x2640c5};};exports[_0x8c36('0x4')]=function(_0x5d3b27,_0x3e9034){logger[_0x8c36('0x5')](_0x5d3b27,util[_0x8c36('0x6')](_0x3e9034,{'showHidden':![],'depth':null}));};exports[_0x8c36('0x7')]=function(_0x5ebfc1,_0x554022){var _0x8ed437={'XMF-ECM':_0x554022[_0x8c36('0x8')],'XMF-HEADERINFO':_0x554022[_0x8c36('0x9')],'XMF-MINRATE':_0x554022[_0x8c36('0xa')],'XMF-MAXRATE':_0x554022[_0x8c36('0xb')],'XMF-MODEM':util[_0x8c36('0xc')]('\x22%s\x22',_0x554022['modem']),'XMF-GATEWAY':_0x554022['gateway'],'XMF-FAXDETECT':_0x554022[_0x8c36('0xd')],'XMF-T38TIMEOUT':_0x554022[_0x8c36('0xe')],'XMF-LOCALSTATIONID':_0x554022['localstationid'],'XMF-PATH':_0x5ebfc1[_0x8c36('0xf')]};return _0x8ed437;};exports[_0x8c36('0x10')]=function(_0x1d5c61,_0xe7857e){return{'actionid':_0x1d5c61[_0x8c36('0x11')],'action':_0x8c36('0x12'),'channel':_0x1d5c61[_0x8c36('0x13')],'Exten':_0x8c36('0x14'),'Context':_0x8c36('0x15'),'Priority':'1','callerid':util[_0x8c36('0xc')](_0x8c36('0x16'),_0x1d5c61[_0x8c36('0x9')]?_0x1d5c61[_0x8c36('0x9')]:'',_0x1d5c61[_0x8c36('0x17')]),'variable':_0xe7857e,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x1d5c61['uniqueid']};};