Built motion from commit d5e4af8c.|2.6.23
[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 _0x4e48=['addVariables','ecm','headerinfo','minrate','format','modem','gateway','t38timeout','localstationid','variablesAction','uniqueid','originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','util','lodash','moment','message','logger','info','inspect'];(function(_0x40ac5e,_0x2de228){var _0x2839d6=function(_0x123d47){while(--_0x123d47){_0x40ac5e['push'](_0x40ac5e['shift']());}};_0x2839d6(++_0x2de228);}(_0x4e48,0x83));var _0x84e4=function(_0x41df5b,_0x2251e0){_0x41df5b=_0x41df5b-0x0;var _0x3b503c=_0x4e48[_0x41df5b];return _0x3b503c;};'use strict';var util=require(_0x84e4('0x0'));var _=require(_0x84e4('0x1'));var moment=require(_0x84e4('0x2'));var logger=require('../../../../config/logger')('fax');exports[_0x84e4('0x3')]=function(_0x20a8a8){return{'message':_0x20a8a8};};exports[_0x84e4('0x4')]=function(_0x4c428a,_0x3b305e){logger[_0x84e4('0x5')](_0x4c428a,util[_0x84e4('0x6')](_0x3b305e,{'showHidden':![],'depth':null}));};exports[_0x84e4('0x7')]=function(_0x26670c,_0x4e4ddc){var _0x405fa2={'XMF-ECM':_0x4e4ddc[_0x84e4('0x8')],'XMF-HEADERINFO':_0x4e4ddc[_0x84e4('0x9')],'XMF-MINRATE':_0x4e4ddc[_0x84e4('0xa')],'XMF-MAXRATE':_0x4e4ddc['maxrate'],'XMF-MODEM':util[_0x84e4('0xb')]('\x22%s\x22',_0x4e4ddc[_0x84e4('0xc')]),'XMF-GATEWAY':_0x4e4ddc[_0x84e4('0xd')],'XMF-FAXDETECT':_0x4e4ddc['faxdetect'],'XMF-T38TIMEOUT':_0x4e4ddc[_0x84e4('0xe')],'XMF-LOCALSTATIONID':_0x4e4ddc[_0x84e4('0xf')],'XMF-PATH':_0x26670c['path']};return _0x405fa2;};exports[_0x84e4('0x10')]=function(_0x201656,_0x1686f1){return{'actionid':_0x201656[_0x84e4('0x11')],'action':_0x84e4('0x12'),'channel':_0x201656[_0x84e4('0x13')],'Exten':_0x84e4('0x14'),'Context':_0x84e4('0x15'),'Priority':'1','callerid':util[_0x84e4('0xb')](_0x84e4('0x16'),_0x201656[_0x84e4('0x9')]?_0x201656[_0x84e4('0x9')]:'',_0x201656[_0x84e4('0xf')]),'variable':_0x1686f1,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x201656[_0x84e4('0x11')]};};