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