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 _0xa37e=['originate','channel','from-sip','localstationid','moment','../../../../config/logger','fax','message','logger','info','inspect','headerinfo','minrate','maxrate','format','modem','gateway','faxdetect','path','variablesAction','uniqueid'];(function(_0xdeffe6,_0x198150){var _0x5baeb=function(_0x51e1c5){while(--_0x51e1c5){_0xdeffe6['push'](_0xdeffe6['shift']());}};_0x5baeb(++_0x198150);}(_0xa37e,0x97));var _0xea37=function(_0x776ff4,_0x9efe35){_0x776ff4=_0x776ff4-0x0;var _0x1ebd3b=_0xa37e[_0x776ff4];return _0x1ebd3b;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0xea37('0x0'));var logger=require(_0xea37('0x1'))(_0xea37('0x2'));exports[_0xea37('0x3')]=function(_0x5430aa){return{'message':_0x5430aa};};exports[_0xea37('0x4')]=function(_0x537c5a,_0x360ed5){logger[_0xea37('0x5')](_0x537c5a,util[_0xea37('0x6')](_0x360ed5,{'showHidden':![],'depth':null}));};exports['addVariables']=function(_0x57135b,_0x36c489){var _0x4a9e08={'XMF-ECM':_0x36c489['ecm'],'XMF-HEADERINFO':_0x36c489[_0xea37('0x7')],'XMF-MINRATE':_0x36c489[_0xea37('0x8')],'XMF-MAXRATE':_0x36c489[_0xea37('0x9')],'XMF-MODEM':util[_0xea37('0xa')]('\x22%s\x22',_0x36c489[_0xea37('0xb')]),'XMF-GATEWAY':_0x36c489[_0xea37('0xc')],'XMF-FAXDETECT':_0x36c489[_0xea37('0xd')],'XMF-T38TIMEOUT':_0x36c489['t38timeout'],'XMF-LOCALSTATIONID':_0x36c489['localstationid'],'XMF-PATH':_0x57135b[_0xea37('0xe')]};return _0x4a9e08;};exports[_0xea37('0xf')]=function(_0x3cd18b,_0x5c0da5){return{'actionid':_0x3cd18b[_0xea37('0x10')],'action':_0xea37('0x11'),'channel':_0x3cd18b[_0xea37('0x12')],'Exten':'xcally-motion-fax','Context':_0xea37('0x13'),'Priority':'1','callerid':util[_0xea37('0xa')]('\x22%s\x22\x20<%s>',_0x3cd18b[_0xea37('0x7')]?_0x3cd18b['headerinfo']:'',_0x3cd18b[_0xea37('0x14')]),'variable':_0x5c0da5,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x3cd18b['uniqueid']};};