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