Built motion from commit c738b9ac.|2.6.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 _0xe026=['lodash','moment','../../../../config/logger','message','logger','info','ecm','headerinfo','minrate','maxrate','format','\x22%s\x22','modem','gateway','faxdetect','localstationid','variablesAction','uniqueid','originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','util'];(function(_0x67e20,_0x5c9a58){var _0x2aa936=function(_0x4dea61){while(--_0x4dea61){_0x67e20['push'](_0x67e20['shift']());}};_0x2aa936(++_0x5c9a58);}(_0xe026,0x11f));var _0x6e02=function(_0x1969a7,_0x5a133a){_0x1969a7=_0x1969a7-0x0;var _0x3d665f=_0xe026[_0x1969a7];return _0x3d665f;};'use strict';var util=require(_0x6e02('0x0'));var _=require(_0x6e02('0x1'));var moment=require(_0x6e02('0x2'));var logger=require(_0x6e02('0x3'))('fax');exports[_0x6e02('0x4')]=function(_0x638fce){return{'message':_0x638fce};};exports[_0x6e02('0x5')]=function(_0x49e6b0,_0x23ae90){logger[_0x6e02('0x6')](_0x49e6b0,util['inspect'](_0x23ae90,{'showHidden':![],'depth':null}));};exports['addVariables']=function(_0x180c87,_0x3b465b){var _0x1912c0={'XMF-ECM':_0x3b465b[_0x6e02('0x7')],'XMF-HEADERINFO':_0x3b465b[_0x6e02('0x8')],'XMF-MINRATE':_0x3b465b[_0x6e02('0x9')],'XMF-MAXRATE':_0x3b465b[_0x6e02('0xa')],'XMF-MODEM':util[_0x6e02('0xb')](_0x6e02('0xc'),_0x3b465b[_0x6e02('0xd')]),'XMF-GATEWAY':_0x3b465b[_0x6e02('0xe')],'XMF-FAXDETECT':_0x3b465b[_0x6e02('0xf')],'XMF-T38TIMEOUT':_0x3b465b['t38timeout'],'XMF-LOCALSTATIONID':_0x3b465b[_0x6e02('0x10')],'XMF-PATH':_0x180c87['path']};return _0x1912c0;};exports[_0x6e02('0x11')]=function(_0x4e5579,_0x49a028){return{'actionid':_0x4e5579[_0x6e02('0x12')],'action':_0x6e02('0x13'),'channel':_0x4e5579[_0x6e02('0x14')],'Exten':_0x6e02('0x15'),'Context':_0x6e02('0x16'),'Priority':'1','callerid':util['format'](_0x6e02('0x17'),_0x4e5579[_0x6e02('0x8')]?_0x4e5579['headerinfo']:'',_0x4e5579['localstationid']),'variable':_0x49a028,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x4e5579[_0x6e02('0x12')]};};