Built motion from commit d9028345.|2.5.43
[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 _0xf4c9=['ecm','minrate','maxrate','format','\x22%s\x22','modem','gateway','faxdetect','t38timeout','localstationid','path','variablesAction','uniqueid','originate','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','headerinfo','lodash','moment','fax','info','inspect','addVariables'];(function(_0x3c1353,_0xe37ca3){var _0x52d42b=function(_0x56c0fb){while(--_0x56c0fb){_0x3c1353['push'](_0x3c1353['shift']());}};_0x52d42b(++_0xe37ca3);}(_0xf4c9,0x11a));var _0x9f4c=function(_0x5f3f88,_0x562baf){_0x5f3f88=_0x5f3f88-0x0;var _0xd08119=_0xf4c9[_0x5f3f88];return _0xd08119;};'use strict';var util=require('util');var _=require(_0x9f4c('0x0'));var moment=require(_0x9f4c('0x1'));var logger=require('../../../../config/logger')(_0x9f4c('0x2'));exports['message']=function(_0x5dcb8f){return{'message':_0x5dcb8f};};exports['logger']=function(_0x45775d,_0x38144f){logger[_0x9f4c('0x3')](_0x45775d,util[_0x9f4c('0x4')](_0x38144f,{'showHidden':![],'depth':null}));};exports[_0x9f4c('0x5')]=function(_0x157af3,_0x4a0bd3){var _0x59e2c2={'XMF-ECM':_0x4a0bd3[_0x9f4c('0x6')],'XMF-HEADERINFO':_0x4a0bd3['headerinfo'],'XMF-MINRATE':_0x4a0bd3[_0x9f4c('0x7')],'XMF-MAXRATE':_0x4a0bd3[_0x9f4c('0x8')],'XMF-MODEM':util[_0x9f4c('0x9')](_0x9f4c('0xa'),_0x4a0bd3[_0x9f4c('0xb')]),'XMF-GATEWAY':_0x4a0bd3[_0x9f4c('0xc')],'XMF-FAXDETECT':_0x4a0bd3[_0x9f4c('0xd')],'XMF-T38TIMEOUT':_0x4a0bd3[_0x9f4c('0xe')],'XMF-LOCALSTATIONID':_0x4a0bd3[_0x9f4c('0xf')],'XMF-PATH':_0x157af3[_0x9f4c('0x10')]};return _0x59e2c2;};exports[_0x9f4c('0x11')]=function(_0x5d62ca,_0x558df4){return{'actionid':_0x5d62ca[_0x9f4c('0x12')],'action':_0x9f4c('0x13'),'channel':_0x5d62ca['channel'],'Exten':_0x9f4c('0x14'),'Context':_0x9f4c('0x15'),'Priority':'1','callerid':util[_0x9f4c('0x9')](_0x9f4c('0x16'),_0x5d62ca[_0x9f4c('0x17')]?_0x5d62ca['headerinfo']:'',_0x5d62ca[_0x9f4c('0xf')]),'variable':_0x558df4,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x5d62ca[_0x9f4c('0x12')]};};