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