Built motion from commit (unavailable).|2.5.7
[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 _0x1cb7=['log','add\x20user','catch','util','../mysqldb','push','format','%s%s','agent','password','wss','ulaw','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','User','bulkCreate'];(function(_0x52a883,_0x5da0f7){var _0x230149=function(_0x4373d0){while(--_0x4373d0){_0x52a883['push'](_0x52a883['shift']());}};_0x230149(++_0x5da0f7);}(_0x1cb7,0x93));var _0x71cb=function(_0x26d279,_0x42edac){_0x26d279=_0x26d279-0x0;var _0x5adafe=_0x1cb7[_0x26d279];return _0x5adafe;};'use strict';var util=require(_0x71cb('0x0'));var db=require(_0x71cb('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x71cb('0x2')]({'name':util['format']('%s%s','agent',i),'fullname':util[_0x71cb('0x3')](_0x71cb('0x4'),_0x71cb('0x5'),i),'email':util[_0x71cb('0x3')]('%s%s@xcally.com','agent',i),'role':_0x71cb('0x5'),'password':_0x71cb('0x6'),'internal':0xfa0+i,'type':'friend','transport':['udp','ws',_0x71cb('0x7')],'disallow':['all'],'allow':[_0x71cb('0x8')],'defaultuser':util[_0x71cb('0x3')](_0x71cb('0x4'),'agent',i),'encryption':_0x71cb('0x9'),'avpf':_0x71cb('0x9'),'force_avp':'yes','icesupport':'yes','dtlsenable':_0x71cb('0x9'),'dtlsverify':'no','dtlscertfile':_0x71cb('0xa'),'dtlsprivatekey':_0x71cb('0xb'),'dtlssetup':_0x71cb('0xc'),'callerid':util[_0x71cb('0x3')]('\x22%s\x22\x20<%s>',util['format'](_0x71cb('0x4'),_0x71cb('0x5'),i),0xfa0+i)});}db[_0x71cb('0xd')][_0x71cb('0xe')](users)['then'](function(){console[_0x71cb('0xf')](_0x71cb('0x10'));})[_0x71cb('0x11')](function(_0x35b916){console[_0x71cb('0xf')](_0x35b916);});