d7b89fb22fbbca802792178f6634398fcfd3b6fe
[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 _0x3457=['/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','\x22%s\x22\x20<%s>','User','catch','log','../mysqldb','push','%s%s','format','agent','password','friend','udp','all','ulaw','yes'];(function(_0x256b72,_0x340985){var _0x2183e3=function(_0xf7fd37){while(--_0xf7fd37){_0x256b72['push'](_0x256b72['shift']());}};_0x2183e3(++_0x340985);}(_0x3457,0x19e));var _0x7345=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x3457[_0x122ef9];return _0x42fba0;};'use strict';var util=require('util');var db=require(_0x7345('0x0'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x7345('0x1')]({'name':util['format'](_0x7345('0x2'),'agent',i),'fullname':util[_0x7345('0x3')](_0x7345('0x2'),_0x7345('0x4'),i),'email':util[_0x7345('0x3')]('%s%s@xcally.com','agent',i),'role':'agent','password':_0x7345('0x5'),'internal':0xfa0+i,'type':_0x7345('0x6'),'transport':[_0x7345('0x7'),'ws','wss'],'disallow':[_0x7345('0x8')],'allow':[_0x7345('0x9')],'defaultuser':util[_0x7345('0x3')](_0x7345('0x2'),_0x7345('0x4'),i),'encryption':_0x7345('0xa'),'avpf':_0x7345('0xa'),'force_avp':_0x7345('0xa'),'icesupport':_0x7345('0xa'),'dtlsenable':_0x7345('0xa'),'dtlsverify':'no','dtlscertfile':_0x7345('0xb'),'dtlsprivatekey':_0x7345('0xc'),'dtlssetup':'actpass','callerid':util[_0x7345('0x3')](_0x7345('0xd'),util[_0x7345('0x3')]('%s%s',_0x7345('0x4'),i),0xfa0+i)});}db[_0x7345('0xe')]['bulkCreate'](users)['then'](function(){console['log']('add\x20user');})[_0x7345('0xf')](function(_0x3eef34){console[_0x7345('0x10')](_0x3eef34);});