4644fa0a5c8c8b60cf194d0313cb1bb806a86d81
[motion2.git] / server / config / seedUsers.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 _0xbed8=['then','log','add\x20user','catch','util','%s%s','agent','format','password','wss','all','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','User','bulkCreate'];(function(_0x4565eb,_0x167f79){var _0x67832=function(_0x5322ff){while(--_0x5322ff){_0x4565eb['push'](_0x4565eb['shift']());}};_0x67832(++_0x167f79);}(_0xbed8,0x1e0));var _0x8bed=function(_0x405dc0,_0x5f2898){_0x405dc0=_0x405dc0-0x0;var _0x1ed46d=_0xbed8[_0x405dc0];return _0x1ed46d;};'use strict';var util=require(_0x8bed('0x0'));var db=require('../mysqldb')['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users['push']({'name':util['format'](_0x8bed('0x1'),_0x8bed('0x2'),i),'fullname':util[_0x8bed('0x3')]('%s%s',_0x8bed('0x2'),i),'email':util[_0x8bed('0x3')]('%s%s@xcally.com',_0x8bed('0x2'),i),'role':'agent','password':_0x8bed('0x4'),'internal':0xfa0+i,'type':'friend','transport':['udp','ws',_0x8bed('0x5')],'disallow':[_0x8bed('0x6')],'allow':['ulaw'],'defaultuser':util[_0x8bed('0x3')](_0x8bed('0x1'),_0x8bed('0x2'),i),'encryption':'yes','avpf':_0x8bed('0x7'),'force_avp':_0x8bed('0x7'),'icesupport':'yes','dtlsenable':_0x8bed('0x7'),'dtlsverify':'no','dtlscertfile':_0x8bed('0x8'),'dtlsprivatekey':_0x8bed('0x9'),'dtlssetup':_0x8bed('0xa'),'callerid':util['format']('\x22%s\x22\x20<%s>',util[_0x8bed('0x3')]('%s%s','agent',i),0xfa0+i)});}db[_0x8bed('0xb')][_0x8bed('0xc')](users)[_0x8bed('0xd')](function(){console[_0x8bed('0xe')](_0x8bed('0xf'));})[_0x8bed('0x10')](function(_0x5a35d6){console[_0x8bed('0xe')](_0x5a35d6);});