Built motion from commit (unavailable).|2.5.25
[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 _0x5ff3=['originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','headerinfo','uniqueid','lodash','../../../../config/logger','message','logger','info','inspect','addVariables','ecm','minrate','maxrate','format','modem','faxdetect','t38timeout','variablesAction'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x5ff3,0x17d));var _0x35ff=function(_0x387aa7,_0x5dfcba){_0x387aa7=_0x387aa7-0x0;var _0x534a87=_0x5ff3[_0x387aa7];return _0x534a87;};'use strict';var util=require('util');var _=require(_0x35ff('0x0'));var moment=require('moment');var logger=require(_0x35ff('0x1'))('fax');exports[_0x35ff('0x2')]=function(_0x1bb200){return{'message':_0x1bb200};};exports[_0x35ff('0x3')]=function(_0xd0846d,_0x551514){logger[_0x35ff('0x4')](_0xd0846d,util[_0x35ff('0x5')](_0x551514,{'showHidden':![],'depth':null}));};exports[_0x35ff('0x6')]=function(_0x11e738,_0x30c3ff){var _0x495c31={'XMF-ECM':_0x30c3ff[_0x35ff('0x7')],'XMF-HEADERINFO':_0x30c3ff['headerinfo'],'XMF-MINRATE':_0x30c3ff[_0x35ff('0x8')],'XMF-MAXRATE':_0x30c3ff[_0x35ff('0x9')],'XMF-MODEM':util[_0x35ff('0xa')]('\x22%s\x22',_0x30c3ff[_0x35ff('0xb')]),'XMF-GATEWAY':_0x30c3ff['gateway'],'XMF-FAXDETECT':_0x30c3ff[_0x35ff('0xc')],'XMF-T38TIMEOUT':_0x30c3ff[_0x35ff('0xd')],'XMF-LOCALSTATIONID':_0x30c3ff['localstationid'],'XMF-PATH':_0x11e738['path']};return _0x495c31;};exports[_0x35ff('0xe')]=function(_0x574c81,_0x592295){return{'actionid':_0x574c81['uniqueid'],'action':_0x35ff('0xf'),'channel':_0x574c81[_0x35ff('0x10')],'Exten':_0x35ff('0x11'),'Context':_0x35ff('0x12'),'Priority':'1','callerid':util['format'](_0x35ff('0x13'),_0x574c81[_0x35ff('0x14')]?_0x574c81[_0x35ff('0x14')]:'',_0x574c81['localstationid']),'variable':_0x592295,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x574c81[_0x35ff('0x15')]};};