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